-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Offboard Bodyrate control for Rovers #15257
Conversation
0b3eaeb
to
462da6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not opposed 😄 thanks @Jaeyoung-Lim
void | ||
RoverPositionControl::run() | ||
{ | ||
_control_mode_sub = orb_subscribe(ORB_ID(vehicle_control_mode)); | ||
_global_pos_sub = orb_subscribe(ORB_ID(vehicle_global_position)); | ||
_local_pos_sub = orb_subscribe(ORB_ID(vehicle_local_position)); | ||
_vehicle_angular_velocity_sub = orb_subscribe(ORB_ID(vehicle_angular_velocity)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should switch these to uORB::Subscription at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I will do it on a separate PR
I actually don't think it's worth preserving the "ECL" controllers. I think if we manually inlined the subset of methods it could all be collapsed into a relatively tiny amount of code. For example the multicopter rate controller. https://github.com/PX4/Firmware/blob/8763d71bf0b603e0da42ea16fceae7fd2590546f/src/modules/mc_rate_control/RateControl/RateControl.cpp#L63-L67 There are also some in progress FW modifications here. #15256 |
@dagar In that case, should I move the base class into the Roverattitude controller? |
That works for now unless you want to absorb it entirely. A common PID class or even rate controller could make sense at some point, I just think we can do better than that ECL code. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
462da6e
to
e361b3f
Compare
e361b3f
to
5a584d3
Compare
@Jaeyoung-Lim What's the state here? |
@LorenzMeier Sorry for dragging this on. I will wrap this up this week |
5a584d3
to
d9754a9
Compare
Describe problem solved by this pull request
Previously, rover steering control has been mainly done in a open-loop fashion by simply setting the steering angle from the controller.
However, this results in unstable and unpredictable steering behaviors in high speed as well as uneven terrain. This open loop control also have been shown to introduce oscillations when using on boats.
Describe your solution
This PR adds a bodyrate controller (yaw) that can be activated through offboard control on the rover. This is mainly to demonstrate the rate control behaviors on the rover.
This also moves the ECL_Controller baseclass that was recently moved to the firmware from PX4/ecl to a library, so that it can be used in the
rover_pos_controller
as well as thefw_att_controller
Test data / coverage
Offboard control log: https://review.px4.io/plot_app?log=a30ebfd4-96cb-4fc8-9e55-8606fb5ef4b5
Additional Context
Switching to a body rate based controller will bring the following benefits
GND_MAX_ANG
and minimize the difference between the differential rover and ackerman steering vehicle (Rover: Steering angle parameters for differential steering vehicles #13468)