-
Notifications
You must be signed in to change notification settings - Fork 1.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
Differential Drive Documentation #3133
base: main
Are you sure you want to change the base?
Conversation
Oops, thank you GitHub Actions Bot 👍 |
|
||
In manual mode, the left and right joystick/stick inputs directly control (open-loop) the rover's forward speed and yaw rate (rotation rate), respectively. The rover does not attempt to maintain a specific position or heading but instead responds directly to the user's inputs, without any closed-loop feedback control. | ||
|
||
![Rover Manual Sticks](../../assets/flight_modes/manual_differential_rover_new.png) |
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.
Diagram looks great. What did you use to generate it? What I normally do is use online software and share the link to the editable version as an HTML comment below or sometimes I ALSO export an SVG file - since that makes editing easier.
All obey the bot. |
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.
Great push, nice drawings, good content!
@@ -0,0 +1,83 @@ | |||
# Differential Drive Rover Configuration & Tuning | |||
|
|||
This is the configuration document for a [Differential Drive Rover](../airframes/airframe_reference.md#rover_rover_aion_robotics_r1_ugv), this rover type is very similar to also known as "Tank Drive & Skid Steer". This type of rover control type is essentially what you would find in a modern robot vacuum cleaner, also known as a "Roomba". |
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 is the configuration document for a [Differential Drive Rover](../airframes/airframe_reference.md#rover_rover_aion_robotics_r1_ugv), this rover type is very similar to also known as "Tank Drive & Skid Steer". This type of rover control type is essentially what you would find in a modern robot vacuum cleaner, also known as a "Roomba". | |
This is the configuration document for a [Differential Drive Rover](../airframes/airframe_reference.md#rover_rover_aion_robotics_r1_ugv). The actuation principle of this rover type is also known as "tank drive" or "skid steer", and is for example common for indoor vacuum cleaner. |
|
||
- `RDD_MAX_JERK`: This parameter limits the rate of change of acceleration/deceleration, resulting in smoother motion profiles and reducing the risk of sudden jerks or oscillations. | ||
|
||
- `RDD_MAX_ACCEL`: This parameter sets the maximum acceleration (in meters per second squared) for the rover, limiting the rate at which the rover can increase or decrease its speed. |
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 either use the unit for all params or leave it away here.
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.
And those params don't seem to exist, or at least the bot isn't finding them
|
||
- `RDD_MAX_ACCEL`: This parameter sets the maximum acceleration (in meters per second squared) for the rover, limiting the rate at which the rover can increase or decrease its speed. | ||
|
||
Proper configuration of these parameters is essential for achieving the desired performance and stability of the Differential Drive Rover. The geometric parameters define the rover's physical characteristics, while the speed parameters control the maximum attainable velocities. The control gains dictate the responsiveness and accuracy of the control system, and the motion constraints ensure smooth and safe operation. |
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.
Proper configuration of these parameters is essential for achieving the desired performance and stability of the Differential Drive Rover. The geometric parameters define the rover's physical characteristics, while the speed parameters control the maximum attainable velocities. The control gains dictate the responsiveness and accuracy of the control system, and the motion constraints ensure smooth and safe operation. | |
Proper configuration of these parameters is essential for achieving the desired performance and stability of rover drive control. The geometric parameters define the rover's physical characteristics, while the speed parameters control the maximum attainable velocities. The control gains dictate the responsiveness and accuracy of the control system, and the motion constraints ensure smooth and safe operation. |
|
||
- `speed` (float32): Collective roll-off speed in body x-axis [m/s] | ||
- `closed_loop_speed_control` (bool): True if speed is controlled using estimator feedback, false if direct feed-forward | ||
- `yaw_rate` (float32): Yaw rate [rad/s] |
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 wonder if we generally should use "turning rate" instead of "yaw rate" for rovers? How is it done in literature that you found?
As generally it's pretty clear around which axis you turn a rover, and not all rover operators may be familiar with Euler angles.
- `yaw_rate` (float32): Yaw rate [rad/s] | ||
- `closed_loop_yaw_rate_control` (bool): True if yaw rate is controlled using gyroscope feedback, false if direct feed-forward | ||
|
||
Regardless of the source (manual, mission, or ROS2), the setpoints (`v, ω, flags`) are sent through the `DifferentialDriveSetpoint` message to the PI controllers. The controlled setpoints (`v', ω'`) are then passed to the inverse kinematics module, which calculates the wheel angular velocities (`θl, θr`) for the left and right wheels, respectively. These wheel angular velocities are used to control the left and right 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.
Regardless of the source (manual, mission, or ROS2), the setpoints (`v, ω, flags`) are sent through the `DifferentialDriveSetpoint` message to the PI controllers. The controlled setpoints (`v', ω'`) are then passed to the inverse kinematics module, which calculates the wheel angular velocities (`θl, θr`) for the left and right wheels, respectively. These wheel angular velocities are used to control the left and right motors. | |
Regardless of the source (manual, mission, or ROS2), the setpoints (`v, ω, flags`) are sent through the `DifferentialDriveSetpoint` message to the PI (Proportional- Integral) controller. The controlled setpoints (`v', ω'`) are then passed to the inverse kinematics module, which calculates the wheel angular velocities (`θl, θr`) for the left and right wheels, respectively. These wheel angular velocities are used to control the left and right motors. |
| Parameter | Description | | ||
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
|
||
| <a id="RRD_SPEED_SCALE"></a>[RRD_SPEED_SCALE](../advanced_config/parameter_reference.md#RRD_SPEED_SCALE) | Scales the speed output of the rover by multiplying it with this parameter to adjust for too high manual open-loop speeds. | |
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 think this param description is a bit rough, at least I don't fully get it.
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 all docs in guides, assume your user knows very little indeed and adjust your terminology appropriately.
Also applies to diagrams - for example, if you use a symbol, define it. You can't assume they will assume "v" is velocity or whatever.
For this case I don't know what an open-loop speed is. What are the symptoms? How do you tune it? (You might have explained this elsewhere.
- This mode requires a global 3d position estimate (from GPS or inferred from a [local position](../ros/external_position_estimation.md#enabling-auto-modes-with-a-local-position)). | ||
- The vehicle must be armed before this mode can be engaged. | ||
- This mode is automatic - no user intervention is _required_ to control the vehicle. | ||
- RC control switches can be used to change flight modes on any vehicle. |
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 don't think this comment is necessary. You can also change the mode through a mavlink command e.g.
## Description | ||
|
||
Missions are usually created in a ground control station (e.g. [QGroundControl](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/plan_view/plan_view.html)) and uploaded prior to launch. | ||
They may also be created by a developer API, and/or uploaded in flight. |
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.
They may also be created by a developer API, and/or uploaded in flight. | |
They may also be created by a developer API, and can be updated when armed (the vehicle will have to switch out of Mission mode though). |
|
||
PX4 expects to follow a straight line from the previous waypoint to the current target (it does not plan any other kind of path between waypoints - if you need one you can simulate this by adding additional waypoints). | ||
|
||
An Ackermann Rover will follow a smooth rounded curve towards the next waypoint (if one is defined) defined by the acceptance radius ([NAV_ACC_RAD](../advanced_config/parameter_reference.md#NAV_ACC_RAD)). |
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.
An Ackermann Rover will follow a smooth rounded curve towards the next waypoint (if one is defined) defined by the acceptance radius ([NAV_ACC_RAD](../advanced_config/parameter_reference.md#NAV_ACC_RAD)). | |
An Ackermann rover will follow a smooth rounded curve towards the next waypoint (if one is defined) defined by the acceptance radius ([NAV_ACC_RAD](../advanced_config/parameter_reference.md#NAV_ACC_RAD)). |
|
||
Vehicles switch to the next waypoint as soon as they enter the acceptance radius ([NAV_ACC_RAD](../advanced_config/parameter_reference.md#NAV_ACC_RAD)). | ||
|
||
## Differential Rover: Stop, Turn, Drive |
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.
As you already highlight it before in the Ackermann section, also say here whether the rover tracks the path between two waypoints or goes always directly to the waypoint.
Note, I have only fly-by looked at this. I'll review when you ask for it or it goes out of draft. |
ddadb1e
to
51d8fa9
Compare
51d8fa9
to
81429cb
Compare
@PerFrivik I assume the module is not going into PX4 v1.15? Keep me posted when you need a review. |
81429cb
to
54a7657
Compare
@PerFrivik This feels a bit stalled :-(. Note, there is a "related PR" for a ackermann in #3265 |
/en/flight_modes_rover/manual_rover.md
/en/flight_modes_rover/mission_rover.md
/en/config_rover/configure_rover_differential.md
|
@chfriedrich98 Do we still need this documentation? |
@hamishwillee Could we leave this PR up until #3311 is merged? |
Of course! |
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-v1-15-public-changes-what-needs-docs/39850/10 |
Documentation for the Rover Differential Drive module in PX4.
This documentation needs to wait for one or two PX4 PR's before we can merge this documentation, as it is based on some changes that I want to implement based on user feedback (