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

Discussions about technology in general
Post Reply
Ruocheng
Beginner
Posts: 14
Joined: Fri Dec 25, 2020 3:10 pm

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

Post 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.
Attachments
2021-01-08 20-30-32 的屏幕截图.png
Ruocheng
Beginner
Posts: 14
Joined: Fri Dec 25, 2020 3:10 pm

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

Post 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
whoenig
Expert
Posts: 379
Joined: Mon Oct 27, 2014 2:55 am

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

Post by whoenig »

See response at the identical forum post.
Post Reply