Crazyflie-lib-python thrust modification concern

Discussions about all things Bitcraze
Post Reply
jaymc
Beginner
Posts: 5
Joined: Mon Jun 04, 2018 8:53 pm

Crazyflie-lib-python thrust modification concern

Post by jaymc »

Hello there,
I have been working on a sequence that should have the drone hover up for some time, and then drops/crashes due to certain thrusters turning off. I was able to do this for certain cases in which one thruster is off, for example, but I cannot find a way to turn off three thrusters with the last thruster in its "natural hovering" state. Am I missing out on a certain function that can accomplish this or is it not possible?

My method to do this (which does not work) was to have the send_hover_setpoint occur for some time. And within the for loop, contain an if statement with a set_value for the 'motorPowerSet' log config, representing the last part of the intended result, which is turning off a certain thruster(s). Below is a sample of my file that should allow this to happen.
Oh and the result of mostly every test run is either the hover setpoint only works or the motorPowerSet only works, from the looks of it.

for y in range(100):
if y >= 50:
self._cf.param.set_value('motorPowerSet.m2', str(0))
self._cf.param.set_value('motorPowerSet.m3', str(0))
self._cf.commander.send_hover_setpoint(0, 0, 0, 1)
else:
self._cf.commander.send_hover_setpoint(0, 0, 0, 1)
time.sleep(.1)
Post Reply