original_docstring: 
      This is the go sequence. It commands the trajectory to start.
      
docstring: This is the go sequence. It commands the trajectory to start.
docstring_tokens: This is the go sequence . It commands the trajectory to start .
code: def go_sequence(scf: SyncCrazyflie, data: Dict):
      """
      This is the go sequence. It commands the trajectory to start.
      """
      try:
          cf = scf.cf  # type: Crazyflie
          commander = cf.high_level_commander  # type: cflib.HighLevelCOmmander
          commander.start_trajectory(
              trajectory_id=1, time_scale=1.0, relative=False)
  
          intensity = 1  # 0-1
  
          # initial led color
          cf.param.set_value('ring.effect', '7')
          cf.param.set_value('ring.solidRed', str(0))
          cf.param.set_value('ring.solidGreen', str(255))
          cf.param.set_value('ring.solidBlue', str(0))
          time.sleep(0.1)
  
          for color, delay, T in zip(data['color'], data['delay'], data['T']):
              # change led color
              red = int(intensity * color[0])
              green = int(intensity * color[1])
              blue = int(intensity * color[2])
              #print('setting color', red, blue, green)
              sleep_while_checking_stable(scf, tf_sec=delay)
              cf.param.set_value('ring.solidRed', str(red))
              cf.param.set_value('ring.solidBlue', str(blue))
              cf.param.set_value('ring.solidGreen', str(green))
              # wait for leg to complete
              # print('sleeping leg duration', leg_duration)
              sleep_while_checking_stable(scf, tf_sec=T - delay)
          
      except UnstableException as e:
          print(e)
          kill_motor_sequence(scf)
          # raise if you want flight to stop if one drone crashes
          #raise(e)
      
      except LowBatteryException as e:
          print(e)
          # have this vehicle land
          land_sequence(scf)
      
      except Exception as e:
          print(e)
          land_sequence(scf)
          # raising here since we don't know what this exception is
          raise(e)
code_tokens: def go_sequence ( scf : SyncCrazyflie , data : Dict ) : try : cf = scf . cf commander = cf . high_level_commander commander . start_trajectory ( trajectory_id = 1 , time_scale = 1.0 , relative = False ) intensity = 1 cf . param . set_value ( 'ring.effect' , '7' ) cf . param . set_value ( 'ring.solidRed' , str ( 0 ) ) cf . param . set_value ( 'ring.solidGreen' , str ( 255 ) ) cf . param . set_value ( 'ring.solidBlue' , str ( 0 ) ) time . sleep ( 0.1 ) for color , delay , T in zip ( data [ 'color' ] , data [ 'delay' ] , data [ 'T' ] ) : red = int ( intensity * color [ 0 ] ) green = int ( intensity * color [ 1 ] ) blue = int ( intensity * color [ 2 ] ) sleep_while_checking_stable ( scf , tf_sec = delay ) cf . param . set_value ( 'ring.solidRed' , str ( red ) ) cf . param . set_value ( 'ring.solidBlue' , str ( blue ) ) cf . param . set_value ( 'ring.solidGreen' , str ( green ) ) sleep_while_checking_stable ( scf , tf_sec = T - delay ) except UnstableException as e : print ( e ) kill_motor_sequence ( scf ) except LowBatteryException as e : print ( e ) land_sequence ( scf ) except Exception as e : print ( e ) land_sequence ( scf ) raise ( e )
short_docstring: This is the go sequence.
short_docstring_tokens: This is the go sequence .
comment: """
      This is the go sequence. It commands the trajectory to start.
      """$SEP$# type: Crazyflie$SEP$# type: cflib.HighLevelCOmmander$SEP$# 0-1$SEP$# initial led color$SEP$# change led color$SEP$#print('setting color', red, blue, green)$SEP$# wait for leg to complete$SEP$# print('sleeping leg duration', leg_duration)$SEP$# raise if you want flight to stop if one drone crashes$SEP$#raise(e)$SEP$# have this vehicle land$SEP$# raising here since we don't know what this exception is