Control Wheel
control_wheel.py
Overview
control_wheel.py is a base controller implemented as an ActionLib server. It steers the TIAGo platform toward the first waypoint of a received nav_msgs/Path using a simple proportional law, then reports success. Replace this stub’s single-shot behavior with a full trajectory tracker for production.
Interfaces (strongly-typed, stateless)
Direction |
Topic / Name |
Message type / Semantics |
---|---|---|
Publish |
|
|
Action server |
|
|
Contract
Pre-conditions
Path message contains at least one waypoint.
Action server is ready before accepting goals.
Post-conditions
Publishes exactly one Twist based on the first waypoint.
On exit, publishes a zero Twist to stop the robot.
Sets the Action state to succeeded, aborted (empty path), or preempted.
Invariants
Velocity = k_p · error with fixed k_p.
Execution is fire-and-forget: no looping over all poses.
Tuning knobs
k_p = 0.01 – proportional gain
travel_time = 2 s – simulated actuation delay
- class control_wheel.ControlMovementServer[source]
Bases:
object
ActionLib server that drives the robot toward the first waypoint.
Variables
- cmd_pubrospy.Publisher
Publishes Twist on /cmd_vel/wheel.
- serveractionlib.SimpleActionServer
Serves movement_control goals.
Workflow
Read robot_number from CLI.
Initialise <robot>_control_movement_node.
Advertise /cmd_vel/wheel.
Start SimpleActionServer on /movement_control.