Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

Jaeyoung-Lim
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim commented Jul 5, 2020

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 the fw_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

@Jaeyoung-Lim Jaeyoung-Lim added the Rover 🚙 Rovers and other UGV label Jul 5, 2020
julianoes
julianoes previously approved these changes Jul 7, 2020
Copy link
Contributor

@julianoes julianoes left a 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));
Copy link
Member

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.

Copy link
Member Author

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

@dagar
Copy link
Member

dagar commented Jul 7, 2020

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

@Jaeyoung-Lim
Copy link
Member Author

@dagar In that case, should I move the base class into the Roverattitude controller?

@dagar
Copy link
Member

dagar commented Jul 7, 2020

@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.

@stale
Copy link

stale bot commented Oct 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@LorenzMeier
Copy link
Member

@Jaeyoung-Lim What's the state here?

@Jaeyoung-Lim
Copy link
Member Author

@LorenzMeier Sorry for dragging this on. I will wrap this up this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mode: Offboard Offboard mode control Rover 🚙 Rovers and other UGV
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants