Command Line Interface#
Behind libraries for C++ and Python, navground provides commands.
Warning
As explained in First Steps, if you built navground from source, you need to source the setup script of the workspace where you installed it to enable the commands. Instead, if you installed navground using pip, you can call Python commands without any setup.
You can call a command in up to four different ways, depending on the type of installation and on which package implements the command.
- navground{_py} <command>[1]
- navgroundexposes the commands implemented in navground_sim in C++, while- navground_pyexposes the commands implemented in navground_sim_py in Python. The Python commands are a superset of the C++ commands.
- python -m navground.{core|sim} <command>[2]
- navground.coreexposes the commands implemented in navground_core_py, while- navground.simthe the commands implemented in navground_sim_py, i.e., the same commands as through- navground_py.
- install/lib/<package>/<command>[3]
- stand-alone executables installed if you built from source. 
- ros2 run <package> <command>[4]
- ROS 2 short-cut to run command - install/lib/<package>/<command>, available only if you have ROS.
For example, calling the command that lists installed components available for simulating in Python, can be done in four equivalent ways:
navground_py info
python3 -m navground.sim info
# only if you built from source
install/lib/navground_sim_py/info
# only if you have ROS
ros2 run navground_sim_py info
navground_py.exe info
python -m navground.sim info
# only if you built from source
install\Lib\navground_sim_py\info
# only if you have ROS
ros2 run navground_sim_py info
Note
In the rest of the documentation, when describing a command, we omit the prefix, only specifying the command like info,
for the previous example, instead of navground_py info and so on.
Commands#
The following table summarizes all the available commands and how you can launch them.
| package | commands | how to run them | 
|---|---|---|
| navground_core | 
 
 | |
| navground_core_py | 
 
 
 | |
| navground_sim | 
 
 
 | |
| navground_sim_py | 
 
 
 
 |