Programming Approach of client
Programming Approach of client
Alright
Last edited by RyanMco on Fri Aug 23, 2019 8:08 pm, edited 5 times in total.
Re: HEIGHT MEASUREMENT developing
Hi,
The height measurement is done in the z-ranger deck driver and pushed into the estimator:
https://github.com/bitcraze/crazyflie-f ... er2.c#L146
When using the flow, the kalman filter estimator is used. The height measurement is entered in the kalman filter by the function kalmanCoreUpdateWithTof:
https://github.com/bitcraze/crazyflie-f ... ore.c#L538
Eventually the kalman filter generates an estimated pose including the current estimated height.
Then, the controller, outputs motor control in order to get the current estimated height closer to the desired height setpoint. The height PID is generating a velocity setpoint to get closer to the height setpoint there:
https://github.com/bitcraze/crazyflie-f ... pid.c#L190.
Similarly there will be a velocity PID that calculate the needed mean thrust to get closer to the wanted velocity setpoint:
https://github.com/bitcraze/crazyflie-f ... pid.c#L217
This should give you enough pointer to follow a bit how the height control is achieved when using the flow deck.
The height measurement is done in the z-ranger deck driver and pushed into the estimator:
https://github.com/bitcraze/crazyflie-f ... er2.c#L146
When using the flow, the kalman filter estimator is used. The height measurement is entered in the kalman filter by the function kalmanCoreUpdateWithTof:
https://github.com/bitcraze/crazyflie-f ... ore.c#L538
Eventually the kalman filter generates an estimated pose including the current estimated height.
Then, the controller, outputs motor control in order to get the current estimated height closer to the desired height setpoint. The height PID is generating a velocity setpoint to get closer to the height setpoint there:
https://github.com/bitcraze/crazyflie-f ... pid.c#L190.
Similarly there will be a velocity PID that calculate the needed mean thrust to get closer to the wanted velocity setpoint:
https://github.com/bitcraze/crazyflie-f ... pid.c#L217
This should give you enough pointer to follow a bit how the height control is achieved when using the flow deck.