In this project, we use make
commands to automate shell scripts: make deps
, make
, make run
, etc. It's done to reduce amount of typing and utilize makefile rule prerequisites feature.
Information about some targets:
make help
The list of all targets can be shown with:
make <Tab>
To know the content of each make target, either execute the command and check its output or open GNUmakefile
in root / node folder with text editor. (Makefile
for Windows)
Of course, you can use ros commands directly. For example, make run
command is described in run:
paragraph of GNUmakefile
similar to:
source install/setup.bash
ros2 launch rc110_system robot.launch
Then you can check the meaning of those commands in public documentation.
source
: https://ss64.com/bash/source.htmllaunch
: https://docs.ros.org/en/rolling/How-To-Guides/Launch-file-different-formats.html
It's possible to pass variables to make
as following:
make my_target var1=a var2=b
Internally some targets use ros_args
macros which provides roslaunch arguments out of those variables, so ros2 launch <...> $(ros_args)
becomes:
ros2 launch <...> var1:=a var2:=b
Roslaunch discards unused arguments, so it's probably ok to mix makefile and roslaunch names.