-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Omnidirectional surface vehicle controllers for position and attitude #21138
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
base: pr-rover-ratesp
Are you sure you want to change the base?
Conversation
This pull request has been mentioned on Discussion Forum, for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/px4-community-q-a-february-15-2023/30744/1 |
The logic presented here seems reasonable and close to my use case. PX4-Autopilot/src/modules/mc_pos_control/PositionControl/PositionControl.hpp Lines 55 to 74 in d6bb19e
I don't need |
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: |
also copy params
For the record, we had tests in the model pool, we collected some data using manual mode. Here are the results. Flight Review #1 We have observed that thrust and torque setpoints are fighting in control allocator. This means that with full throttle it will not allocate torque making turning while moving impossible at full throttle. Should this be a problem for an attitude controller? Maybe some sort of 6DOF rate controller would solve the problem? |
@@ -23,7 +23,8 @@ control_allocator start | |||
# | |||
# Start UUV Attitude Controller. | |||
# | |||
uuv_att_control start | |||
usv_att_control start | |||
usv_pos_control start |
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.
This basically breaks all UUV use cases
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.
I will revert that commit. Should I create my own usv_apps? It is a bit similar to a boat and rover. So I don't know where I stand.
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, would it be too hard to genearlize the rover position controller for your use case? We can separate out the rover_att_control if you think is needed
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.
@Jaeyoung-Lim, I would appreciate a separate rover_pos_control, I think I might use it usv_att_control. I'm at loss with position control as I'm debugging attitude in on the real model.
Still, should I add rc.usv_apps? I guess it would feature something like this:
rover_pos_control
usv_att_control
6dof_rate_control – about this one I'm discussing at discord
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.
Still, should I add rc.usv_apps? I guess it would feature something like this:
rover_pos_control
usv_att_control
6dof_rate_control – about this one I'm discussing at discord
I don't think this is necessary, since your vehicle is the only vehicle that would be using it. I would prefer if we can make the rover more generic, so that we can also support omnidirectional ground vehicles
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.
For now I would be running this module, but yes. rover should become more generic. My changes could be merged with it later.
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.
In that case, would you be able to work on separating the rover_att_controller
outside of the rover position controller? I worked on #20082 before to get the low level controls going, might be useful for your usecase also
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.
@Jaeyoung-Lim, would it be reasonable to drop this PR in favor of refactoring rover_pos_control
? I think I gained enough know-how to extend it, and maybe add omni-directionality
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 can also keep this open, and rebase once the refactoring is done
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.
If your PR is in working order, I would prefer refactoring rover_pos_control to use control allocator
_thrust_setpoint(0) = manual_control_setpoint.throttle; | ||
_thrust_setpoint(1) = manual_control_setpoint.roll; | ||
_thrust_setpoint.setAll(0.0f); | ||
_thrust_setpoint(0) = normalizeJoystickThrottleInput(manual_control_setpoint.throttle); |
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.
For the record, I have been bitten by an issue that was solved here #20885
This wasn't present in uuv_att_control. I have added this as a separate function. This approach could be replicated in other control modules, as it at a glance explains what is happening with the throttle setpoint. This is my way of fighting with such complex functions: smaller functions.
I suppose so
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/px4-community-q-a-march-08-2023/31090/6 |
This was definitely a cool project & I would love to keep track of it in the future! As recommended by @Jaeyoung-Lim in https://discuss.px4.io/t/px4-community-q-a-march-08-2023/31090/6, it would be better to close this PR and extend the Rover control logic. @not7cd could you do that? 😉 |
193858d
to
aa004b9
Compare
This PR introduces Surface Vehicle controllers for position and attitude. Attitude is based on UUV controller, while position is written from scratch. This is all work in progress. This vehicle uses 6DOF frame without roll, pitch and thrust in Z axis. And uses 4 engines in OmniX configuration.
As of now, I'm able to drive it manually proving that control allocation works, and minimal modification of PID control was needed for uuv_att_control to adapt it. Position control is not implemented.
Alternatives
Refactor rover_pos_controller to be more generic, disable so-called L1 control.
Extend uuv_pos_controller to implement more vehicle modes.
Test coverage
Context
Driving omni vehicles - Discussion Forum, for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink