Skip to content
ROS Discourse — Community updates· tcapp·· 2 days agoSignalEditorial score75

Introducing spot_basic: A simpler interface for Spot in ROS 2

Introducing spot_basic: A simpler interface for Spot in ROS 2

Summary

The RAI Institute has released spot_basic, an open-source Python library designed to simplify interaction with Boston Dynamics' Spot robots within the ROS 2 framework. Built on top of the existing spot_ros2 driver, this tool provides a higher-level API that supports both synchronous and asynchronous programming models. Key features include simplified commands for locomotion and manipulation, intuitive access to robot state and sensor data (such as camera streams), and runnable examples for extending functionality. The project aims to reduce boilerplate code required when working with Spot's various topics, services, and actions, making it easier for developers to integrate the robot into their workflows.

Editorial context

The RAI Institute released spot_basic, an open-source Python library that wraps the spot_ros2 driver to simplify interaction with Boston Dynamics' Spot robots in ROS 2 through synchronous and asynchronous APIs for locomotion, manipulation, and sensor access.

Source: ROS Discourse — Community updates · Read original article ↗

Article text · Original source · English

We’re excited to share another open-source project from the RAI Institute: spot_basic!

Working with Spot through ROS 2 can involve quite a bit of boilerplate, especially when interacting with the various topics, services, and actions exposed by the driver. spot_basic aims to make this easier by providing a higher-level, intuitive Python API for interacting with Spot’s capabilities.

Built on top of our spot_ros2 driver, spot_basic wraps the underlying ROS 2 interfaces into a consistent API that supports both synchronous and asynchronous programming. Some highlights include:

  • Simplified robot commands: Easily execute commands for locomotion, manipulation, gripper control, and more.

  • State and sensor access: Intuitive APIs for querying robot state, accessing transforms, and streaming camera data.

  • Synchronous and asynchronous execution: Write straightforward sequential code or run operations asynchronously.

  • Examples and extensibility: Includes runnable examples and guides for extending the API with new commands and actions.

For example, here’s a snippet that gets Spot up and walking forward:

from spatialmath import SE2
from spot_basic import SpotBasic

spot = SpotBasic("spot")

with spot.leash():
    world_t_robot = spot.lookup_a_tform_b(
        spot.vision_frame_name,
        spot.body_frame_name
    ).yaw_SE2()

    world_t_goal = world_t_robot * SE2(1.0, 0.0, 0.0)
    spot.walk.synchronously(frame_t_goal=world_t_goal)

Check out the repository for installation instructions, documentation, and more examples:

GitHub: GitHub - rai-opensource/spot_basic: This package provides libraries and tools that make it easier to work with Boston Dynamics' Spot robots from ROS 2. · GitHub

Thanks to everyone who has contributed to this project including @hidmic @khughes1 @jbarry @taughz!

As always, feedback, bug reports, and contributions are welcome!

— The RAI Institute

Note: this works great with spatial-math!

What the source reports

Publisher-reported claims, with original evidence. These results have not been independently verified by RoboSignal.

  • paper: not_reported
Source excerpts and review record

Automatically extracted; no manual editorial approval recorded.

frame_name, spot.body_frame_name ).yaw_SE2() world_t_goal = world_t_robot * SE2(1.0, 0.0, 0.0) spot.walk.synchronously(frame_t_goal=world_t_goal) Check out the repository for installation instructions, documentation, and more examples: GitHub: GitHub - rai-opensource/spot_basic: This package provides libraries and tools that make it easier to work with Boston Dynamics' Spot robots from ROS 2. · GitHub Thanks to every

Open source S5

Source:ROS Discourse — Community updates · discourse.openrobotics.org

Timezone · UTC

Article dates follow your selected timezone. Briefing editions use Hong Kong time (UTC+8).