gzdev is a command line tool that facilitates the development of the open source robotics simulator Gazebo. The tool aims to streamline many of the usual tasks that Gazebo developers face on a daily basis.
Prerequisites
Clone the repository:
git clone https://github.com/gazebo-tooling/gzdev.git && cd gzdev
Install the necessary python packages docker, docopt, and pytest (optional). Also install rocker and ign-rocker for the ign-docker-env
command:
pip3 install -r requirements.txt
Create an alias pointing to the core python script and add it to your ~/.bashrc
(be sure to update the path in the command below):
alias gzdev=/ABSOLUTE/PATH/TO/gzdev.py
Streamline many of the usual tasks that Gazebo developers face on a daily basis.
Usage:
gzdev [--version] [--help]
<command> [<args>...]
gzdev -h | --help
gzdev --version
Options:
-h --help Show this screen.
--version Show gzdev's version.
Commands/Plugins:
ign-docker-env Launch docker environments ready for Ignition development
repository Enable/Disable gazebo repositories.
(this command uses rocker and ign-rocker - take a look at these repositories for more information)
Launch docker environments ready for Ignition development
Usage:
gzdev ign-docker-env IGN_RELEASE
[--linux-distro <linux-distro>]
[--rocker-args ROCKER_ARGS]
[--vol $LOCAL_PATH:$CONTAINER_PATH[::$LOCAL_PATH:$CONTAINER_PATH ...]]
gzdev ign-docker-env -h | --help
gzdev ign-docker-env --version
Options:
-h --help Show this screen
--version Show gzdev's version
--linux-distro linux-distro Linux distibution to use in docker env
--rocker-args ROCKER_ARGS Extra rocker arguments, captured in single quotes and separated by white space
--vol $LOCAL_PATH:$CONTAINER_PATH Load volumes into docker container (separate multiple volumes with '::')
gzdev ign-docker-env citadel
gzdev ign-docker-env dome --linux-distro ubuntu:bionic
/foo
locally as a volume into the container at /bar
:
gzdev ign-docker-env dome --linux-distro ubuntu:bionic --vol /foo:/bar
$HOME
directory mounted inside the container as a volume (among other things, this will allow dotfiles to be available in the container) - the path to $HOME
in the container is the same as the local path to $HOME
. Since $HOME
is already mounted into the container, don't explicitly pass in any volumes with --vol
that are a sub-directory of $HOME
:
gzdev ign-docker-env dome --rocker-args '--home'
/foo
locally into the container at /bar
, and /my_proj
locally into the container at /ws
:
gzdev ign-docker-env citadel --vol /foo:/bar::/my_proj:/ws
mkdir -p ~/colcon_ws/src/
export COLCON_WS_PATH=~/colcon_ws/
citadel
or dome
):
export IGN_DISTRO=citadel
IGN_DISTRO
from source:
cd ~/colcon_ws/src/
wget 'https://raw.githubusercontent.com/gazebo-tooling/gazebodistro/master/collection-'$IGN_DISTRO'.yaml'
vcs import < 'collection-'$IGN_DISTRO'.yaml'
gzdev ign-docker-env $IGN_DISTRO --vol $COLCON_WS_PATH:/ws
cd /ws
Run the following command if you want to build tests:
colcon build --merge-install
Run the following command if you don't want to build tests:
colcon build --merge-install --cmake-args -DCMAKE_BUILD_TESTING=0
. /ws/install/setup.bash
System operations to manage extra repositories affecting Gazebo/Ignition/ROS
Usage:
gzdev repository (ACTION) [<repo-name>] [<repo-type>] [--project=<project_name>]
gzdev repository list
gzdev repository (-h | --help)
gzdev repository --version
Action:
enable Enable repository in the system
disable Disable repository (if present)
list List repositories enabled
Options:
-h --help Show this screen
--version Show gzdev's version
gzdev repository enable osrf prerelease
Some projects require prerelease or nigthly repositories in order to work in early stages.
gzdev repository enable --project=ignition-math6
The repository module uses a yaml configuration file to specify the following information used by the code.
repositories
with the following format:
name:
short name used in the command line or used as an id of the repositorykey:
fingerprint of the signing key of the repository. Used for verification proposes.key_url:
signing key file (binary format) of the repository to install into the systemlinux_distro:
name of the Linux distribution for this configurationtypes:
flavours or types inside the Linux distribution to apply
name:
id to name the type inside the Linux distribution (i.e stable)url:
repository url for the Linux distribution typeThe --project
argument allows gzdev to configure group of the repositories to use and/or
add some extra requirements.
Note: project entries in the yaml are processed by order. The first one matching the project name and other requirements is the only one executed.
projects
with the following format:
name:
short name used as an id for the projectrepositories:
list of repositories to configure into the system
name:
name of the repository to install as named inside repositories:
sectiontype:
name of the type of repository to install matching the repositories:
sectionrequirements:
[optional] section to list requirements to met for repositories installations
distributions:
[optional] subsection for requirements on the platform being run
{distribution_name}:
distribution name (i.e ubuntu) as in distro.id()
module call{version_name}:
release name inside the distribution (i.e jammy) as in distro.codename()
module callThe project is licensed under the Apache License, Version 2.0.