############ ROS Packages ############ We already covered the basics of ROS in our `wiki`_. In this part, we will explain the basic structure of our ROS packages. They all share a basic structure that will be explained through the :mod:`simulation.src.simulation_onboarding` package. This package is located at ``simulation/src/simulation_onboarding`` and will be used throughout the onboarding. .. _wiki: https://wiki.kitcar-team.de/doku.php?id=onboarding:allgemein:ros_einfuehrung .. Create the onboarding tree and hide ending and beginning of output with head and tail command .. program-output:: cd $KITCAR_REPO_PATH/kitcar-gazebo-simulation/ && tree -a -I __pycache__ --dirsfirst simulation/src/simulation_onboarding | head -n -2 :shell: **************** Launch directory **************** Inside the ``launch`` directory are files which define what should be done when you execute for example this command: .. prompt:: bash roslaunch simulation_onboarding master.launch road:= Let's break this command down: - *simulation_onboarding* is the name of the ROS Package. - *master.launch* is the name of the launch file that is launched by **roslaunch**. - *road:=* is used to pass the launch file the argument **road** \ with a value of *`, but for integrity, here is the file ``node.py``: .. literalinclude:: ../../../simulation/src/simulation_onboarding/src/onboarding/node.py :language: python :linenos: *************** CMakeLists file *************** The file ``CMakeLists.txt`` contains information for the compiler so it knows what has to be done when it gets executed. It should be executed in ``$KITCAR_REPO_PATH/kitcar-gazebo-simulation/simulation/`` with the command: .. prompt:: bash catkin_make The file looks like this: .. literalinclude:: ../../../simulation/src/simulation_onboarding/CMakeLists.txt :language: bash :linenos: :lines: 4-6, 10-30, 51-59, 94-110, 169- ************ Package file ************ The file ``package.xml`` holds metadata about this ROS Package: .. literalinclude:: ../../../simulation/src/simulation_onboarding/package.xml :language: xml :linenos: ********** Setup file ********** The ``setup.py`` file tells *cmake* where the Python packages are located: .. literalinclude:: ../../../simulation/src/simulation_onboarding/setup.py :language: python :linenos: :start-after: # - Beginning sphinx -