mav_control_rw icon indicating copy to clipboard operation
mav_control_rw copied to clipboard

Identification of thrust in DJI drones

Open Adrianaaf opened this issue 5 years ago • 3 comments

I am using the linear and non-linear MPC in a Matrice 210, but it is not clear to me how to send the thrust command to the DJI autopilot.

The output of the MPC is Newtons, and DJI SDK has not this option. In a different repository of the ETHZ-ASL(mav_dji_ros_interface) you explain how to use it with a Matrice 100, in this case, they use the thrust in percentage. For converting from Newtons to % they add an offset and multiply by a coefficient, but I don't understand how these values are calculated.

thrust_command = (+1)* thrust_offset_ + msg->thrust.z*thrust_coefficient_;

When using the values from the mav_dji_ros_interface repository I have a good performance but I have to set a different masss from the real one and the errors are quite high.

By the way, thank you very much for this open-source project it is very useful.

Adrianaaf avatar Sep 04 '19 09:09 Adrianaaf

Thanks. I believe this is a missing point from the system identification scripts we opened here https://github.com/ethz-asl/mav_system_identification

The correct way will be to record a SysID bag file and do linear regression between IMU z acceleration (in global frame) and thrust_command. The linear regression output will be thrust offset and thrust coefficient.

I hope this helps. @inkyusa maybe you have something to add here regarding DJI platforms?

fmina avatar Sep 10 '19 21:09 fmina

Thanks. I believe this is a missing point from the system identification scripts we opened here https://github.com/ethz-asl/mav_system_identification

The correct way will be to record a SysID bag file and do linear regression between IMU z acceleration (in global frame) and thrust_command. The linear regression output will be thrust offset and thrust coefficient.

I hope this helps. @inkyusa maybe you have something to add here regarding DJI platforms?

Hi, how could you map the thrust_command from joy command to %?

yiyongrobotics avatar Jul 30 '20 13:07 yiyongrobotics

Thanks. I believe this is a missing point from the system identification scripts we opened here https://github.com/ethz-asl/mav_system_identification

The correct way will be to record a SysID bag file and do linear regression between IMU z acceleration (in global frame) and thrust_command. The linear regression output will be thrust offset and thrust coefficient.

I hope this helps. @inkyusa maybe you have something to add here regarding DJI platforms?

Could I use a controller instead to transform thrust (N) to throttle (%)? For example: throttle = throttle + kp ( accel_ref - accel_imu)

AntonioCarralero avatar Jan 19 '22 13:01 AntonioCarralero