Author: Jordi Pages < jordi.pages@pal-robotics.com >

Maintainer: Sara Cooper < sara.cooper@pal-robotics.com >

Support: ari-support@pal-robotics.com

Source: https://github.com/pal-robotics/ari_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 ARI are explained.

Keywords: joint, trajectory controller, rqt_joint_trajectory_controller

Tutorial Level: BEGINNER

Next Tutorial: Head control

move_joints_title.jpg

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 ARI simulation, as shown in the Tutorials Installation Section.

Execution

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.

gazebo_office_with_people.jpg

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

rqt_joint_gui.jpg

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:

rqt_right_arm_joints.jpg

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.

Wiki: Robots/ARI/Tutorials/motions/rqt_joint (last edited 2020-02-07 16:58:03 by SaraCooper)