Skip to main content

Stretch 4 URDF

Project description

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
Stretch 4 robot model


Details

The URDF and meshes are installed to your Python site directory. You can load them dynamically using:

from stretch4_urdf import get_urdf

# configure the specifications for your robot
model_name = "SE4"
batch_name = "francis"
tool_name = "eoa_wrist_dw4_tool_sg4"

print(get_urdf(
    model_name=model_name,
    batch_name=batch_name,
    tool_name=tool_name,
))

Currently supported options for the model_name, batch_name, and tool_name are:

supported_model_names = ["SE4"]
supported_batch_names = ["francis"]
supported_tool_names = ["eoa_wrist_dw4_tool_sg4"]

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:

from stretch4_urdf import get_urdf_from_robot_params
urdf_string = get_urdf_from_robot_params() # store the urdf contents in a str variable
urdf_filepath = get_urdf_from_robot_params(out_dir="/tmp") # save the urdf to a file in the /tmp directory

You can also load accessory URDFs via:

from stretch4_urdf import get_accessory

dock_urdf = get_accessory("docking_station")
print(dock_urdf)

Utility methods are provided to extract 4x4 coordinate transforms:

from stretch4_urdf import get_transform

# Get the 4x4 transform between two frames
T_dock_to_leftaruco = get_transform(dock_urdf, frame_to="left_aruco_marker_link", frame_from="docking_station_link")
print(T_dock_to_leftaruco)

Bringing in URDF's from CAD

The package follows a strict directory strucutre:

> {model}_{batch}
    > meshes
        visual and collision mesh STL files
    > xacro
        stretch_main.xacro
> {model}_tools
    > {tool_name}
        > meshes
            visual and collision mesh STL files
        {tool_name}.urdf

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:

Primer Description
Batches Explains URDF batch organization, compiling the URDF dynamically, and how to add new batch models.
End Effectors Outlines the available end effector tools and provides instructions on how to add new tools to the robot.
URDF Conventions Outlines which conventions are used in the Stretch 4 URDF.
Calibration Explains how static calibration values are applied to the URDF at load time.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hello_robot_stretch4_urdf-2026.7.8.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hello_robot_stretch4_urdf-2026.7.8-py3-none-any.whl (3.3 MB view details)

Uploaded Python 3

File details

Details for the file hello_robot_stretch4_urdf-2026.7.8.tar.gz.

File metadata

  • Download URL: hello_robot_stretch4_urdf-2026.7.8.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for hello_robot_stretch4_urdf-2026.7.8.tar.gz
Algorithm Hash digest
SHA256 975171e0cc3c16015162e8abf5dfc0dd14964bd2df6007dc2bc8b399cb64d8e2
MD5 01fd6712c548d67870d16028d1178228
BLAKE2b-256 c21839d506f51a5926af38bf93e512207bac67636a652fc388295a4446bd6cbd

See more details on using hashes here.

File details

Details for the file hello_robot_stretch4_urdf-2026.7.8-py3-none-any.whl.

File metadata

  • Download URL: hello_robot_stretch4_urdf-2026.7.8-py3-none-any.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for hello_robot_stretch4_urdf-2026.7.8-py3-none-any.whl
Algorithm Hash digest
SHA256 cad617f803489f348c6d2b600a7a6e89bc3fa21b5715bc7c0b0e0b02d9077a8d
MD5 0296c22ddd5d92a9da4323ca574f6f8c
BLAKE2b-256 9f03192d9a7233f6d1308fcfa480d426f2473f3263b4eed3b6dcceac33ceeb47

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page