Skip to Content
Teleoperating the armInterface reference

Interface reference

One ROS 2 package, rammp_teleop, with one launch file per input. Every teleop node is a client of kinova_gen3_node’s streaming tier; the arm driver must already be running.

Topics

Published by every teleop node:

TopicTypeNotes
/setpoint/twistrammp_arm_interfaces/TwistSetpointtool twist, arm_mount frame, every tick while the stream is open (Xbox & SpaceMouse ee_twist)
/setpoint/joint_velocityrammp_arm_interfaces/JointSetpointseven joint velocities instead of the twist (Xbox, joint_velocity)
/setpoint/poserammp_arm_interfaces/PoseSetpointabsolute tool pose, arm_mount frame, every tick while the stream is open (Quest)
/setpoint/gripperrammp_arm_interfaces/GripperSetpointon change, carrying the arm’s token
/estoprammp_common_interfaces/EStopon button press (not on SpaceMouse)

Published by quest_reader only:

TopicTypeNotes
/quest/<hand>/posegeometry_msgs/PoseStampedraw controller pose in the headset tracking frame, frame_id: quest
/quest/joysensor_msgs/Joyaxes = [index trigger 0..1], buttons = [grip, A, B] ([grip, X, Y] for the left hand)

Subscribed:

TopicTypeUsed for
/ee_staterammp_arm_interfaces/EeStateseeding the target (Quest); driver-alive check (Xbox & SpaceMouse ee_twist)
/joint_statessensor_msgs/JointStatedriver-alive check (Xbox joint_velocity)
/gripper_staterammp_arm_interfaces/GripperStateseeding the gripper target
/stream_statusrammp_arm_interfaces/StreamStatusnoticing a stream the driver closed
/control_statusrammp_common_interfaces/ControlStatusnoticing lost or seized ownership, e-stop
/joysensor_msgs/JoyXbox only, from joy_node
/quest/<hand>/pose, /quest/joysee aboveQuest only, from quest_reader

Services and actions used

/acquire_control, /list_controllers, /open_stream, /close_stream, /release_control. Note that acquire seizes: do not start a teleop node while an orchestrator owns the arm.

/go_to_joint_config (action, Xbox Back held for home_hold_s): the node closes its stream, sends home_joints with its token, and the driver’s planner drives the arm. The move is hold-to-run: releasing Back, or any stick, D-pad or trigger input, cancels the goal. The next engage reopens the stream.

Session behaviour

  1. Wait for /ee_state (or /joint_states) so the driver is known to be up and a pose target can start from reality.
  2. /acquire_control with owner_id -> token, stamped on every setpoint.
  3. /list_controllers -> the selected controller must be available; its channel names the setpoint topic relative to /setpoint/ (pose -> /setpoint/pose).
  4. Create the setpoint publisher and wait for the driver to subscribe (DDS discovery must settle before the stream opens, or the first setpoints go nowhere and the session expires).
  5. /open_stream {controller, timeout_s, token}.
  6. Publish the target every tick, also while the operator is idle, so the arm holds and the session stays alive.
  7. On SIGINT/SIGTERM: /close_stream, /release_control.

Recovery: an e-stop or /revoke_control clears ownership and tears down the session. The node sees it on /control_status and /stream_status; the next engage re-acquires (only if nobody else owns the arm) and reopens the stream.

Setpoint QoS is BEST_EFFORT / KEEP_LAST / depth 1. stream_timeout_s must exceed 1 / rate_hz.

Xbox controls

The sticks are streamed as velocities: a base-frame tool twist on ee_twist, or one joint’s rate on joint_velocity. The driver’s velocity mode integrates them, so there is no target to run ahead of the arm. The self-centering sticks are the deadman: zero velocity is streamed whenever they are at rest, and the driver also commands zero if the stream goes stale. The gripper is the one position target; it is re-seeded from the measured gripper state on every deflected/released edge.

ee_twist has two modes, toggled with X while the sticks are at rest (a press mid-deflection is refused so a translation cannot turn into a rotation): translate (default) and rotate. All rotations are about the base axes.

Inputee_twist translateee_twist rotatejoint_velocity
Left stick up/down+x / -x (base frame)pitch about y (up = nose up)jog selected joint +/-
Left stick left/right+y / -yroll about x
Right stick up/down+z / -z
Right stick left/rightyaw about +z (left = CCW)yaw about +z
D-pad up/downpitch about y
D-pad left/rightroll about xprevious / next joint
RT / LTclose / open gripper (incremental)samesame
Xswitch to rotateswitch to translate
Backhold 2 s: go to home_joints; release = stopsamesame
Bpublish /estop state: ENGAGEDsamesame
Startpublish /estop state: NOT_ENGAGEDsamesame
Yre-seed the gripper from measured statesamesame

The twist is expressed in arm_mount (world-aligned at the tool), matching TwistSetpoint’s frame and /ee_state’s LOCAL_WORLD_ALIGNED convention. arm_mount has Z against gravity when the chair is level; on a tilted mount it is not the arm’s base_link.

Start releases only a stop this node engaged (its source, xbox_teleop): the arm keeps a stop per source. On the chair the MIB owns the latch.

Joy layout this was written against (Xbox Series X over USB, ros-humble-joy 3.3): axes [LX, LY, LT, RX, RY, RT, DpadX, DpadY] with sticks +1 = left/up and triggers +1 = released; buttons [A, B, X, Y, LB, RB, Back, Start, Guide, LS, RS, Share]. All indices are parameters if your pad differs.

Quest controls

InputAction
Grip squeezeclutch: hold to move; the controller’s motion from the squeeze is applied to the EE pose from the squeeze
Index triggergripper, analog 0..1 (or binary with gripper_binary)
Are-seed: forget the freeze target and references (next squeeze re-captures)
Bpublish /estop state: ENGAGED

There is no e-stop clear on the headset. Without a MIB, release it under the source that engaged it (the pad’s Start does not, it is a different source): ros2 topic pub --once /estop rammp_common_interfaces/msg/EStop "{state: 0, source: quest_teleop}".

Translation is always base frame. Rotation acts about base axes (rot_frame: base) or the tool’s own axes (rot_frame: tool). Controller jumps larger than jump_pos_tol / jump_rot_tol per tick are dropped. The target is clamped to the workspace box, then rate-limited to max_lin_step / max_ang_step per tick. When released, the last safe target is held (not the measured pose, which sags on a compliant controller).

SpaceMouse controls

The puck is streamed as a base-frame tool twist on ee_twist, similar to the Xbox controller but allowing for control over six axes at once (this no need to toggle modes). The puck itself serves as the deadman, with a zero twist streamed whenever the puck returns to rest or the puck input becomes stale.

InputAction
Push / pull+x / -x
Slide left / right+y / -y
Lift / press+z / -z
Tilt forwards / backwardsroll end-effector about +x
Tilt left / rightpitch end-effector about +y
Twistyaw end-effector about +z
Left button (hold)close gripper
Right button (hold)open gripper

Note that the gripper is controlled incrementally, as releasing the L/R button will stop the gripper in its current position.

Due to the lack of buttons,there is no e-stop, home or re-seed button.

Parameters

xbox_teleop (config/xbox.yaml)

ParameterDefaultMeaning
controlleree_twistee_twist, joint_velocity
owner_idxbox_teleopname sent to /acquire_control
rate_hz / stream_timeout_s50 / 0.2publish rate and open_stream deadline
joy_topic/joy
deadzone0.15stick deadzone, rescaled so full deflection still gives max speed
joy_timeout_s0.5no /joy for this long => sticks read as neutral, arm holds
max_linear_speed / max_angular_speed0.08 m/s / 0.45 rad/stwist at full stick (ee_twist)
max_joint_speed0.2 rad/sjoint rate at full stick (joint_velocity)
gripper_speed1.0full travel per second at full trigger
gripper_cmd_speed / gripper_force0.5 / 0.3GripperSetpoint.speed / .force
home_joints7 zerosjoint_1..joint_7 (rad) for Back; read off /joint_states
home_hold_s2.0how long Back must be held before homing starts
axis_*, button_*see filejoy indices; button_mode (X) toggles translate / rotate, button_home (Back) homes
state_wait_timeout_s10give up if no arm state arrives
reopen_interval_s1.0throttle for reopen / re-acquire attempts

quest_teleop (config/quest.yaml)

ParameterDefaultMeaning
controlleree_pose_impedanceor ee_pose_position
rate_hz / stream_timeout_s60 / 0.2
handrightwhich controller
input_timeout_s0.5no /quest/* for this long => grip reads as released
r_align_euler_zyx_degper sessioncontroller-frame to base-frame rotation; see Calibration
trans_smooth / rot_smooth0.8first-order lag on the command, (0, 1]; 1.0 = raw
jump_pos_tol / jump_rot_tol0.05 m / 0.5 radper-tick jump rejection
pos_scale1.0controller motion to EE motion
rot_frame / r_tool_euler_zyx_degbase / [0,0,0]rotation frame and controller-body to tool-body axes (tool mode)
ws_min / ws_maxsee fileworkspace box, base frame, m
max_lin_step / max_ang_step0.01 m / 0.05 radper tick (0.6 m/s, 3 rad/s at 60 Hz)
gripper_binary / gripper_thresholdfalse / 0.5
calib_hold_s2.0hold A this long to arm in-session calibration
r_align_file""where calibration persists (JSON); overrides the YAML triple when present
gripper_cmd_speed / gripper_force0.5 / 0.3
button_grip / button_resync / button_estop / axis_trigger0 / 1 / 2 / 0indices into /quest/joy

quest_reader

ParameterDefaultMeaning
handright
quest_ip""empty = USB; set for adb over Wi-Fi
rate_hz60
mockfalsescripted controller, no headset, no adb
frame_idquest
keep_awaketrueon connect, wake the headset and defeat its proximity sensor over adb so it keeps tracking while not worn; re-sent every connect since a reboot clears it
app_watchdog_s2.0check every N s that the headset app process is alive and relaunch it over adb if not (it dies silently and the reader would repeat the last pose forever); 0 disables

space_teleop (config/space_mouse.yaml)

ParameterDefaultMeaning
rate_hz50publish rate
joy_topic/spacenav/joy
deadzone0.08puck deadzone
max_linear_speed0.2 m/slinear speed at full deflection; config ships 0.4
max_angular_speed0.3 rad/sangular speed at full deflection; config ships 0.7
expo2.0puck-to-twist response curve; 1.0 = linear
axis_signssix 1.0per-axis flip for a mouse not square with the base

Calibration

The Quest’s tracking frame yaw depends on how the headset was oriented at boot, so R_align must be redone after every headset reboot.

In session (preferred): hold A for calib_hold_s, then squeeze the grip, move the hand ~20 cm along robot +X, release. The grip does not drive the arm while calibration is armed (the arm holds). Only the yaw is solved: the headset frame is gravity-aligned, so roll and pitch are the fixed y-up to z-up swap. The result applies immediately and is written to r_align_file when set, which then overrides r_align_euler_zyx_deg on the next start. Too short or vertical a move is rejected and can be redone; 30 s without a move times out.

Fallback, three gestures on the command line:

ros2 run rammp_teleop quest_calibrate # USB ros2 run rammp_teleop quest_calibrate --quest-ip <quest-ip>

Move the hand forward, left and up as prompted; paste the printed triple into config/quest.yaml (or pass a params_file).

Hardware-free

ros2 launch rammp_teleop quest.launch.py mock:=true

quest_reader replays a scripted engage / move / grip / release loop, so the whole pipeline can be exercised against a simulated or mock arm.

Edit this page on GitHub