Skip to content

Creating new motions

Generating predefined motions within the play_motion2 frameworkΒΆ

Play Motion 2 motions are sequences of (hence ordered) references and times. These references are grouped in move groups following the convention of MoveIt 2. If \(M\) is a motion that consists of \(n\) pairs,

\[ M = \left\{(r_1, t1), (r_2, t_2), \ldots, (r_n, t_n)\right\} \]

As explained in the section on play_motion2, the prerecorded motions the robots come with have been checked so that if ros2_control's Joint Trajectory controller is used to visit all references at the prescribed times, there is no collision. Hence, there is no planning.

As there is no way to ensure this from any initial reference, if \((r_0, 0)\) is the current state, there is planning between \((r_0, 0)\) and \((r_1, t1)\) when \(M\) is triggered.

The best practices when defining new motions is, hence, to make sure that one can visit all waypoints in the created motions without collisions. PAL Robotics strongly suggests to be always close to the emergency buttons of the robot when testing such motions.