ROS Packages

The ROS interface exposed for integration is the gather_motor module.

Use it when a separately provisioned integrator robot requires ROS-native topics and services instead of the Gather Python wrapper.

The prepared developer gather-sdk bundle does not include ROS packages. This guide applies only to an integrator robot where an instructor or platform administrator has separately installed the ROS workspace.

Start Motor Server

source /opt/ros/humble/setup.bash
source <instructor-provided-ros-workspace>/install/setup.bash
ros2 launch gather_motor motor_server.launch.py

Direct node invocation also works:

ros2 run gather_motor motor_server --ros-args -p ip_address:=192.168.4.4

The installed workspace path is deployment-specific. Do not build or copy ROS packages into ~/gather-sdk.

Primary Topics

Published by motor server

  • /motor/engaged (std_msgs/msg/Bool)
  • /motor/estop_engaged (std_msgs/msg/Bool)
  • /motor/button_states (gather_motor/msg/ButtonStates)

Subscribed by motor server

  • /cmd_vel (geometry_msgs/msg/Twist)
  • /motor/enable (std_msgs/msg/Bool)

Parameters

The default config is installed at share/gather_motor/config/motor_server.yaml.

  • ip_address: controller address, default 192.168.4.4
  • port: controller service port, default 502
  • max_linear_velocity, max_angular_velocity: velocity clamps
  • max_linear_accel_mps2, max_angular_accel_mps2, decel_to_zero_multiplier: slew limiting
  • cmd_timeout_sec: zero velocity timeout
  • button_poll_hz: service button/E-stop poll rate

Command Examples

# Enable motors
ros2 topic pub /motor/enable std_msgs/msg/Bool '{data: true}'
 
# Move forward slowly
ros2 topic pub /cmd_vel geometry_msgs/msg/Twist '{linear: {x: 0.2}, angular: {z: 0.0}}'
 
# Stop
ros2 topic pub /cmd_vel geometry_msgs/msg/Twist '{linear: {x: 0.0}, angular: {z: 0.0}}'
 
# Check E-stop state
ros2 topic echo /motor/estop_engaged

Services

/motor/set_lights (gather_motor/srv/SetLights)

ros2 service call /motor/set_lights gather_motor/srv/SetLights '{green: true}'

/motor/reset_service_buttons (gather_motor/srv/ResetServiceButtons)

ros2 service call /motor/reset_service_buttons gather_motor/srv/ResetServiceButtons '{indices: [0, 1]}'
  1. Start motor server.
  2. Verify /motor/estop_engaged is false.
  3. Publish /motor/enable with true.
  4. Send low-speed /cmd_vel command.
  5. Publish zero velocity to stop.

Safety Guidance

  • Never bypass physical E-stop workflow.
  • Robot.safety_status().estop_ok means the E-stop circuit reports healthy; ROS /motor/estop_engaged is inverted and means motion inhibit.
  • Validate stop behavior before higher-speed operation.