Jaeyoung-Lim / mavros_controllers

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

PX4 version needed for tuned geometric_controller parameters #173

Closed sriram-sb closed 3 years ago

sriram-sb commented 3 years ago

Hi,

In #156 you noted that the iris motor thrust changed in a recent release of PX4 firmware, and that the geometric_controller parameters needed re-tuning as a result. So I wanted to know, which version of the PX4 firmware are the parameters in geometric_controller tuned for? Or am I misunderstanding what you meant?

Thank you in advance.

Jaeyoung-Lim commented 3 years ago

@sriram-b with latest master, it works without any additional tuning. Are you asking becuase it is not working for you?

sriram-sb commented 3 years ago

@Jaeyoung-Lim

Thanks for the quick response. I'm in a time crunch currently so I would really appreciate it if you could respond quickly again.

I was asking because I am currently doing a project with geometric controller where the drone does not seem to be tracking the given trajectory very closely.

To test my setup, I tried re-cloning the repository and running, without any modification, the lamniscate example. The tracking seems to be very poor, and not only that, the drone will eventually just crash after only a couple of minutes. The only error from the terminal was this.

On the other hand, the circle example ran much better, with no errors that I could tell.

Is there anything wrong with my setup? Since the geometric controller is tuned to the iris drone with the latest stable PX4 release, I was wondering what I can do to make the tracking better.

Jaeyoung-Lim commented 3 years ago

@sriram-b I am not sure what you are asking me to do "again" - it is already tuned

The lamniscate trajectory is in general a much more challenging trajectory to track. You can slow the trajectory speed to make it less challenging

Probably adding the acceleration reference will improve the tracking performance

sriram-sb commented 3 years ago

@Jaeyoung-Lim

I am unfamiliar with the acceleration reference, how can I add that?

Jaeyoung-Lim commented 3 years ago

@sriram-b https://github.com/Jaeyoung-Lim/mavros_controllers/blob/07d0203290c0bdd97a21389db2bdf6d3b56077ef/trajectory_publisher/src/shapetrajectory.cpp#L143

Have you tried lowering the speed? I in purpose made the lamniscate trajectory hit the limit of the controller.

sriram-sb commented 3 years ago

@Jaeyoung-Lim

Lowering the speed does help, it works well after that. I was under the impression that it should've worked out of the box, so that's a slight relief.

I'll look into adding the acceleration reference then and make another issue if I need to ask anything else, thank you!