Upper body motion and play_motion#


This section explains how to move ARI’s two arms and head, the different ways of controlling each joint and how to execute complex motions. In total, the controllers that can be moved are:

  • arm_left_controller: 4 joints

  • arm_right_controller: 4 joints

  • head_controller: 2 joints

Additionally, the arm controller provides a safe version, which performs self collision check before executing each trajectory.

Joint trajectory motions with rqt GUI#

The joint can be moved individually using a GUI implemented on the rqt framework. In case of running this example with the real robot, i.e. not in a simulation, open the terminal in a development computer and first run:

1export ROS_MASTER_URI=http://ari-Xc:11311
2export ROS_IP=

Make sure to use your robot’s serial number when exporting the ROS_MASTER_URI variable and to set your development computer’s IP when exporting ROS_IP.

The GUI is launched as follows:

rosrun rqt_joint_trajectory_controller rqt_joint_trajectory_controller

The GUI is shown in the figure below. In order to move the arm joint, you can select /controller_manager in the combo box at the left and the desired controller at the right (e.g. arm_left_controller). Sliders for the four joints of the arm will show up. When using it be careful as self-collisions are not checked and it is possible to move a joint and cause a collision between the arm and the body of the robot.


Joint trajectory motion ROS API#

Joint trajectory motions are sent to the joint_trajectory_controller ROS package, an open source ROS package that takes as input joint space trajectories and executes them. Each controller accepts trajectories as ROS messages of type trajectory_msgs/JointTrajectory. Each trajectory point specifies positions, velocities, accelerations, or efforts, for all the joint names given and in the same order.


The controllers accepts trajectory goals through their respective ROS topic and action interfaces.

Predefined upper body motions#

“Apart from moving individual joints and programming trajectories according to your needs, ARI comes also with a library of predefined motions to avoid you to program standard motions. The predefined motions encapsulate trajectories of the robot under a human-friendly name and can be executed using play_motion ROS package.

The motions included on ARI are list here: List of available motions.

Motions can be executed through the WebCommander’s Movements tab or using the rqt action client:

1export ROS_IP=
2#For ROS Melodic
3rosrun actionlib axclient.py /play_motion
5#For ROS Noetic
6rosrun actionlib_tools axclient.py /play_motion

Make sure to set your development computer’s IP when exporting ROS_IP.

In this last case fill the name of the motion in the motion_name field before sending the action goal.


Topic interfaces#

Action interfaces#

Next steps#

  • You can continue learning about body motions with the next tutorial: play_motion_tutorial