Command Line Interface

Contents

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]

navground exposes the commands implemented in navground_sim in C++, while navground_py exposes 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.core exposes the commands implemented in navground_core_py, while navground.sim the 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

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

info

echo

schema

plugins

install/lib/navground_core/<command>

ros2 run navground_core <command>

navground_core_py

info

echo

schema

validate

plugins

install/lib/navground_core_py/<command>

ros2 run navground_core_py <command>

python -m navground.core <command>

navground_sim

info

echo

schema

plugins

sample

run

install/lib/navground_sim_py/<command>

ros2 run navground_sim <command>

navground <command>

navground_sim_py

info

echo

schema

validate

plugins

sample

run

run_rt

record video

replay

install/lib/navground_sim_py/<command>

ros2 run navground_sim_py <command>

navground_py <command>

python -m navground.sim  <command>