-
Notifications
You must be signed in to change notification settings - Fork 2
Caffeine Robot Description File Structure
Written by: KJ
Familiarity with URDF, xacro and Gazebo plugins is assumed. See the following resources if necessary:
- On URDF + xacro
- On Gazebo plugins
Make sure you clone the necessary repository, and then source your work space before proceeding.
1. Terminal line commands relevant to this package
- Use the following command to launch caffeine in Gazebo:
roslaunch caffeine_description caffeine_gazebo.launch
- Use the following command to launch caffeine in rviz (this should be done after launching in Gazebo usually):
roslaunch caffeine_description caffeine_rviz.launch
These are the two main commands that you will use.
2. File structure
-
/launch
contains all the launch files necessary for running caffeine -
/urdf
contains all the urdf and mesh files for caffeine -
/rviz
contains the rviz configuration file used incaffeine_rviz.launch
3. Describing the files within the urdf folder
-
The meshes folder contains
.stl
or.dae
mesh files that are used in the robot. These are simply just CAD files of links (i.e. the houkyo laser). -
The
constants.xacro
file simply contains definitions for all the constants used. -
The
inertias.xacro
contain xacro macros defining methods to calculate moment of inertia tensors. -
The
caffeine.urdf.xacro
file contains the description of the robot -
The
caffeine.urdf.gazebo
file contains configurations necessary for Gazebo (e.g. giving laserscan
,cmd_vel
, etc)
4. More details on caffeine.urdf.xacro
Within this file, the base link is called base_link
. This can be seen as the main reference frame of our robot.
Afterwards, links and joints are defined.
Note: For the hokuyo sensor, it should be noted it's rotated in such a way so that the blind spot of the hokuyo sensor is facing the stand of the robot.
Note 2: Currently, the transmissions for the wheels use effort controllers. This shouldn't matter too much, but should be noted if it comes up.
5. More details on caffeine.gazebo.xacro
This file contains 3 main plugins.
The first one is ros_control
. This is necessary to include to interface between ros and gazebo.
The second one is the differential drive plugin. This is used to create an the /odom
topic, as well as an odom frame.
Furthermore, this plugin gives us access to the /cmd_vel
topic. Fundamentally, this plugin is used to move the robot.
The final plugin is the laser scan plugin. This is used to give us the /scan
topic. This plugin basically allows our
hokuyo sensor link to act as an actual sensor, and scan for things.