Page 2 of 3

Re: Crazyflie does not fly properly

Posted: Fri Jan 22, 2021 11:41 am
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"

Re: Crazyflie does not fly properly

Posted: Fri Jan 22, 2021 2:55 pm
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.

Re: Crazyflie does not fly properly

Posted: Fri Jan 22, 2021 3:17 pm
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)

Re: Crazyflie does not fly properly

Posted: Tue Jan 26, 2021 9:34 am
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?

Re: Crazyflie does not fly properly

Posted: Fri Jan 29, 2021 12:39 am
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.

Re: Crazyflie does not fly properly

Posted: Fri Jan 29, 2021 7:53 am
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.)

Re: Crazyflie does not fly properly

Posted: Fri Jan 29, 2021 4:57 pm
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.

Re: Crazyflie does not fly properly

Posted: Fri Jan 29, 2021 7:41 pm
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.

Re: Crazyflie does not fly properly

Posted: Sun Jan 31, 2021 10:05 pm
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.

Re: Crazyflie does not fly properly

Posted: Mon Feb 08, 2021 3:28 pm
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.