installing_gazebo_with_drc-hubo_model

This is an old revision of the document!


Installing Gazebo with DRC-HUBO model



How to use this tutorial


This tutorial will walk the reader through ROS and simulator installation with the DRC-Hubo model. This tutorial will lightly go over how to get the two to work together. But controlling the model through PODO will be explained in another tutorial. The reader is expected to be comfortable with using terminal in Ubuntu. This tutorial will take the reader 1.5-2 hrs to finish.
I will recommend that the reader use multiple monitors since there are going to be multiple programs open at once.
This tutorial will follow these steps:

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 newer. If you don't please install Ubuntu before going further.

ROS Installation


To install ROS please refer to these links:


This is the installation for ROS-Jade. This version comes pre-installed with gazebo 5.3.0. If you have a different version of ROS it is ok. Just delete your version of gazebo and install 5.3.0. If the reader already have ROS I trust that the reader will be able to figure this out.


If you are new to ROS you will need to create your workplace (part 3 of tutorial) in order to go further.

Installation of DRC-Hubo Plugin


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. 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/” using:


cp -a ~/catkin_ws/src/drc_hubo/gazebo_models/. ~/.gazebo/models/


then run the command:


source ~/catkin_ws/devel/setup.bash


use the:


ls ~/.gazebo/models


to double check that all of the correct files were copied over. Compare the files in the red box.

3. Now you need to change some paths using gedit. Open the file using:


gedit ~/.gazebo/models/DRC_hubo/DRC_hubo.sdf


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”/>



4. Since the first terminal used to open gedit is used to run gedit you will need to open a new terminal and run:


gedit ~/.gazebo/models/DRC_head/DRC_head.sdf


scroll down about 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”/>



5. Run:


gedit ~/.gazebo/models/DRC_head_kinect/DRC_head_kinect.sdf


scroll down about 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. Run:


gedit ~/catkin_ws/src/drc_hubo/ros/drc_podo_connector/src/podo_connector.cpp


scroll down about to line 178 and 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”)



7. Run:


gedit ~/catkin_ws/src/drc_hubo/ros/drc_plugin/src/drc_plugin.cpp


scroll down about to line 42 and 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”)


Then scroll down about to line 51 and 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”)



8. Run:


gedit ~/catkin_ws/src/drc_hubo/ros/drc_podo_connector/launch/drc_hubo.launch


Go to line 10 and change:


<arg name=“gui” value=“false”/>
to
<arg name=“gui” value=“true”/>


Then scroll down about to line 18 and change:


/home/hubo/.gazebo/models/DRC_hubo/
to
/home/<username>/.gazebo/models/DRC_hubo/



9. Once you complete changing the paths in some files, open a terminal and:


cd ~/catkin_ws


in order to execute:


catkin_make




How to Start Gazebo Simulator with PODO


1. Open a new terminal and run:


roscore




2. Open the PODO Launcher from the drc_hubo folder by:


cd catkin_ws/src/drc_hubo/podo/Execute\ Daemon/


then run:


./PODOLauncher




3. In ‘Daemon Setting’, ‘Gazebo’ and ‘Use ROS’ must be selected and make sure that the Daemon path is set to the daemon exe file inside drc_hubo/podo and not to your personal file.

4. Once you have all of the setting correct click the start Daemon.

5. In a new terminal run:


cd ~/catkin_ws


then


source devel/setup.bash


finally launch gazebo and r-viz using the command:


roslaunch drc_podo_connector drc_hubo.launch


You should now see the two programs open with the DRC-hubo model.

NOTE: if you see that gazebo and r-viz don't start up with the model immediately don't panic (especially if you aren't using a computer with a dedicated GPU). Just give it some time. However if gazebo or r-viz suddenly crash use Ctrl+c in the terminal to cancel the command and re-try again until it works. At first when gazebo loads the DRC-Hubo model will look like it is flying. This will fix its self after a while so do not panic.

6. Now it is time to test the simulators. You will need to open the GUI inside the drc_hubo podo folder. Open qt and start a new session.

7. Once in the new session open both the PODOGUI and ALPrograms .pro files. Make sure that you are in the appropriate folder, use the pictures bellow for reference.



8. Once all of the projects are in the session go to the projects tab and make sure that the build directories are going to the right place. Refer to the pictures for the correct place. Note that the build files are in the same folder as the project files. Also make sure, using the computer icon at the bottom left corner that all the projects are in Release mode.

9. Once you have all of the appropriate folders Rebuild all the projects run PODOGUI. Connect to Daemon and turn on the Walkready AL by double clicking it in the module tab.

10. Now go to the Tutorial tab and click the Walk Ready button. You will now notice that in both simulators the hubo model is now (depending on your system slowly) moving into the Walk Ready pose.

installing_gazebo_with_drc-hubo_model.1470117321.txt.gz · Last modified: by keitaronishimura