Skip to content

Installation

Yuchen Wu edited this page Nov 9, 2022 · 11 revisions

Sensor & Robot

We try to design our navigation algorithms to be generalizable to a wide variety of robots and sensors. Have a look at our VT&R3 papers for what sensors and robots we have used. This guide focuses on installing the VT&R3 navigation system, which communicates with sensors and robots via ROS2 interfaces. You are responsible for setting up your own sensors and robots.

Directory Structure

The following environment variables and their respective directories are assumed present. Feel free to change them to your own preference.

export VTRROOT=~/ASRL/vtr3      # (INTERNAL default) root directory
export VTRSRC=${VTRROOT}/src    # source code (this repo)
export VTRDATA=${VTRROOT}/data  # datasets
export VTRTEMP=${VTRROOT}/temp  # default output directory

Make sure these directories exist.

mkdir -p ${VTRSRC} ${VTRDATA} ${VTRTEMP}

Clone this repository and its submodules into VTRSRC:

git clone --recurse-submodules  [email protected]:utiasASRL/vtr3.git ${VTRSRC}

System Dependencies

This Dockerfile can be used as a reference for installing the system dependencies. The easy way is to create a Docker image from this Dockerfile and then install VT&R3 in a container. Note that you must change the environment variables in the Dockerfile to match your own setup above. You can build the Docker image using the following example command:

cd ${VTRSRC}
docker build -t vtr3 \
  --build-arg USERID=$(id -u) \
  --build-arg GROUPID=$(id -g) \
  --build-arg USERNAME=$(whoami) \
  --build-arg HOMEDIR=${HOME} .

You can then run the Docker image using the following example command:

docker run -it --name vtr3 \
  --privileged \
  --network=host \
  -e DISPLAY=$DISPLAY \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v ${VTRROOT}:${VTRROOT}:rw \
  vtr3

Building VT&R3

Inside Docker container:

# source the ROS2 workspace
source /opt/ros/humble/setup.bash

# build and install VTR3 packages
cd ${VTRSRC}/main
colcon build --symlink-install

# build VTR3 web-based GUI
VTRUI=${VTRSRC}/main/src/vtr_gui/vtr_gui/vtr-gui
npm --prefix ${VTRUI} install ${VTRUI}
npm --prefix ${VTRUI} run build