Jaeyoung-Lim / mavros_controllers

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

Attitude error different from the referenced paper #150

Closed ep51lon closed 3 years ago

ep51lon commented 4 years ago

Why does the attitude controller in the geometric_attcontroller different from the mentioned paper "Geometric tracking control // of a quadrotor UAV on SE (3)" by Lee, et al?

I tried to change the attitude error to be error_att = 0.5 * matrix_hat_inv(rotmat_d.transpose() * rotmat - rotmat.transpose() * rotmat_d); to make it similar to the paper, but it turns out that the quadcopter falls down in the Gazebo simulator. Do you know why that happens?

Many thanks.

Jaeyoung-Lim commented 3 years ago

@quarcle Can you share the log?

ep51lon commented 3 years ago

Here is the log file: roslaunch-qeui-X71-6589.log

Might that help?

There is no error shown while executing the controller, but the drone crashes after taking off and trying to follow a specified trajectory (in my case, I run sitl_trajectory_track_circle.launch)

Jaeyoung-Lim commented 3 years ago

@quarcle I meant the flight log. I do see that the equation is wrong, but not sure why it flies now

ep51lon commented 3 years ago

Which log do you mean? I attach two logs (roslaunch log and the ulog files) as follows: geocontrol_logs.zip

valenbase commented 3 years ago

error_att = 0.5 matrix_hat_inv(-rotmat_d.transpose() rotmat + rotmat.transpose()

ep51lon commented 3 years ago

error_att = 0.5 matrix_hat_inv(-rotmat_d.transpose() rotmat + rotmat.transpose()

@valenbase what does it mean?

valenbase commented 3 years ago

error_att = 0.5 matrix_hat_inv(-rotmat_d.transpose() rotmat + rotmat.transpose()

@valenbase what does it mean?

i mean exchange content on both sides of the symbol -

ep51lon commented 3 years ago

Has anyone found out the problem and how to fix it?

Jaeyoung-Lim commented 3 years ago

@quarcle Could you clarify what the problem is?

ep51lon commented 3 years ago

This code line 444 uses error_att = 0.5 * matrix_hat_inv(rotmat_d.transpose() * rotmat - rotmat.transpose() * rotmat); while the referenced paper uses error_att = 0.5 * matrix_hat_inv(rotmat_d.transpose() * rotmat - rotmat.transpose() * rotmat_d);. When I changed to the error equation mentioned in the paper, the copter crashes. How should I resolve the problem?