Page 1 of 1

How can I fly CF2 using the motion capture system while without the flow deck

Posted: Fri Jan 08, 2021 12:37 pm
by Ruocheng
Recently I m trying to realize multi-CF flying together by the package "crazyflie_ros".
I have done two experiments:
(1)using motion capture system and flow deck together;
(2)only using motion capture system.
the first has a good performance so I try the second one. However, the cf always drifts....It seems the cf doesn't know its height...
But in the code I have published yet....
The publisher is
m_pubposition = nh.advertise<crazyflie_driver::Position>("cmd_position", 1);

crazyflie_driver::Position msg;
msg.x= m_points(index,0);//cmd_position x
msg.y= m_points(index,1);//cmd_position y
msg.z= m_points(index,2);//cmd_position z
msg.yaw=m_points(index,3);// cmd_position yaw
m_pubposition.publish(msg);

I wonder why the cf drifts,,,, through the rqt_graph it seems like the cf should have known its current position and goal position....I have checked the external_position and cmd_position, both of them are correct...
So I wanna know how to set the cf flying only using Motion capture system ...thanks a lot.

Re: How can I fly CF2 using the motion capture system while without the flow deck

Posted: Mon Jan 11, 2021 9:50 am
by Ruocheng
I have solved this problem by changing the estimator as "kalman"
## These are set by the platform (see tools/make/platforms/*.mk), can be overwritten here
#ESTIMATOR ?= any
ESTIMATOR = kalman
CONTROLLER ?= Any # one of Any, PID, Mellinger, INDI
#CONTROLLER = Mellinger
POWER_DISTRIBUTION ?= stock

However, some new issues occurs...
[crazyflie_server-1] process has died [pid 20730, exit code -6, cmd /home/liruocheng/catkin_ws/devel/lib/crazyflie_driver/crazyflie_server __name:=crazyflie_server __log:=/home/liruocheng/.ros/log/3e8cb1e8-53d2-11eb-96f0-f4939ff49e28/crazyflie_server-1.log].
log file: /home/liruocheng/.ros/log/3e8cb1e8-53d2-11eb-96f0-f4939ff49e28/crazyflie_server-1*.log

Re: How can I fly CF2 using the motion capture system while without the flow deck

Posted: Mon Jan 11, 2021 2:04 pm
by whoenig
See response at the identical forum post.