installing_gazebo_with_drc-hubo_model
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
installing_gazebo_with_drc-hubo_model [2016/07/30 22:51] – keitaronishimura | installing_gazebo_with_drc-hubo_model [2018/02/18 15:03] (current) – keitaronishimura | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | 1 e3====Installing Gazebo with DRC-HUBO model==== | + | ====Installing Gazebo with DRC-HUBO model==== |
+ | \\ | ||
+ | {{: | ||
+ | \\ | ||
===How to use this tutorial=== | ===How to use this tutorial=== | ||
\\ | \\ | ||
- | This tutorial will walk the reader through ROS and Gazebo | + | This tutorial will walk the reader through ROS and simulator |
+ | \\ | ||
+ | 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: | This tutorial will follow these steps: | ||
- | *Computer and Software Configuration for DRC-Hubo Simulator | + | *[[Installing Gazebo with DRC-HUBO model#Computer and Software Configuration for DRC-Hubo Simulator| Computer and Software Configuration for DRC-Hubo Simulator]] |
- | *ROS Installation | + | *[[Installing Gazebo with DRC-HUBO model#ROS Installation|ROS Installation]] |
- | *Gazebo Installation | + | *[[Installing |
- | *How to Start Gazebo Simulator with PODO | + | *[[Installing Gazebo with DRC-HUBO model#QT Installation]] |
+ | *[[Installing Gazebo with DRC-HUBO model#How to Start Gazebo Simulator with PODO|How to Start Gazebo Simulator with PODO]] | ||
===Computer and Software Configuration for DRC-Hubo Simulator=== | ===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 | + | 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 author was able to run the software using an Intergraded Intel HD 5000 series |
\\ | \\ | ||
===ROS Installation=== | ===ROS Installation=== | ||
+ | \\ | ||
+ | You will first need to install gazebo7. Do not download any other version as the code will not be compatible. If: | ||
+ | \\ | ||
+ | ---- | ||
+ | <fc purple> | ||
+ | sudo apt-get install gazebo7 | ||
+ | </fc> | ||
+ | ---- | ||
+ | Then try to open gazebo to test that it works. This may take some time depending on how powerful your computer is: | ||
+ | ---- | ||
+ | <fc purple> | ||
+ | gazebo | ||
+ | </fc> | ||
+ | ---- | ||
\\ | \\ | ||
To install ROS please refer to these links: | To install ROS please refer to these links: | ||
- | *[[http:// | + | *[[http:// |
- | * [[http:// | + | |
\\ | \\ | ||
- | ===Gazebo | + | This is the installation for ROS-Kinetic. These come pre-installed with gazebo7 but it is just the ros plugin instead of a full install. That is why we needed to do a full install beforehand. |
+ | \\ | ||
+ | *[[http:// | ||
+ | \\ | ||
+ | If you are new to ROS you will need to create your workplace (part 3 of the tutorial) in order to go further. | ||
+ | \\ | ||
+ | {{: | ||
+ | \\ | ||
+ | Once done with setting up the workspace all terminals used and don't forget to add it to your bashrc file so you don't need to source it all the time. First, open the .bashrf file in a new terminal: | ||
+ | ---- | ||
+ | <fc purple> | ||
+ | gedit ~/.bashrc | ||
+ | </ | ||
+ | ---- | ||
+ | Then add this line of code at the very end of the file: | ||
+ | ---- | ||
+ | <fc purple> | ||
+ | source ~/ | ||
+ | </ | ||
+ | ---- | ||
+ | \\ | ||
+ | |||
+ | ===Installation | ||
\\ | \\ | ||
- | Once You have finished installation of ROS and the workspace it is time to download Gazebo. | + | Once You have finished installation of ROS and the workspace it is time to download |
1. Open a terminal and run the command: | 1. Open a terminal and run the command: | ||
Line 33: | Line 73: | ||
</fc> | </fc> | ||
---- | ---- | ||
- | then run: | + | run: |
---- | ---- | ||
<fc purple> | <fc purple> | ||
- | git clone -b indigo-devel | + | git clone https:// |
</fc> | </fc> | ||
---- | ---- | ||
+ | \\ | ||
+ | {{: | ||
+ | \\ | ||
- | 2. Since with Indigo, a version of gazebo comes pre-installed | + | 2. Once you have confirmed |
---- | ---- | ||
<fc purple> | <fc purple> | ||
- | sudo apt-get remove ros-indigo-gazebo-* | + | cp -a ~/ |
</fc> | </fc> | ||
---- | ---- | ||
- | then: | + | \\ |
+ | <fc red> | ||
+ | Note: If you get an error stating that the .gazebo/ | ||
+ | </fc> | ||
---- | ---- | ||
<fc purple> | <fc purple> | ||
- | sudo sh -c 'echo "deb http://packages.osrfoundation.org/ | + | mkdir -r ~/.gazebo/models |
</fc> | </fc> | ||
---- | ---- | ||
- | Then: | + | use the: |
---- | ---- | ||
<fc purple> | <fc purple> | ||
- | wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add – | + | ls ~/.gazebo/models |
</fc> | </fc> | ||
---- | ---- | ||
- | Then: | + | 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: | ||
---- | ---- | ||
<fc purple> | <fc purple> | ||
- | sudo apt-get install ros-indigo-gazebo5-* | + | gedit ~/ |
</fc> | </fc> | ||
---- | ---- | ||
- | Then: | + | scroll to the end of the code and change: |
+ | ---- | ||
+ | <plugin name=" | ||
+ | \\ | ||
+ | to | ||
+ | \\ | ||
+ | <plugin name=" | ||
+ | ---- | ||
+ | {{: | ||
+ | \\ | ||
+ | 4. Since the first terminal used to open gedit is used to run gedit you will need to open a new terminal and run: | ||
---- | ---- | ||
<fc purple> | <fc purple> | ||
- | sudo apt-get update | + | gedit ~/ |
</fc> | </fc> | ||
---- | ---- | ||
- | + | scroll down about to the end of the code and change: | |
- | 3. Now run Gazebo | + | ---- |
+ | <plugin name=" | ||
+ | \\ | ||
+ | to | ||
+ | \\ | ||
+ | <plugin name=" | ||
+ | ---- | ||
+ | {{: | ||
+ | \\ | ||
+ | 5. Run: | ||
---- | ---- | ||
<fc purple> | <fc purple> | ||
- | gazebo | + | gedit ~/.gazebo/ |
</fc> | </fc> | ||
---- | ---- | ||
- | + | scroll down about to the end of the code and change: | |
- | 4. Once you have confirmed it was installed correctly, move all the folders in the directory | + | ---- |
+ | <plugin name="drc_plugin" | ||
+ | \\ | ||
+ | to | ||
+ | \\ | ||
+ | <plugin name="drc_plugin" | ||
+ | ---- | ||
+ | {{: | ||
+ | \\ | ||
+ | 6. Run: | ||
---- | ---- | ||
<fc purple> | <fc purple> | ||
- | | + | gedit ~/ |
</fc> | </fc> | ||
---- | ---- | ||
- | + | scroll down about to line 178 and change: | |
- | 5. Now you need to change some paths using gedit. Open the file using: | + | ---- |
+ | fpNet = fopen(“/ | ||
+ | \\ | ||
+ | to | ||
+ | \\ | ||
+ | fpNet = fopen(“/ | ||
+ | ---- | ||
+ | {{: | ||
+ | \\ | ||
+ | 7. Run: | ||
---- | ---- | ||
<fc purple> | <fc purple> | ||
- | gedit home/{user_name}/.gazebo/models/DRC_hubo/DRC_hubo.sdf | + | gedit ~/catkin_ws/src/drc_hubo/ros/drc_plugin/ |
- | <purple> | + | </fc> |
---- | ---- | ||
- | scroll to the end of the code and change: | + | scroll |
---- | ---- | ||
- | <plugin name=" | + | fpNet = fopen(“/home/<fc purple>hubo</fc>/catkin_ws/src/drc_hubo/ros/settings/ |
- | <plugin name=" | + | \\ |
+ | to | ||
+ | \\ | ||
+ | fpNet = fopen(“/home/<fc purple>< | ||
---- | ---- | ||
+ | Then scroll down about to line 51 and change: | ||
+ | ---- | ||
+ | fpGain = fopen(“/ | ||
+ | \\ | ||
+ | to | ||
+ | \\ | ||
+ | fpGain = fopen(“/ | ||
+ | ---- | ||
+ | {{: | ||
+ | \\ | ||
+ | 8. Run: | ||
+ | ---- | ||
+ | <fc purple> | ||
+ | gedit ~/ | ||
+ | </fc> | ||
+ | ---- | ||
+ | Go to line 10 and change: | ||
+ | ---- | ||
+ | <arg name=“gui” value=< | ||
+ | \\ | ||
+ | to | ||
+ | \\ | ||
+ | <arg name=“gui” value=< | ||
+ | ---- | ||
+ | Then scroll down about to line 18 and change: | ||
+ | ---- | ||
+ | / | ||
+ | \\ | ||
+ | to | ||
+ | \\ | ||
+ | / | ||
+ | ---- | ||
+ | {{: | ||
+ | \\ | ||
+ | 9. Once you complete changing the paths in some files, open a terminal and: | ||
+ | ---- | ||
+ | <fc purple> | ||
+ | cd ~/catkin_ws | ||
+ | </fc> | ||
+ | ---- | ||
+ | in order to execute: | ||
+ | ---- | ||
+ | <fc purple> | ||
+ | catkin_make | ||
+ | </fc> | ||
+ | ---- | ||
+ | \\ | ||
+ | {{: | ||
+ | \\ | ||
+ | ===QT Instalation=== | ||
- | 6. gedit to open the file, home/ | + | Follow |
- | - scroll down about to the end of the code. | + | \\ |
- | - Change <plugin name=" | + | |
- | <plugin name=" | + | |
- | + | ||
- | 7. gedit to open the file, home/ | + | |
- | - scroll down about to the end of the code. | + | |
- | - Change <plugin name=" | + | |
- | <plugin name=" | + | |
- | + | ||
- | 8. gedit to open the file, home/ | + | |
- | - scroll down about to line 178. | + | |
- | - Change fpNet = fopen(“/ | + | |
- | fpNet = fopen(“/ | + | |
- | + | ||
- | 9. gedit to open the file, home/ | + | |
- | - scroll down about to line 42. | + | |
- | - Change fpNet = fopen(“/ | + | |
- | fpNet = fopen(“/ | + | |
- | - scroll down about to line 51. | + | |
- | - Change fpGain = fopen(“/ | + | |
- | fpGain = fopen(“/ | + | |
- | + | ||
- | 10. gedit to open the file, home/ | + | |
- | - scroll down about to line 18. | + | |
- | - Change … / | + | |
- | - Change <arg name=“gui” value=“false”/> | + | |
- | + | ||
- | 11. Once you complete changing the paths in some files, open a terminal and move to ~/ | + | |
- | $ catkin_make | + | |
===How to Start Gazebo Simulator with PODO=== | ===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. | + | 1. Open a new terminal |
- | + | ---- | |
- | 2. Open a new terminal. Move to ~/catkin_ws/ | + | <fc purple> |
- | + | roscore | |
- | 3. Click ‘Change Daemon’ button to load Daemon file in your system as shown in Figure. 2. Daemon is located in ../catkin_ws/src/ | + | </ |
- | + | ---- | |
- | 4. In ‘Daemon Setting’, ‘Gazebo’ and ‘Use ROS’ must be selected | + | \\ |
- | + | {{:tut13.png?400}} | |
- | 5. Click ‘Start Daemon’. You will see a pop-up | + | \\ |
- | + | 2. Open the PODO Launcher from the drc_hubo folder by: | |
- | 6. Open a new terminal. | + | ---- |
- | + | <fc purple> | |
- | + | cd catkin_ws/ | |
+ | </ | ||
+ | ---- | ||
+ | then run: | ||
+ | ---- | ||
+ | <fc purple> | ||
+ | ./PODOLauncher | ||
+ | </fc> | ||
+ | ---- | ||
+ | \\ | ||
+ | {{: | ||
+ | \\ | ||
+ | 3. In ‘Daemon Setting’, ‘Gazebo’ and ‘Use ROS’ must be selected | ||
+ | \\ | ||
+ | {{:tut18.png?400}} | ||
+ | \\ | ||
+ | 4. Once you have all of the setting correct click the start Daemon. | ||
+ | \\ | ||
+ | {{:tut20.png?400}} | ||
+ | \\ | ||
+ | 5. In a new terminal | ||
+ | ---- | ||
+ | <fc purple> | ||
+ | cd ~/ | ||
+ | </ | ||
+ | ---- | ||
+ | then | ||
+ | ---- | ||
+ | <fc purple> | ||
+ | source devel/setup.bash | ||
+ | </ | ||
+ | ---- | ||
+ | finally, launch gazebo and r-viz using the command: | ||
+ | ---- | ||
+ | <fc purple> | ||
+ | roslaunch drc_podo_connector drc_hubo.launch | ||
+ | </fc> | ||
+ | ---- | ||
+ | You should now see the two programs open with the DRC-hubo model. | ||
+ | \\ | ||
+ | {{: | ||
+ | \\ | ||
+ | <fc red> | ||
+ | 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. | ||
+ | </ | ||
+ | \\ | ||
+ | {{tut15.png? | ||
+ | \\ | ||
+ | 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.txt · Last modified: 2018/02/18 15:03 by keitaronishimura