Hello,
I am trying to turn on the motors from the cfclient using:
self.crazyflie.param.set_value("motor.m1", 10001)
but I get the following warnings:
Fri, 16 Aug 2013 19:12:36 WARNING cflib.crazyflie.toc Unable to find variable [motor.m1]
Fri, 16 Aug 2013 19:12:36 WARNING cflib.crazyflie.param Cannot set value for [motor.m1], it's not in the TOC!
motor.m1 is indeed in the TOC, I can print it:
toc = self.crazyflie.log.toc
for group in toc.toc.keys():
for param in toc.toc[group].keys():
toc_element = toc.toc[group][param]
logging.info("name=%s.%s, index=%d, pytype=%s, ctype=%s" %
(group, param, toc_element.ident, toc_element.pytype, toc_element.ctype))
Is it possible to turn on the motors this way???
Do I need some setup before it??
Thanks.
--Luis
Turn on motors from cfclient
Re: Turn on motors from cfclient
Hello,
I am able to control the motors from the cfclient changing the values in the firmware !!!. Now, something I noticed, is as explained in the wiki, "Sending a command makes it apply for 0.5 seconds, after which the firmware will cut out the power". After navigating the firmware code I am afraid to say I could not find the timer/delay for that signal. I want the commands sent to the motors last for 10 ms, do you know where is that timer/delay in the firmware?
I tried changing the delay in stabilizer.c -> stabilizerTask -> vTaskDelayUntil(&lastWakeTime, F2T(IMU_UPDATE_FREQ));, but the system crashes , I got the red led turned on.
Thanks.
--Luis
I am able to control the motors from the cfclient changing the values in the firmware !!!. Now, something I noticed, is as explained in the wiki, "Sending a command makes it apply for 0.5 seconds, after which the firmware will cut out the power". After navigating the firmware code I am afraid to say I could not find the timer/delay for that signal. I want the commands sent to the motors last for 10 ms, do you know where is that timer/delay in the firmware?
I tried changing the delay in stabilizer.c -> stabilizerTask -> vTaskDelayUntil(&lastWakeTime, F2T(IMU_UPDATE_FREQ));, but the system crashes , I got the red led turned on.
Thanks.
--Luis
Re: Turn on motors from cfclient
They are defined in the commander module.
Code: Select all
#define COMMANDER_WDT_TIMEOUT_STABALIZE M2T(500)
#define COMMANDER_WDT_TIMEOUT_SHUTDOWN M2T(2000)