Jaeyoung-Lim / mavros_controllers

Aggressive trajectory tracking using mavros for PX4 enabled vehicles
BSD 3-Clause "New" or "Revised" License
400 stars 164 forks source link

geometric_attcontroller function attiitude error formula typo #195

Closed sligeek100 closed 2 years ago

sligeek100 commented 2 years ago

Hi Jaeyoung -- In geometric_controller.cpp function geometric_attcontroller, error_att = 1/2 matrix_hat_inv(Rd' R - R'R), should be error_att = 1/2 matrix_hat_inv(Rd'R - R'Rd), then it can match the paper 'Geometric tracking control of a quadrotor UAV on SE (3)' CDC. 2010.

-- or u defined a new att_error different from the paper's ? edits: -- the position controller gains Kp, and Kv need be re-runed

Jaeyoung-Lim commented 2 years ago

@sligeek100 Thanks for reporting this,

indeed, I think you are right. Would you be able to make a PR with the fix?

sligeek100 commented 2 years ago

Hello Lim -- Thanks for ur reply, another minor question: in geometriccontroller subscriber mavtwistSub sub topic "/mavros/local_position/velocity_local" is the speed of the drone, but in trajectoryPublisher.cpp, mavtwistSub_ sub topic "/mavros/local_position/velocity", wired thing is the mavros web clearly say the mavros node published on topic "/mavros/local_position/velocity", but when I rostopic info this topic , mavros not pub on it but on /velocity_local instead, there is no data on the topic "/mavros/local_position/velocity" if u echo this topic. Thank u :))

Jaeyoung-Lim commented 2 years ago

@sligeek100 Probably also a bug introduced by recent mavros. Would you be able to create a fix for this?