Skip to content

PlayMotion2

Overview

play_motion2_msgs provides the ROS 2 interface types (messages, services, and actions) used by PlayMotion2, a system for executing pre-recorded motions on a robot.

Messages

play_motion2_msgs/msg/Motion

Represents a motion definition consisting of metadata and joint targets over time.

Field Type Description
key string Motion identifier key
name string Human-readable name
usage string Short usage hint
description string Longer description
joints string[] Joint names
positions float64[] Target joint positions
times_from_start float64[] Time (s) from motion start per point

Services

play_motion2_msgs/srv/AddMotion

Add a motion to the motion database.

Request

Field Type Description
motion play_motion2_msgs/Motion Motion to add
overwrite bool Overwrite if key already exists

Response

Field Type Description
success bool Whether the motion was stored

play_motion2_msgs/srv/GetMotionInfo

Retrieve a motion definition by key.

Request

Field Type Description
motion_key string Key of the requested motion

Response

Field Type Description
motion play_motion2_msgs/Motion Retrieved motion

play_motion2_msgs/srv/ListMotions

List available motion keys.

Request
(empty)

Response

Field Type Description
motion_keys string[] Available motion keys

play_motion2_msgs/srv/RemoveMotion

Remove a motion by key.

Request

Field Type Description
motion_key string Key of the motion to remove

Response

Field Type Description
success bool Whether the motion was removed

play_motion2_msgs/srv/SaveMotion

Save a motion to a file.

Request

Field Type Description
motion_key string Key of the motion
filepath string Destination file path

Response

Field Type Description
success bool Whether saving succeeded

play_motion2_msgs/srv/IsMotionReady

Check whether a motion is ready to be executed.

Request

Field Type Description
motion_key string Key of the motion

Response

Field Type Description
is_ready bool Whether the motion is executable

play_motion2_msgs/srv/IsJointListReady

Check whether a set of joints is ready.

Request

Field Type Description
joints string[] Joint names

Response

Field Type Description
is_ready bool Whether the joints are ready

Actions

play_motion2_msgs/action/PlayMotion2

Execute a stored motion.

Goal

Field Type Description
motion_name string Motion name/key
skip_planning bool Skip planning if supported

Result

Field Type Description
success bool Whether execution succeeded
error string Error message if failed

Feedback

Field Type Description
current_time builtin_interfaces/Time Current execution time

play_motion2_msgs/action/PlayMotion2Raw

Execute a motion provided inline.

Goal

Field Type Description
motion play_motion2_msgs/Motion Motion definition
skip_planning bool Skip planning if supported

Result

Field Type Description
success bool Whether execution succeeded
error string Error message if failed

Feedback

Field Type Description
current_time builtin_interfaces/Time Current execution time

Stability

This API is considered stable within a major release. Breaking changes are documented in release notes.