Arn-O learns robotics engineering

My journey to mastering the art of designing and controlling robots.

Gazebo Install With ROS Integration - Update 1

First version of the tutorial: here.

All the steps described in the first version should be applied. The ros-hydro-ros-controllers should also be installed (see the issue described here). You are now ready to test your installation.

A nice way to validate it on your side is to use the gazebo_ros_demo package. This package provides a simple 2 joints, 3 links robot, the rrbot (rr means 2 planar revolute joints).

You will need to install catkin (official tutorial there). I’m used to install it on my ~/Documents folder:

1
2
3
4
mkdir -p ~/Documents/catkin_ws/src
cd ~/catkin_ws/
catkin_make
source devel/setup.bash

Clone the demo package and run the following commands.

For the robot visualization:

1
roslaunch rrbot_description rrbot_rviz.launch

rrbot-in-rviz

Close the visualisation and start the robot simulation:

1
roslaunch rrbot_gazebo rrbot_world.launch

You will see:

rrbot-in-gazebo

(the robot should fall from the initial unstable position)

Start the controllers from another terminal:

1
roslaunch rrbot_control rrbot_control.launch 

If everything is fine, you should see a log similar to this one from the terminal of the controllers node:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
arnaud@hercules:~$ roslaunch rrbot_control rrbot_control.launch
... logging to /home/arnaud/.ros/log/099644b2-73a2-11e3-a5db-0016eae586be/roslaunch-hercules-15250.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://hercules:56421/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion
 * /rrbot/joint1_position_controller/joint
 * /rrbot/joint1_position_controller/pid/d
 * /rrbot/joint1_position_controller/pid/i
 * /rrbot/joint1_position_controller/pid/p
 * /rrbot/joint1_position_controller/type
 * /rrbot/joint2_position_controller/joint
 * /rrbot/joint2_position_controller/pid/d
 * /rrbot/joint2_position_controller/pid/i
 * /rrbot/joint2_position_controller/pid/p
 * /rrbot/joint2_position_controller/type
 * /rrbot/joint_state_controller/publish_rate
 * /rrbot/joint_state_controller/type

NODES
  /
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
  /rrbot/
    controller_spawner (controller_manager/spawner)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[rrbot/controller_spawner-1]: started with pid [15268]
process[robot_state_publisher-2]: started with pid [15269]
/opt/ros/hydro/lib/robot_state_publisher/robot_state_publisher
[INFO] [WallTime: 1388662796.290004] [0.000000] Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [WallTime: 1388662796.297931] [0.000000] Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [WallTime: 1388662796.305906] [0.000000] Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [WallTime: 1388662796.319537] [0.000000] Loading controller: joint_state_controller
[INFO] [WallTime: 1388662796.927781] [234.131000] Loading controller: joint1_position_controller
[INFO] [WallTime: 1388662797.488433] [234.415000] Loading controller: joint2_position_controller
[INFO] [WallTime: 1388662797.596255] [234.448000] Controller Spawner: Loaded controllers: joint_state_controller, joint1_position_controller, joint2_position_controller
[INFO] [WallTime: 1388662797.672347] [234.495000] Started controllers: joint_state_controller, joint1_position_controller, joint2_position_controller

That means that it works. You can start ros_rqtgui to manipulate the controllers:

1
rosrun rqt_gui rqt_gui

Enter some control values:

rrbot-with-rqtgui

The rrbot should obey to the command:

rrbot-under-control

(this time, the robot is static)

Comments