-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Implement a boat position controller for a bi-motor catamaran #22915
base: main
Are you sure you want to change the base?
Conversation
…al drive control allocation
# Conflicts: # ROMFS/px4fmu_common/init.d/rc.rover_differential_apps
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/rc-speed-boat-with-px4-episode-1-using-px4-to-control-the-boat/28429/11 |
Hey @r0n4n awesome job! I'll take a look at it, I am currently also working on a boat module, but the boat type is a bit different. You are using a sort of differential control and our boat is controlled using thrust vectoring. Not sure if we will share a module yet, so we will probably have to adjust the naming a bit from just boat. Maybe boat_vector_thrust & boat_differential 🤔 not sure yet. |
@@ -239,6 +239,7 @@ ControlAllocator::update_effectiveness_source() | |||
break; | |||
|
|||
case EffectivenessSource::ROVER_DIFFERENTIAL: | |||
tmp = new ActuatorEffectivenessRoverDifferential(); |
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 would not bring back the differential rover control allocation but rather have a differential boat CA_AIRFRAME
and directly publish to the actuator functions like it's done for differential rovers here:
Lines 63 to 67 in 8ceeda7
actuator_motors_s actuator_motors{}; | |
actuator_motors.reversible_flags = _param_r_rev.get(); // should be 3 see rc.rover_differential_defaults | |
wheel_speeds.copyTo(actuator_motors.control); | |
actuator_motors.timestamp = now; | |
_actuator_motors_pub.publish(actuator_motors); |
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.
Thank you for your comment @MaEtUgR ! I used the differential rover control allocation because the control allocation is exactly the same for my boat and it's pretty convenient to only deal with thrust and torque.
Why the control allocation is not used for the differential rover ? Is it to ensure an accurate posisitionning ?
I can reuse the differential rover control allocation and create a new CA_AIRFRAME for the differential boat if it's fine for you.
Yes actually I was not sure about the naming convention. I was wondering if we could have a common module for boats in general like for multicopters. But as the control looks significantly different between architectures I'm not sure if it's possible. However, while I was coding the controller for this boat I realized that the positionning strategy was closed to the differential rover :
I'm not sure if the requirements are exactly the same for the rover and the boat during the position change. But maybe we can use a common function for that. |
…Mavlink interface
Solved Problem
There is no position controller for boat
Solution
Create a new boat configuration and implement a position controller.
The controller is mostly implemented for a bi-motor catamaran but is designed to handle several boat configurations.
This configuration has two bi-directionnal motors located under the floats of the catamaran.
The direction of the boat is controlled using the differential speed of motors.
This feature is closely linked to the rover differentialdrive guidance
Changelog Entry
For release notes:
Alternatives
Any ideas ?
Test coverage
Context
Bi-motor catamaran prototype
