$\color{white}\colorbox{FE9227}{Progressing towards a solid foundation!}$
▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░ 20%
The first step in creating the organizational structure of a robot simulation is to create a robot_description package. This package will contain all the files required to describe and visualize the robot. These will include the xacro
, meshes
, config
, and rviz
files.
<aside>
⚠️ To keep your workspace clean, create a non-package folder one level above the description
folder with just the name of your robot. This will allow you to contain the description
, gazebo
, and control
packages organized in one sub-folder.
</aside>
cd ~/humble_ws/src/
mkdir hunter_se
Create the robot_description package. In this case, we will name our package hunter_se_description
to match the name of the robot we are going to simulate.
cd ~/humble_ws/src/hunter_se/
ros2 pkg create --build-type ament_python hunter_se_description
The package was created without any dependencies. We will add these dependencies alter as we add functionality to the robot.
We are going to set up the folder hierarchy in the package before beginning any code. This will allow us to add the subfolders to the data_files
section and save file inclusion headaches later.
cd ~/humble_ws/src/hunter_se/hunter_se_description
mkdir models launch
cd models
mkdir config meshes xacro
Add the data_files
custom definition to setup.py
and add the newly created folders.