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

px4 inbuilt controllers and geometric controller #203

Closed Ayush1285 closed 2 years ago

Ayush1285 commented 2 years ago

If we launch posix_sitl.launch then px4 will run its inbuilt control modules (that's mc_pos_ctrl,mc_att_ctrl,mc_rate_ctrl) and since we are running geometric controller node parallelly, therefore there will be two controllers running simultaneously, how you've sorted this issue?

Jaeyoung-Lim commented 2 years ago

If we launch posix_sitl.launch then px4 will run its inbuilt control modules (that's mc_pos_ctrl,mc_att_ctrl,mc_rate_ctrl) and since we are running geometric controller node parallelly, therefore there will be two controllers running simultaneously

@Ayush1285 I don't think this is true. This repository is using the offboard interface and therefore is able to bypass the cascaded loop depending on what kind of setpoint you are sending. You can read more on how offboard mode works in https://docs.px4.io/master/en/flight_modes/offboard.html

Ayush1285 commented 2 years ago

Since you are sending Attitude Target setpoint that's why it can bypass position ctrl loops, right? So, it is like, you're using the geometric controller for position control and then using cascaded attitude and rate controllers of px4 to achieve attitude target set by geometric control. Please correct me if I am wrong😅

Jaeyoung-Lim commented 2 years ago

@Ayush1285 This package contains code for sending various setpoints such as position/velocity/acceleration or attitude rates(body rates).

By sending attitude rates we are only using the rate controller of PX4

Ayush1285 commented 2 years ago

okay, thanks for the info.