Hi,
We are trying to make the drone land autonomously using the ZRanger. For that, we have to find the code which enables the drone to maintain 40cm. Then, we want to know how the drone uses the sensor's data to maintain this altitude :
- where is the planner (which defines the setpoints entering the controller) ?
- how are the motors controled and where in the code ?
Finally, we want to change the command of 40cm into a ramp.
Unfortunately, we haven't managed to do it yet. Could you help us ?
It is quite urgent so can you give us an answer as soon as possible please?
Thanks a lot
[SOLVED] Autonomous landing with the Zranger
-
- Beginner
- Posts: 20
- Joined: Mon Nov 13, 2017 11:54 am
[SOLVED] Autonomous landing with the Zranger
Last edited by matthieuleonie on Thu Feb 22, 2018 6:08 pm, edited 1 time in total.
Re: Autonomous landing with the Zranger
Hi,
The control happens in the stabilization loop: https://github.com/bitcraze/crazyflie-f ... #L124-L145. The zranger deck driver pushes height measurement to the estimator (the deck drivers are in src/deck/drivers/), the estimator estimates the current height, the setpoint contains the requested height and the controller generates thrust commands to make the current heigth closer the the requested height.
- The set-point is sent from the ground. For height control there is a setpoint packet that sets the absolute height and roll/pitch/yaw: https://github.com/bitcraze/crazyflie-l ... er.py#L105. If you want to make a script that sends the sequence of setpoint you can look in the example folder of the crazyflie lib for example on how to connect a Crazyflie and start sending setpoints. The easiest might be to work with the synchronous API: https://github.com/bitcraze/crazyflie-l ... nceSync.py
- The motors are controlled in the stabilizer loop, the actual control is done in the power_distribution function.
The control happens in the stabilization loop: https://github.com/bitcraze/crazyflie-f ... #L124-L145. The zranger deck driver pushes height measurement to the estimator (the deck drivers are in src/deck/drivers/), the estimator estimates the current height, the setpoint contains the requested height and the controller generates thrust commands to make the current heigth closer the the requested height.
- The set-point is sent from the ground. For height control there is a setpoint packet that sets the absolute height and roll/pitch/yaw: https://github.com/bitcraze/crazyflie-l ... er.py#L105. If you want to make a script that sends the sequence of setpoint you can look in the example folder of the crazyflie lib for example on how to connect a Crazyflie and start sending setpoints. The easiest might be to work with the synchronous API: https://github.com/bitcraze/crazyflie-l ... nceSync.py
- The motors are controlled in the stabilizer loop, the actual control is done in the power_distribution function.
-
- Beginner
- Posts: 20
- Joined: Mon Nov 13, 2017 11:54 am
Re: Autonomous landing with the Zranger
Ok we will check that. Thank you