Precision Problem with the autonomous_sequence_high_level

Discussions and questions about the Crazyflie Nano Quadcopter
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Precision Problem with the autonomous_sequence_high_level

Post by kimberly »

Hi! I was able to verify your problem and there is indeed a difference between 2019.09 and 2020.06. I see a difference of where the trajectory is starting. However, it seems that there is actually something wrong with 2019.09, since what I see in your script is the following:

Code: Select all

def run_sequence(cf, trajectory_id, duration):
    commander = cf.high_level_commander
    commander.takeoff(1.0, 2.0)
    time.sleep(3.0)
    relative = True
    commander.start_trajectory(trajectory_id, 1.0, relative)
    time.sleep(duration)
    commander.land(0.0, 2.0)
    time.sleep(2)
    commander.stop()
The commander.takeoff(1.0, 2.0) is where the drone takes off 1 meter in the air, then it executes the trajectory relative from that position. So actually the first videos you sent, was actually the behavior that is correct according to your script. (why it doesn't work in 2019.09 anymore, I don't know...)

If you want the ramp trajectory to start lower, you will need to lower the first number of the takeoff function.
anomi
Beginner
Posts: 17
Joined: Wed Jun 03, 2020 6:55 pm

Re: Precision Problem with the autonomous_sequence_high_level

Post by anomi »

Hi,

Thanks for your help

I just want to know is there is not a possibility to plot the trajectory with a graph on Matlab during the execution of the autonomous_sequence_high_level to see the trajectory which follows the crazyflie, because I would like to compare between the setpoint generated by uav_trajectories and the trajectory actually followed by the crazyflie.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Precision Problem with the autonomous_sequence_high_level

Post by kimberly »

On matlab, that will be difficult to do since the script runs in python. There is this python library matplotlib you can check out.
Post Reply