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

/{robot}/cmd_vel/wheel

geometry_msgs/Twist – linear x/y velocity commands

Action server

/{robot}/movement_control

tiago1/MovementControlActionGoal: path (nav_msgs/Path) Feedback: status (string) Result: success (bool)

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

  1. Read robot_number from CLI.

  2. Initialise <robot>_control_movement_node.

  3. Advertise /cmd_vel/wheel.

  4. Start SimpleActionServer on /movement_control.

execute_cb(goal: tiago1.msg.MovementControlAction.Goal) None[source]

Execute one proportional command toward the first waypoint.

Parameters:

goal (MovementControlAction.Goal) – Contains path with a list of PoseStamped waypoints.