Skip to content

Tutorial: Stretch Body Command Line Tools

Stretch Body includes the package hello-robot-stretch-body-tools - a suite of command line tools that allow direct interaction with hardware subsystems.

These tools are useful when developing and debugging applications. They also serve as code examples when developing applications for Stretch_Body.

These tools can be found by tab completion of 'stretch_' from a terminal.


All tools accept the '--help' flag as a command line argument to describe its function. For example: --help


For use with S T R E T C H (R) RESEARCH EDITION from Hello Robot Inc.

usage: [-h] [--cliff] [--at_cliff] [--voltage] [--current] [--temp] [--ax] [--ay] [--az] [--mx] [--my] [--mz] [--gx] [--gy] [--gz] [--roll] [--pitch] [--heading] [--bump]

Visualize Pimu (Power+IMU) board data with an oscilloscope

optional arguments:
  -h, --help  show this help message and exit
  --cliff     Scope base cliff sensors
  --at_cliff  Scope base at_cliff signal
  --voltage   Scope bus voltage (V)
  --current   Scope bus current (A)
  --temp      Scope base internal temperature (C)
  --ax        Scope base accelerometer AX
  --ay        Scope base accelerometer AY
  --az        Scope base accelerometer AZ
  --mx        Scope base magnetometer MX
  --my        Scope base magnetometer MY
  --mz        Scope base magnetometer MZ
  --gx        Scope base gyro GX
  --gy        Scope base gyro GY
  --gz        Scope base gyro GZ
  --roll      Scope base imu Roll
  --pitch     Scope base imu Pitch
  --heading   Scope base imu Heading
  --bump      Scope base imu bump level

Commonly Used Tools

These are the tools a typical user is expected to interact with regularly and would benefit from becoming familiar with.

Tool Utility Commonly run after booting up the robot in-order to calibrate the joints Scans for all hardware devices and ensures they are present on the bus and reporting valid values. Useful to verify that the robot is in good working order prior to commanding motion. It will report all success in green, failures in red. Useful to return the robot arm and tool to a safe position within the base footprint. It can also be useful if a program fails to exit cleanly and the robot joints are not backdriveable. It will restore them to their 'Safety' state. Quick way to check the battery voltage / current consumption Useful to quickly test if a robot can achieve a task by manually teleoperating the robot Resets all Dynamixels in the robot, which might be necessary if a servo overheats during use and enters an error state.

Take a minute to explore each of these tools from the console.

All materials are Copyright 2022 by Hello Robot Inc. Hello Robot and Stretch are registered trademarks.