RoPod/Tutorials/GAZEBO installation and interface with ROS: Difference between revisions
No edit summary |
|||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<div style="width: 40%; float: right;"><center>{{:RoPod_Table_Menu}}</center></div> | |||
<div STYLE="float: left; width:60%"> | |||
= Install Gazebo= | |||
GAZEBO is a set of ROS packages that provide the necessary interfaces to simulate a robot in the Gazebo 3D rigid body simulator for robots. It integrates with ROS using ROS messages, services and dynamic reconfigure. | GAZEBO is a set of ROS packages that provide the necessary interfaces to simulate a robot in the Gazebo 3D rigid body simulator for robots. It integrates with ROS using ROS messages, services and dynamic reconfigure. | ||
Make sure you do not get errors in any of the steps. Otherwise ask for help to your coaches. | Make sure you do not get errors in any of the steps. Otherwise ask for help to your coaches. | ||
Install gazebo version | Install gazebo version 11.x using the '''step-by-step''' installation, those versions are compatible with ROS noetic: http://gazebosim.org/tutorials?cat=install&tut=install_ubuntu&ver=7.0 | ||
Only if you had problems with the command | |||
<pre>sudo apt-get install | <pre>sudo apt-get install gazebo11</pre> | ||
Try to use the command aptitude instead of apt-get. Install it first: | |||
<pre>sudo apt-get install aptitude</pre> | |||
Then try gazebo installation | |||
<pre>sudo aptitude install gazebo11</pre> | |||
Install gazebo_ros_pkgs and some extra packages needed to run the basis ropod model | |||
<pre> | |||
sudo apt-get install ros-noetic-gazebo-ros-pkgs ros-noetic-gazebo-dev ros-noetic-gazebo-plugins | |||
sudo apt-get install ros-noetic-gazebo-ros ros-noetic-gazebo-ros-control | |||
</pre> | |||
= Faster startup of Gazebo= | = Faster startup of Gazebo= | ||
Line 55: | Line 43: | ||
'''Be careful with this: models from standard tools, such as depth-camera's, can be found in this library. By replacing this line, you can not add them by default any more, but you should download these files yourself and add them to your local library.''' | '''Be careful with this: models from standard tools, such as depth-camera's, can be found in this library. By replacing this line, you can not add them by default any more, but you should download these files yourself and add them to your local library.''' | ||
= Test that gazebo is launched from ROS = | |||
We assume that you already followed all steps in [[ RoPod/Tutorials/ROS installation ]] | |||
Then, we can launch the ropod gazebo model together with the ROPOD basis software using the alias | |||
<pre>r2start gui:=true</pre> | |||
rstart is an alias which is used to get the communication with all the sensors up-and-running. As we have no robot on the dev-pc, gazebo is used for this purpose. At the same time, r-viz starts up in order to visualize all the data. | |||
Get familiar with the data being published, the nodes, etc. See ROS tutorials. | |||
At this point you can also test the ROPOD software by following the steps in [[ RoPod/Tutorials/Simulation ]]. | |||
</div> |
Latest revision as of 16:58, 11 March 2021
Info
RoPod Configuration
Other
Install Gazebo
GAZEBO is a set of ROS packages that provide the necessary interfaces to simulate a robot in the Gazebo 3D rigid body simulator for robots. It integrates with ROS using ROS messages, services and dynamic reconfigure.
Make sure you do not get errors in any of the steps. Otherwise ask for help to your coaches.
Install gazebo version 11.x using the step-by-step installation, those versions are compatible with ROS noetic: http://gazebosim.org/tutorials?cat=install&tut=install_ubuntu&ver=7.0
Only if you had problems with the command
sudo apt-get install gazebo11
Try to use the command aptitude instead of apt-get. Install it first:
sudo apt-get install aptitude
Then try gazebo installation
sudo aptitude install gazebo11
Install gazebo_ros_pkgs and some extra packages needed to run the basis ropod model
sudo apt-get install ros-noetic-gazebo-ros-pkgs ros-noetic-gazebo-dev ros-noetic-gazebo-plugins sudo apt-get install ros-noetic-gazebo-ros ros-noetic-gazebo-ros-control
Faster startup of Gazebo
As you might notice, it can take quite a while before gazebo is loaded. This is caused by loading several models from the gazebo-repository. You can prevent this as follows:
- Go to the directory where gazebo is installed
cd /usr/share/gazebo-<your gazebo version>
- Open setup.sh in an editor as a super user
vim setup.sh
- replace the line
"export GAZEBO_MODEL_DATABASE_URI="http://gazebosim.org/models" to export GAZEBO_MODEL_DATABASE_URI=""
Now, Gazebo should be loaded much faster by loading it from a new terminal.
Be careful with this: models from standard tools, such as depth-camera's, can be found in this library. By replacing this line, you can not add them by default any more, but you should download these files yourself and add them to your local library.
Test that gazebo is launched from ROS
We assume that you already followed all steps in RoPod/Tutorials/ROS installation
Then, we can launch the ropod gazebo model together with the ROPOD basis software using the alias
r2start gui:=true
rstart is an alias which is used to get the communication with all the sensors up-and-running. As we have no robot on the dev-pc, gazebo is used for this purpose. At the same time, r-viz starts up in order to visualize all the data.
Get familiar with the data being published, the nodes, etc. See ROS tutorials.
At this point you can also test the ROPOD software by following the steps in RoPod/Tutorials/Simulation .