Crazyflie does not fly properly

Post here to get support
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

Hi,
I'm sorry I didn't give any updates yesterday, I couldn't get to the lab because of traffic law restrictions in my city, however, today I will be there.
What could be a safe distance between the CFs?
The controller is Mellinger, when running the ROS master it says "Using Mellinger controller"
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

Hi again,
Here is the graph of the CF on top of a chair, the real height is around 0.6 meters, which is ok, the second graph is when I moved the CF to the ground, and the last one with the CF on ground after a few seconds.
Attachments
3.png
2.png
1.png
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

update: The flight has improved a little and it appears to be within the +-10 cm tolerance, but the CFs are not landing despite using

Code: Select all

allcfs.land(targetHeight=0.0, duration=2.0)
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Crazyflie does not fly properly

Post by whoenig »

It seems like you are using the Crazyswarm?

For LPS, it is better to use the PID controller, because the default gains of the Mellinger controller are very high (i.e., tuned for use with a motion capture system). You can change the controller at https://github.com/USC-ACTLab/crazyswar ... launch#L22.

When you check the LPS system, you should enable logging in the launch-file and then plot the state estimate logging variables (e.g., using rqt_plot), to verify that your state estimate works fine.

For your latest issue, does `not landing` mean that the CF moves towards the ground, but does not turn off the motors, or does it not even move towards the ground?
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

Hi,
It is correct, I am using the Crazyswarm.
Ok, tomorrow I will try with PID when being at the lab.
How do I enable logging in the launch-file?
It doesn't even move towards the ground, it just hovers indefinitely even if the script has ended and the ROS Master been killed, I made a alternatively "landing" which consists in going to 0.2 meters height and then turning off the motors.
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Crazyflie does not fly properly

Post by whoenig »

You can configure your logging variables at https://github.com/USC-ACTLab/crazyswar ... launch#L14 and enable logging at https://github.com/USC-ACTLab/crazyswar ... launch#L48. The information will be available at the `/cf<id>/log1/` topic.

For the landing issue, try sanding the command multiple times and see if that changes anything. Otherwise, this could be a bug in the high-level commander. It might also be worthwhile testing the new firmware which we released yesterday (where we tested the high-level commander together with the LPS script for sure.)
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

Hi, I am using now the PID controller and it has improved, however, when trying to plot with rqt_plot these messages appear:

Code: Select all

TopicCompleter.update_topics(): could not get message class for topic type "crazyflie_driver/GenericLogData" on topic "/cf9/log1"
TopicCompleter.update_topics(): could not get message class for topic type "crazyflie_driver/GenericLogData" on topic "/cf7/log1"
TopicCompleter.update_topics(): could not get message class for topic type "crazyflie_driver/GenericLogData" on topic "/cf6/log1"
TopicCompleter.update_topics(): could not get message class for topic type "crazyflie_driver/GenericLogData" on topic "/cf8/log1"
The normal landing with "land" is still not working, it may be a bug as you said.
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Crazyflie does not fly properly

Post by whoenig »

For the error, please make sure you source your ROS workspace (source devel/setup.bash) in the shell you run rqt_plot from.
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

Hi,
I will try again when they give me again the authorization to be in the lab, the last time I was there I could record a video of the CF flying, here it is: https://photos.app.goo.gl/opH5vjJyYJYS5FRz6.
santiagorg2401
Member
Posts: 46
Joined: Sun Sep 08, 2019 2:28 pm

Re: Crazyflie does not fly properly

Post by santiagorg2401 »

Hi,
I am not sure if I am running rqt_plot properly,
First I source the ROS workspace

Code: Select all

cd crazyflie/crazyswarm/ros_ws/
source devel/setup.bash
Then I check available topics

Code: Select all

rostopic list
Here the answer from the shell:

Code: Select all

/cf1/cmd_full_state
/cf1/cmd_hover
/cf1/cmd_position
/cf1/cmd_stop
/cf1/cmd_vel
/cf1/cmd_velocity_world
/cf1/log1
/cf2/cmd_full_state
/cf2/cmd_hover
/cf2/cmd_position
/cf2/cmd_stop
/cf2/cmd_vel
/cf2/cmd_velocity_world
/cf2/log1
/cf3/cmd_full_state
/cf3/cmd_hover
/cf3/cmd_position
/cf3/cmd_stop
/cf3/cmd_vel
/cf3/cmd_velocity_world
/cf3/log1
/cf4/cmd_full_state
/cf4/cmd_hover
/cf4/cmd_position
/cf4/cmd_stop
/cf4/cmd_vel
/cf4/cmd_velocity_world
/cf4/log1
/clicked_point
/initialpose
/joy
/move_base_simple/goal
/pointCloud
/rosout
/rosout_agg
/tf
/tf_static
/virtual_interactive_object
and after that:

Code: Select all

rqt_plot /cf2/log1/stateEstimate.x
And it does not plot, as I said, I am not sure if I am doing something wrong, please excuse me if I a missed something obvious.
Post Reply