How to properly structure a ROS package?
My ROS package is beginning to get complicated with multiple folders for various aspects of functionality. However, I am unsure whether I have structured the package correctly. I am unsure whether my urdf
and config
folders should be placed outside of src
and whether the nodes defined in Python scripts should be organised into a sub-folder (scripts
) within src
.
Here's what I have so far:
catkin_ws/src/my_package
│
├── cmake-build-debug
│ └── *LOTS OF SUB-FOLDERS & FILES*
├── include
│ └── my_package
│ └── *EMPTY*
├── venv
│ └── *LOTS OF SUB-FOLDERS & FILES*
├── launch
│ ├── all_nodes.launch
│ └── robot_simulation.launch
├── src
│ ├── config
│ │ ├── config_a.lua
│ │ └── config_b.rviz
│ ├── scripts
│ │ ├── __init__.py
│ │ ├── node_a.py
│ │ ├── node_b.py
│ │ ├── node_c.py
│ │ ├── node_d.py
│ │ ├── node_e.sh
│ │ └── node_f.sh
│ ├── urdf
│ │ ├── robot.urdf.xacro
│ │ ├── robot_plugins.gazebo
│ │ ├── mounts
│ │ │ ├── mount_a.urdf.xacro
│ │ │ ├── mount_b.urdf.xacro
│ │ │ └── mount_c.urdf.xacro
│ │ └── sensors.urdf.xacro
│ ├── gui
│ │ ├── index.html
│ │ └── main.js
│ └── worlds
│ └── area.world
├── CMakeLists.txt
├── package.xml
├── README.md
└── requirements.txt
Does this look right?