mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 00:30:50 +08:00
refactor(rover): split position control into position and course control
The course setpoint of Guided Course went straight to the position controller, which mixed path following with course and speed control. A separate course controller between the position controller and the attitude and speed controllers lets any source command a course, also without a speed setpoint: with a NaN speed the speed controller is deactivated and the heading is turned so that the thrust commanded elsewhere drives along the course (mecanum aligns its x/y thrust direction with it). The last valid course is held until NaNs are received, and the controllers are reset on every mode change. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Ubuntu <michael-fritsche@MichaelFritscheG14.galaxus.box>
This commit is contained in:
1 parent
1687722479
commit
500bd9fa33
28 files changed
+1201
-320
No files matched your search
@@ -1,17 +1,16 @@
|
||||
# Surface Vehicle Course Setpoint
|
||||
#
|
||||
# Course setpoint for surface vehicles, on land or on water (rovers, boats).
|
||||
# Consumed by the position controllers of rover_ackermann, rover_differential and
|
||||
# rover_mecanum, which turn it into speed and attitude setpoints.
|
||||
# Published by the Guided Course mode of rover_ackermann, rover_differential and rover_mecanum,
|
||||
# and can be sent from ROS 2 over uXRCE-DDS (/fmu/in/surface_vehicle_course_setpoint).
|
||||
# Published by the position controllers of rover_ackermann, rover_differential and rover_mecanum (pure
|
||||
# pursuit towards the target) and by their Guided Course mode. Can be sent from ROS 2 over uXRCE-DDS
|
||||
# (/fmu/in/surface_vehicle_course_setpoint).
|
||||
# Consumed by the course controllers of these modules, which turn it into attitude and speed setpoints.
|
||||
# The vehicle tries to track the course over ground, as with the fixed-wing course hold: vehicles
|
||||
# that steer by heading correct their heading by the estimated drift angle; omnidirectional vehicles drive
|
||||
# along the course setpoint directly. There is no desired track, so a sideways offset is not
|
||||
# corrected. To follow a desired track, publish surface_vehicle_position_setpoint instead.
|
||||
# The position controller follows whichever of the two was published most recently.
|
||||
|
||||
uint64 timestamp # [us] Time since system start
|
||||
float32 course # [rad] [@range -pi, pi] [@frame NED] [@invalid NaN No course; the position controller stays idle] Course over ground to hold
|
||||
float32 speed # [m/s] [@range -inf, inf] [@invalid NaN Defaults to maximum speed] Cruising speed; a negative value drives the vehicle in reverse (rear first) along the course
|
||||
float32 course # [rad] [@range -pi, pi] [@frame NED] [@invalid NaN No course. The last valid course is controlled until a NaN course is received. With a speed, the speed is still commanded (rover_ackermann and rover_differential keep the current heading, rover_mecanum drives along its body x axis); with NaN speed too, the course controller stops] Course over ground to hold
|
||||
float32 speed # [m/s] [@range -inf, inf] [@invalid NaN Speed not controlled: the speed controller is deactivated, and the heading is turned so that an external thrust commanded (surface_vehicle_thrust_setpoint) drives along the course: the sign of x gives forwards or reverse, rover_mecanum also aligns any x/y thrust direction with the course] Cruising speed; a negative value drives the vehicle in reverse (rear first) along the course
|
||||
float32 yaw # [rad] [@range -pi, pi] [@frame NED] [@invalid NaN Not considered] Currently unused. Only for omnidirectional vehicles: vehicle yaw while holding the course.
|
||||
Reference in new issue
Block a user