MCPcopy Create free account
hub / github.com/bitcraze/crazyflie-lib-python / run_sequence

Function run_sequence

examples/autonomousSequence.py:127–142  ·  view source on GitHub ↗
(scf, sequence)

Source from the content-addressed store, hash-verified

125
126
127def run_sequence(scf, sequence):
128 cf = scf.cf
129
130 for position in sequence:
131 print('Setting position {}'.format(position))
132 for i in range(50):
133 cf.commander.send_position_setpoint(position[0],
134 position[1],
135 position[2],
136 position[3])
137 time.sleep(0.1)
138
139 cf.commander.send_stop_setpoint()
140 # Make sure that the last packet leaves before the link is closed
141 # since the message queue is not flushed before closing
142 time.sleep(0.1)
143
144
145if __name__ == '__main__':

Callers 1

Calls 2

send_stop_setpointMethod · 0.80

Tested by

no test coverage detected