This is an old revision of the document!
1 e3
Installing Gazebo with DRC-HUBO model
How to use this tutorial
This tutorial will walk the reader through ROS and Gazebo installation, and how to get the two to work together. The reader is expected to be comfortable with using terminal in Ubuntu.
This tutorial will follow these steps:
- Computer and Software Configuration for DRC-Hubo Simulator
- ROS Installation
- Gazebo Installation and DRC-Hubo Import
- How to Start Gazebo Simulator with PODO
Computer and Software Configuration for DRC-Hubo Simulator
For the purpose of simulating real-time events having a higher end computer is recommended. Having and Intel i5-4th gen. is a minimum, and having a dedicated GPU is recommended. However the Intergraded Intel HD 5000 series is the minimum needed to run the necessary software. You will need to have a computer that has Ubuntu 14.04LTS or higher. If you don't please install Ubuntu before going further.
ROS Installation
Gazebo Installation and DRC-Hubo Import
Once You have finished installation of ROS and the workspace it is time to download Gazebo.
1. Open a terminal and run the command:
cd ~/catkin_ws/src
then run:
git clone -b indigo-devel https://github.com/JeongsooLim/drc_hubo
2. Since with Indigo, a version of gazebo comes pre-installed you will need to remove it. To do this run the command:
sudo apt-get remove ros-indigo-gazebo-*
then:
sudo sh -c 'echo “deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main” > /etc/apt/sources.list.d/gazebo-stable.list‘
Then:
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add –
Then:
sudo apt-get install ros-indigo-gazebo5-*
Then:
sudo apt-get update
3. Now run Gazebo to make sure that it was properly installed.
gazebo
4. Once you have confirmed it was installed correctly, move all the folders in the directory “home/{user_name}/catkin_ws/src/drc_hubo/gazebo_model” to “home/{user_name}/.gazebo/models/” then run the command:
source ~/catkin_ws/devel/setup.bash
5. Now you need to change some paths using gedit. Open the file using:
<fc purple> gedit home/{user_name}/.gazebo/models/DRC_hubo/DRC_hubo.sdf <purple>
scroll to the end of the code and change:
<plugin name=“drc_plugin” filename=“/home/hubo/catkin_ws/devel/lib/libdrc_plugin.so”/> to <plugin name=“drc_plugin” filename=“/home/<username>/catkin_ws/devel/lib/libdrc_plugin.so”/>
6. gedit to open the file, home/{user_name}/.gazebo/models/DRC_head/DRC_head.sdf - scroll down about to the end of the code. - Change <plugin name=“drc_plugin” filename=“/home/hubo/catkin_ws/devel/lib/libdrc_plugin.so”/> to <plugin name=“drc_plugin” filename=“/home/<username>/catkin_ws/devel/lib/libdrc_plugin.so”/>
7. gedit to open the file, home/{user_name}/.gazebo/models/DRC_head_kinect/DRC_head_kinect.sdf - scroll down about to the end of the code. - Change <plugin name=“drc_plugin” filename=“/home/hubo/catkin_ws/devel/lib/libdrc_plugin.so”/> to <plugin name=“drc_plugin” filename=“/home/<username>/catkin_ws/devel/lib/libdrc_plugin.so”/>
8. gedit to open the file, home/{user_name}/catkin_ws/src/drc_hubo/ros/drc_podo_connector/src/podo_connector.cpp - scroll down about to line 178. - Change fpNet = fopen(“/home/hubo/catkin_ws/src/drc_hubo/ros/settings/network.txt”,”r”) to fpNet = fopen(“/home/<username>catkin_ws/src/drc_hubo/ros/settings/network.txt”,”r”)
9. gedit to open the file, home/{user_name}/catkin_ws/src/drc_hubo/ros/drc_plugin/src/drc_plugin.cpp - scroll down about to line 42. - Change fpNet = fopen(“/home/hubo/catkin_ws/src/drc_hubo/ros/settings/network.txt”,”r”) to fpNet = fopen(“/home/<username>catkin_ws/src/drc_hubo/ros/settings/network.txt”,”r”) - scroll down about to line 51. - Change fpGain = fopen(“/home/hubo/catkin_ws/src/drc_hubo/ros/settings/gain.txt”,”r”) to fpGain = fopen(“/home/<username>catkin_ws/src/drc_hubo/ros/settings/gain.txt”,”r”)
10. gedit to open the file, home/{user_name}/catkin_ws/src/drc_hubo/ros/drc_podo_connector/launch/drc_hubo.launch - scroll down about to line 18. - Change … /home/hubo/.gazebo/models/DRC_hubo/…. to … /home/<username>/.gazebo/models/DRC_hubo/…. - Change <arg name=“gui” value=“false”/> in about line 10 to <arg name=“gui” value=“true”/>
11. Once you complete changing the paths in some files, open a terminal and move to ~/catkin_ws/ in order to execute catkin_make $ catkin_make
How to Start Gazebo Simulator with PODO
1. Open a new terminal. Type ‘roscore’. If you have a problem to run ‘roscore’, it means that ROS has not been properly installed.
2. Open a new terminal. Move to ~/catkin_ws/src/drc_hubo/podo/Execute_Daemon. Run ‘PODOLauncher’. Once you run it, you will have a pop-up screen called ‘Daemon Launcher’
3. Click ‘Change Daemon’ button to load Daemon file in your system as shown in Figure. 2. Daemon is located in ../catkin_ws/src/drc_hubo/podo/Execute_Daemon
4. In ‘Daemon Setting’, ‘Gazebo’ and ‘Use ROS’ must be selected
5. Click ‘Start Daemon’. You will see a pop-up Daemon terminal as shown in Figure. 3, which you might be very familiar with
6. Open a new terminal. Type ‘roslaunch drc_podo_connector drc_hubo.launch or type roslaunch drc_podo_<tab><tab>. This command will run Rviz and Gazebo at the same time