Overview
This package provides robot description and mesh files for Stretch 4, as well as code for manipulating the kinematic description (e.g. adding virtual joints) and exporting for use in other programs (e.g. ROS2, pinocchio). The repository for Stretch 3 and earlier hardware versions can be found in stretch_urdf. This package can be installed by:
python3 -m pip install -U hello-robot-stretch4-urdf
Details
The URDF and meshes are installed to your Python site directory. You can load them dynamically using:
Currently supported options for the model_name, batch_name, and tool_name are:
A single composable xacro combines a robot's base model with its attached tool. Util functions will handle processing the xacro file and return the URDF for the robot's current configuration:
You can also load accessory URDFs via:
Utility methods are provided to extract 4x4 coordinate transforms:
Tools
URDF Visualization
The stretch_urdf_viz tool allows you to visualize the robot's URDF in Rerun.
By default, the tool will visualize the robot's nominal (uncalibrated) URDF. If the robot has been calibrated, the calibrated URDF will be automatically overlaid in green.
Key features:
Calibrated vs Uncalibrated: Automatically shows both if calibration data is available.
Toggles: Meshes, coordinate frames (TFs), and labels are organized into separate trees in Rerun, allowing them to be toggled on/off easily to reduce clutter.
Options:
--model: Specify the robot model (e.g.,SE4).--batch: Specify the robot batch (e.g.,francis).--tool: Specify the end-of-arm tool (e.g.,eoa_wrist_dw4_tool_sg4).
Bringing in URDF's from CAD
The package follows a strict directory strucutre:
The URDF and meshes from the CAD model are added to the {model}_{batch} base directory and meshes folder. From there, utils/preprocessing/process_new_robot_model.py creates the stretch_main.xacro file and necessary collision meshes for the batch. See the urdf_conventions.md for the specifics of this processing step.
A directory is created for each new tool, with the urdf in the base directory and a folder for meshes. utils/preprocessing/process_new_tool.py is then used to add the necessary edits to the urdf and generate collision meshes.
Documentation
The following files provide deeper documentation on various parts of the system:
Explains URDF batch organization, compiling the URDF dynamically, and how to add new batch models.
Outlines the available end effector tools and provides instructions on how to add new tools to the robot.
Outlines which conventions are used in the Stretch 4 URDF.
Explains how static calibration values are applied to the URDF at load time.
Tracks breaking kinematic and coordinate frame changes for Stretch 4.
Deep dive into the camera coordinate systems, mounting angles, and optical frame conventions.
Last updated
Was this helpful?
