I'm having a timeout issue here where my crazyflie does not seem to be fully disconnected if I were to link to it via: self.cf.open_link(uri). This is in a class and self.cf = Crazyflie(rw_cache='./cache').
This happens when I'm using ROS after Python commands.
This issue mainly occurs when mixing up both crazyflie-lib and crazyflie-ros, to control the crazyflie. Why mixed? Because there are some commands that is available in one package, but not the other. I am not yet at the level where I know how to add in new functions either.
The following describes the scenarios:
1) I start out by using crazyflie-ros commands such as:
Code: Select all
rosrun crazyflie_tools reboot --uri uri
rosrun crazyflie_tools battery --uri uri
Code: Select all
self.cf.open_link(uri)
self.cf.param.set_value('full_param_path', 'value_for_param')
self.cf.close_link()
2) Now the problem comes when after scenario 1 is done, and I get the callback from the script saying that the crazyflie has been disconnected via self.cf.close_link(), I try running ros commands again, such as
Code: Select all
rosrun crazyflie_tools reboot --uri uri
rosrun crazyflie_tools battery --uri uri
Here, I tried
-Unplugging the crazyradio and replugging, result: same issue
-Running a script which resets the crazyradio usb via bus and device number, result: same issue
-Restarting the crazyflie manually, result: issue resolved.
3) If I were to run the Python commands:
Code: Select all
self.cf.open_link(uri)
self.cf.param.set_value('full_param_path', 'value_for_param')
self.cf.close_link()
So the only issue comes in scenario 2.
Can anyone help me with this? I suspect that the crazyflie does not fully disconnect when self.cf.close_link() is run, and is instead on some sort of a 'standby' mode?