Note: This tutorial assumes that you have completed the previous tutorials: Robots/REEM-C/Tutorials/launch.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Play pre-recorded motions on REEM-C

Description: This tutorial will show you how to play pre-recorded motions on the REEM-C robot.

Tutorial Level: BEGINNER

Next Tutorial: Robots/REEM-C/Tutorials/moveit

In order to go through this tutorial, you should have a Gazebo simulation of REEM-C running as per the previous tutorial.

Run the joint trajectory controller

This controller is in charge of dispatching trajectory commands to the joints.

roslaunch reemc_controller_configuration joint_trajectory_controllers.launch

Playing a pre-recorded squatting motion

We will use a tool called play_motion to play a squatting motion. The motion simply consists of a single pose, and the joint trajectory controllers will interpolate a trajectory to reach this pose.

First, fire up an actionlib client:

rosrun actionlib axclient.py /play_motion

Fill the action goal as per the following:

motion_name: 'squat'
skip_planning: True
priority: 0

alclient.png

After clicking the 'Send goal' button, you will see the robot squat on your Gazebo window.

squat.png

To get back up, play the home_legs motion. Then you may play the home motion, even with skip_planning to False as it will use MoveIt! to compute a safe plan to get back to that position with it's arms.

The motions are stored in a human-readable YAML file in reemc_bringup/config/reemc_motions.yaml and are loaded in the param server on startup, you can check which movements are available with:

rosparam list | grep play_motion

Which will get you something like:

/play_motion/motions/hands_front/joints
/play_motion/motions/hands_front/points
/play_motion/motions/hands_up/joints
/play_motion/motions/hands_up/points
/play_motion/motions/home/joints
/play_motion/motions/home/meta/description
/play_motion/motions/home/meta/name
/play_motion/motions/home/meta/usage
/play_motion/motions/home/points
/play_motion/motions/home_legs/joints
/play_motion/motions/home_legs/points
/play_motion/motions/interact/joints
/play_motion/motions/interact/meta/description
/play_motion/motions/interact/meta/name
/play_motion/motions/interact/meta/usage
/play_motion/motions/interact/points
/play_motion/motions/small_squat/joints
/play_motion/motions/small_squat/points
/play_motion/motions/squat/joints
/play_motion/motions/squat/points

Wiki: Robots/REEM-C/Tutorials/play_motion (last edited 2019-01-02 14:17:04 by AdriàRoig)