Commit 5cd1f9a4 authored by CANNERE Xavier's avatar CANNERE Xavier
Browse files
parents 428a9ea1 097fe749
# awesome_ros2_tutorials
awesome_ros2_tutorials is gitlab project who containt the docs, and the packages for taking in hand ros2 in the isae autonomous platform.
awesome_ros2_tutorials is gitlab project who containt the docs for taking in hand ros2 in the isae autonomous platform.
Require Sphinx. (sudo apt install python3-sphinx)
**Compile the doc:**
`cd doc`
`make html`
......@@ -3,8 +3,8 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
How to create a model in Gazebo
===============================
Gazebo Model creation
=====================
In this part we will see how we can create a model in Gazebo. A model in Gazebo is one or more assembled elements which in our case will represent a rover. We'll use it for simulation in robotics
......@@ -15,15 +15,15 @@ First, we'll define the environment variable to allow us to use the model that w
You can type on a new terminal the following lines::
mkdir ws/gazebo
mkdir -p $HOME/ws/gazebo
gedit .bashrc
Now in the editor, at the end of the files paste these lines::
source /usr/share/gazebo/setup.sh
export GAZEBO_PLUGIN_PATH=$GAZEBO_PLUGIN_PATH:/home/etdisc/ws/gazebo
export GAZEBO_RESOURCE_PATH=$GAZEBO_RESOURCE_PATH:/home/etdisc/ws/gazebo
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/home/etdisc/ws/gazebo
export GAZEBO_PLUGIN_PATH=$GAZEBO_PLUGIN_PATH:$HOME/ws/gazebo
export GAZEBO_RESOURCE_PATH=$GAZEBO_RESOURCE_PATH:$HOME/ws/gazebo
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$HOME/ws/gazebo
You can save and close your editor.
......@@ -55,8 +55,8 @@ The .config file will define information like the name of robot or the version o
Open a terminal and type::
mkdir ws/gazebo/rover
cd ws/gazebo/rover
mkdir $HOME/ws/gazebo/rover
cd $HOME/ws/gazebo/rover
gedit model.config
Paste this lines into your model.config::
......@@ -190,7 +190,7 @@ Open your .sdf file::
Paste this code after ``</link>``::
<link name="left_wheel">
<pose>0.09 01 0 1.57 0 0</pose>
<pose>0.09 0.1 0 1.57 0 0</pose>
<collision name="collision">
<geometry>
<cylinder>
......@@ -319,7 +319,7 @@ Paste this code after your last *link* tag::
</joint>
<joint type="revolute" name="right_wheel_hinge2">
<pose>0 0 0 0 0 0</pose>
<child>right_wheel</child>
<child>right_wheel2</child>
<parent>chassis</parent>
<axis>
<xyz>0 0 1</xyz>
......@@ -471,7 +471,7 @@ First make sure you have the same code::
</joint>
<joint type="revolute" name="right_wheel_hinge2">
<pose>0 0 0 0 0 0</pose>
<child>right_wheel</child>
<child>right_wheel2</child>
<parent>chassis</parent>
<axis>
<xyz>0 0 1</xyz>
......@@ -508,7 +508,7 @@ Reset your velocity, in a new terminal type::
You can see ``/cmd_vel``, we'll use this topic, type::
ros2 topic pub /cmd_vel geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 1.8}}"
ros2 topic pub /cmd_vel geometry_msgs/msg/Twist "{linear: {x: 1.0, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 1.0}}"
And look on gazebo what happens.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment