Author: Alessandro Di Fava < alessandro.difava@pal-robotics.com >
Maintainer: Jordi Pages < jordi.pages@pal-robotics.com >
Support: tiago-support@pal-robotics.com
Source: https://github.com/pal-robotics/tiago_dual_tutorials.git
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 joints
Description: Different ways to move individual joints of TIAGo++ are explained.Keywords: joint, trajectory controller, rqt_joint_trajectory_controller
Tutorial Level: BEGINNER
Next Tutorial: Head control
Contents
Purpose
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.
Pre-requisites
First make sure that the tutorials are properly installed along with the TIAGo simulation, as shown in the Tutorials Installation Section.
Execution
First open two consoles and source the public simulation workspace as follows:
cd ~/tiago_dual_public_ws source ./devel/setup.bash
Launching the simulation
In the first console launch for example the following simulation
roslaunch tiago_dual_gazebo tiago_dual_gazebo.launch public_sim:=true world:=empty
Gazebo will show up with TIAGo++ in an empty 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/TIAGo++/Tutorials/motions/trajectory_controller. For example, if we select the arm_left_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 TIAGo 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.