Author: Jordi Pages < firstname.lastname@example.org >
Maintainer: Sara Cooper < email@example.com >
|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.|
Moving individual jointsDescription: Different ways to move individual joints of ARI are explained.
Keywords: joint, trajectory controller, rqt_joint_trajectory_controller
Tutorial Level: BEGINNER
Next Tutorial: Head control
This tutorial shows two different ways to move individual joints in position mode. One is from command line and the other is through a Qt GUI.
First make sure that the tutorials are properly installed along with the ARI simulation, as shown in the Tutorials Installation Section.
First open two consoles and source the public simulation workspace as follows:
$ cd ~/ari_public_ws $ source ./devel/setup.bash
Launching the simulation
In the first console launch for example the following simulation
roslaunch ari_gazebo ari_gazebo.launch public_sim:=true world:=simple_office_with_people
Gazebo will show up with ARI in the following world.
Moving joints with the rqt GUI
In the second console run this
rosrun rqt_joint_trajectory_controller rqt_joint_trajectory_controller
and the following rqt GUI will show up
First in the dropdown list at the left we need to select controller_manager and then we will be able to select among the controllers of different groups of joints listed in the dropdown list at the right. As also listed in http://wiki.ros.org/Robots/ARI/Tutorials/trajectory_controller. For example, if we select the arm_right_controller the following sliders will appear in order to control each joint of the arm individually:
First of all the red button needs to be clicked in order that it becomes green. That means that the GUI is ready to send commands to the topic interface of the joint_trajectory_controller corresponding to the selected group of joints.
Note that there is a scaling factor for the speed that will be applied to the joints in the bottom part of the GUI.
Moving joints from command line
The play_motion package offers a move_joint node that can be used to move individual joints from command line.
For example, if we want to lower the head of ARI we may run:
rosrun play_motion move_joint head_2_joint -0.6 2.0
which will print the following output and will effectively lower the head of the robot.
Moving joint head_2_joint to position -0.6 in 2.0s
The output is self-explanatory: the first argument is the name of the joint to move; the second is the target position and the third one is the time given to reach this position.