Dockerized ROS2 setup for the WATonomous Autonomous Vehicle Software Pipeline
Read the following:
- docs/setup.md How to setup our repo.
TLDR: Clone the monorepo, specify active modules, watod up. Everything is containerized, so there's little need to setup any dependencies on your end :).
- docs/monorepo.md What is a monorepo? Why a monorepo?
- docs/how_to_dev.md How to develop in the monorepo.
Below is a tree diagram of the Monorepo.
wato_monorepo_v2
├── watod-setup-env.sh
├── docker
│ ├── samples
│ │ └── cpp
│ │ ├── Dockerfile.aggregator
│ │ ├── Dockerfile.producer
│ │ └── Dockerfile.transformer
│ └── wato_ros_entrypoint.sh
├── docs
├── modules
│ └── docker-compose.samples.yaml
├── scripts
├── src
│ ├── motion_planning_and_control
│ ├── perception
│ ├── wato_msgs
│ │ └── sample_msgs
│ │ ├── CMakeLists.txt
│ │ ├── msg
│ │ └── package.xml
│ ├── samples
│ │ └── cpp
│ │ ├── aggregator
│ │ ├── image
│ │ ├── producer
│ │ ├── README.md
│ │ └── transformer
│ ├── sensor_interfacing
│ ├── simulation
│ ├── tools
│ └── world_modeling
└── watod
watod.- This is the main bash script that you will use to interface with your containers. More info on
watod: docs/dev/watod.md.
- This is the main bash script that you will use to interface with your containers. More info on
watod-setup-env.sh.- watod-setup-env.sh (in scripts directory) will create a .env file specifying environment variables for docker-compose.
watodautomatically runs this script before running any commands. To override variables inwatod-setup-env.sh, create awato2-config.shfile and populate it with variables, for exampleACTIVE_MODULES="perception path_planning".watod-setup-env.shwill then take this file into account when building the.envfile.
- watod-setup-env.sh (in scripts directory) will create a .env file specifying environment variables for docker-compose.
scripts/watod-completion.bash.- Bash autocomplete for watod. Adapted from docker-compose. Add
source <MONO_DIR>/scripts/watod-completion.bashto your bashrc to use autocomplete.
- Bash autocomplete for watod. Adapted from docker-compose. Add
modules/:- This folder contains all docker-compose files specifying the services we will run. They are grouped up into modules. Note that by default no modules are enabled. To select additional modules, overwrite
ACTIVE_MODULES="<MODULES_OF_YOUR_CHOICE"inwato2-config.sh. See the docker-compose wiki. More info on modules: docs/dev/modules.md.
- This folder contains all docker-compose files specifying the services we will run. They are grouped up into modules. Note that by default no modules are enabled. To select additional modules, overwrite
docker/:- This folder contains the
Dockerfilesfor each of our images. Docker wiki.
- This folder contains the
src/:- Here is where all the logic and cool technologies for autonomous software go. The folders in
srcwill be mounted to our docker images, so changes in thesrcdirectory will be reflected in the containers.
- Here is where all the logic and cool technologies for autonomous software go. The folders in
docs/:- This folder contains the documentation for this monorepo, including instructions for setup and details on how to navigate and develop in this monorepo.
Foxglove is used to visualize ROS messages on a local machine.
Add infrastructure as an ACTIVE_MODULES and watod up.
It exposes the port specified by the FOXGLOVE_BRIDGE_PORT variable, which you will need to forward to your local machine. This can either be done in the ports section of VS Code or by running the command ssh -L 8765:localhost:8765 <username>@<machine>-ubuntu1.watocluster.local on your local machine.
Then, open foxglove and add a connection localhost:8765, and it should connect.
Add infrastructure as an ACTIVE_MODULES and watod run.
An example of the command, feel free to change the mcap file being run.
./watod run data_stream ros2 bag play ./nuscenes/NuScenes-v1.0-mini-scene-0061/NuScenes-v1.0-mini-scene-0061_0.mcap
Docker, Continuous Integration: tech_spec.md