I've been working with the Motion Commander to fly my CFs with a fair amount of success, but need to convert my code to use the HL Commander instead. I had some difficulties, though, and wanted to ask for pointers on how to set up the HL Commander to receive inputs midway through a flight - for example, logging the CF's position or checking proximity with the multiranger. How would I do this?
If it helps, I've attached a bit of sample code from one of the demos. What could be done to this code to make it log over time? I think I could use that kind of example to sort through the rest of it myself.
Code: Select all
def simple_sequence():
with SyncCrazyflie(uri, cf=Crazyflie(rw_cache='./cache')) as scf:
with PositionHlCommander(scf) as pc:
pc.forward(1.0)
pc.left(1.0)
pc.back(1.0)
pc.go_to(0.0, 0.0, 1.0)