Package Summary

The play_motion_builder package, a node to handle the creation of new motions for play_motion.

New in Melodic


The Play Motion Builder project is an open-source tool that allows the design and creation of predefined motions for a robot, as well as an RQT-based GUI, and a Javascript library to interface with said node.

The code can be accesed at the project's GitHub page

The motions created with this project are intended to be used with the play_motion (see play_motion documentation) package, and as such the motions are stored in YAML format following that project's structure. This project (as the play_motion project) makes use of the move_it (See MoveIt page for more details) project, particularly, of the SRDF definition of the robot.


In order to use this project the node must be ran on the robot or on a simulation. The project requires that the ~robot_description_param, the ~semantic_description, and ~extra_joints_param_name parameters are properly set.

The node can be run using the command:

rosrun play_motion_builder play_motion_builder_node

Once the node is running starting the ~build action needs to be invoked in order to start creating or editing a motion. This action must remain active during the editing process.

With the action running the services ~edit_motion and ~change_joints can be used to operate with the motion being created, and the ~run action can be used to run it for testing purposes.

Finally, the ~store_motion service can be used to generate the motion code in YAML format, wither as a string or saved into a given file.

Action API

The play_motion_builder_node node provides an implementation of the SimpleActionServer (see actionlib documentation) to start and stop the creation of a motion. Another implementation of the SimpleActionServer is used to trigger an execution for the motion. To execute this motions play_motion (see play_motion documentation) is used.

Action Subscribed Topics

~build/goal (play_motion_builder_msgs/BuildMotionActionGoal)

  • A goal to start the motion creation pipeline. A motion name can be given a as a parameter to load an existing motion, or left empty to start a new one.
~build/cancel (actionlib_msgs/GoalID)
  • A request to cancel a specific goal for the build action.
~run/goal (play_motion_builder_msgs/RunMotionActionGoal)
  • A goal to start the execution of the motion. Either the complete motion (with an optional slowing parameter), or a specific Keyframe can be targeted.
~run/cancel (actionlib_msgs/GoalID)
  • A request to cancel a specific goal for the run action.
play_motion/feedback (play_motion_msgs/PlayMotionActionFeedback)
  • Feedback is empty for the play_motion action.
play_motion/status (actionlib_msgs/GoalStatusArray)
  • Provides status information on the goals that are sent to the play_motion action.
play_motion/result (play_motion_msgs/PlayMotionActionResult)
  • Result is empty for the play_motion action.

Action Published Topics

~build/feedback (play_motion_builder_msgs/BuildMotionActionFeedback)

  • Feedback is empty for the build action.
~build/status (actionlib_msgs/GoalStatusArray)
  • Provides status information on the goals that are sent to the build action.
play_motion/goal (play_motion_msgs/PlayMotionActionGoal)
  • Play Motion goals are sent to execute the motion being created.
play_motion/cancel (actionlib_msgs/GoalID)
  • A request to cancel a specific goal for the play_motion action.
~run/status (actionlib_msgs/GoalStatusArray)
  • Provides status information on the goals that are sent to the run action.
~run/result (play_motion_builder_msgs/BuildMotionActionResult)
  • Result is empty for the run action.

Subscribed Topics

joint_states (sensor_msgs/JointState)
  • Used by the play_motion_builder node to track the current joint configuration of the robot.


~change_joints (play_motion_builder_msgs/ChangeJoints)
  • Allows an external user to change the joints that will be controlled by this motion. Via this service the user can add or remove joints that do not belong to any group, or change the used group.
~edit_motion (play_motion_builder_msgs/EditMotion)
  • Allows an external user to modify the parameters of the motion being created.
~list_joint_groups (play_motion_builder_msgs/ListJointGroups)
  • Allows an external user to ask for the list of available groups and joints not belonging to any group.
~store_motion (play_motion_builder_msgs/StoreMotion)
  • Allows an external user to store the motion in play_motion compatible format, either to a file or to be returned as a string.


~robot_description_param (string, default: "/robot_description")
  • The name of the parameter containing the URDF description of the robot.
~semantic_description (string, default: "/robot_description_semantic") ~extra_joints_param_name (string[], default: "/play_motion/approach_planner/exclude_from_planning_joints")
  • A list of joints that do not belong to any group in the SRDF.


The rqt_play_motion_builder package provides an RQT-based (See RQT documentation) frontend that simplifies the use of the play_motion_builder node.

The GUI can be started by running:

rosrun rqt_play_motion_builder rqt_play_motion_builder

on a system in which the play_motion_builder_node is running.


A Javascript library has been implemented, based on roslibjs (See roslibjs documentation) to integrate the play_motion_builder package in an HTML-based environment. This library contains a simplified wrapper around the functionalities and usage of the play_motion_builder_node.

In addition, a ready-to-deploy HTML frontend for the play_motion_builder has been developed, which can be used as is, or as an implementation example.

Wiki: play_motion_builder (last edited 2020-10-21 12:04:54 by DavidFernandezLopez)