Page 1 of 1

Accuracy of trajectory calculated on 1-D

Posted: Fri Feb 21, 2020 4:14 pm
by HC766
Hi, all. I have been using CF2 to do my project about autonomous flying. I use the Whoenig's trajectory design package on Github to design my own high-order polynomial trajectoryies. And I use the vicon with crazyflie_ros or autonomous_sequence_high_level.py to achieve my task. Based on these excellent tools, I can achieve autonomous flying of CF2. After that, I would like to campare the accuracy of real trajectory flying of drone and the trajectory I designed using code, which means I need to record the trajectory when flying and compared it with calculated trajectory on each dimension(x, y, z). There is a question for me:

As we know, the trajectory I designed based on connecting with several points I choose. There is a 7th order polynomial trajectory between each two points and the time between them is also calculated. This means the whole time of trajectory we design is fixed. When I record the flying trajectory, I can not ensure the time I record is the same as time of trajectory I designed, so I can not compare 1-D trajectory accuracy on time zone.

The results I want to get like the attachment I put.
Does anyone give me some advices on this problem?? Thanks!

Re: Accuracy of trajectory calculated on 1-D

Posted: Sun Feb 23, 2020 4:49 am
by whoenig
I usually use the logging variables "stateEstimate.{x,y,z}" and "ctrlTarget.{x,y,z}". The state estimate combines your mocap measurement with the oboard IMU. The best way is to log those variables using the uSD-card deck, and then use post-processing to analyze the data. However, you can also stream the data live using the logging system. In both cases, you might want to consider the compressed versions (*Z) of those logging variables to be able to log more variables at the same time, see https://github.com/bitcraze/crazyflie-f ... #L527-L678.