Skip to content

3. The driver: speeds to the robot ​

3.1 From a velocity to an axis command ​

x30_driver turns the mux’s cmd_vel (base_link, REP-103: x forward, y left, counter-clockwise positive) into the robot’s axis commands, streamed at 50 Hz to the motion host, only while the robot is in its stepping state and its motion report is fresh. Each axis is scaled to the maximum speed of the gait the robot walks in:

(3.1)u=round(vvmax(gait)⋅32767),|u|<655⇒u=±656

The lateral and yaw axes go out negated (the robot counts right as positive). A value inside the robot’s dead zone (|u|<655) would be ignored by the robot, so a small non-zero command goes out as the smallest value the robot moves on: the X30 creeps rather than stands.

GaitForwardBackwardSidewaysYawSlowest step forward
m/sm/sm/srad/sm/s
Walk1.20.750.150.450.024
Slope0.70.750.250.50.014
Off-road0.30.40.10.50.006
Stair0.30.30.20.80.006
Stair (multi-frame)0.60.30.20.80.012
Stair 45°0.30.20.20.80.006
L-Walk1.01.00.51.20.020
Mountain1.01.00.81.20.020

Speeds at normal body height (application manual, Appendix B); at crawl height Walk and Slope go forward at half. Run and Silent have no published speeds: the driver does not move the robot in them unless gait_limits gives them, for example gait_limits: {silent: [0.5, 0.5, 0.2, 0.5]}.

The gait limits the stack

The robot profile’s limits must hold in every gait the robot walks in during a patrol. In Off-road the X30 walks at most 0.3 m/s forward whatever the follower asks: the patrol is slower, still safe (the braking model assumed more), but the follower’s progress checks wait longer. Keep Walk for patrols, or lower cruise.

3.2 The signs of the axes ​

A wrong sign makes the robot step right when the stack means left: every avoidance and the protective field’s sideways check go wrong with it. Check once per robot, in REMOTE, with the robot standing in a free area and the handheld app closed (one source drives at a time):

bash
rosservice call /control/set_mode "{mode: remote, source: handheld}"
rostopic pub -r 10 /control/remote/handheld/cmd_vel \
  geometry_msgs/Twist '{linear: {y: 0.1}}'
  1. With the rostopic pub running, the robot must step to its left. If it steps right: invert_vy: true in driver_params.yaml.

  2. The same with '{angular: {z: 0.2}}': the robot must turn counter-clockwise (left). If not: invert_wz: true.

  3. Ctrl-C, then back to AUTO: rosservice call /control/set_mode "{mode: auto}".

3.3 Silence and stopping ​

  • cmd_timeout_sec (0.5 s) a command older than this is replaced by zeros;
  • stop_burst_sec (0.5 s) zeros streamed after motion ends, then silence (the robot itself drops an axis that falls silent for 1 s);
  • Episodes the first command after a quiet period starts an episode: the driver puts the robot into the control mode and the stepping state it needs (auto_control_mode, auto_stepping), three tries in two seconds. Nothing moves the robot after sit_down, an emergency stop, a fall or a takeover by Deep Robotics’ handheld until the command has been zero or quiet once.

The driver’s own clamps (max_vx 1.0 m/s, max_vy 0.5 m/s, max_wz 1.0 rad/s) are a last bound above the profile; the profile’s limits are the ones the stack plans with.