Move Arm to Wait Position¶
MoveGroupclass in MoveIt! allows us to move the robot in various ways. With
MoveGroupit is possible to move to a desired joint position, cartesian goal or a predefined pose created with the Setup Assistant. In this exercise, we will move the robot to a predefined joint pose.
- In the main program , locate the method call to
- Go to the source file of that function by clicking in any part of the function and pressing “F2”.
- Alternatively, browse to the file in
- Remove the fist line containing the following
ROS_ERROR_STREAM ...so that the program runs.
- Find every line that begins with the comment
Fill Code:and read the description. Then, replace every instance of the comment
ENTER CODE HEREwith the appropriate line of code
/* Fill Code: . . . */ /* ======== ENTER CODE HERE ======== */
- The name of the predefined “wait” pose was saved in the global variable
Build Code and Run¶
- Compile the pick and place node:
- in QTCreator:
Build -> Build Project
- Alternatively, in a terminal:
- in QTCreator:
catkin build --cmake-args -G 'CodeBlocks - Unix Makefiles' --pkg collision_avoidance_pick_and_place source ./devel/setup.bash
- Run your node with the launch file:
roslaunch collision_avoidance_pick_and_place ur5_pick_and_place.launch
- If the robot is not already in the wait position, it should move to the wait position. In the terminal, you will see something like the following message:
[ INFO] [1400553673.460328538]: Move wait Succeeded [ERROR] [1400553673.460434627]: set_gripper is not implemented yet. Aborting.