Skip to content
James Heselden edited this page Jan 28, 2025 · 5 revisions

Download

If used within a ROS2 workspace, the repository can be either cloned into the workspace or it can be installed with apt.

GIT Clone

mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src/
git clone -b {environment_name} https://github.com/LCAS/environment_template.git --single-branch --depth=1
colcon build --merge-install --packages-select environment_template

APT install (in progress)

sudo sh -c 'echo "deb http://lcas.lincoln.ac.uk/ubuntu/main $(lsb_release -sc) main" > /etc/apt/sources.list.d/lcas-latest.list'
sudo apt-get install lcas_environments_{environment_name}

Access

It is recommended to add a direct source to the environment.sh into your ~/.bashrc file.

The files can then be accessed either through sourcing the environment.sh file, or

source environment.sh

ROS2

If installed as a ROS2 package, the environment.sh file can be accessed as follows:

# Export Configuration Files
PKG_LIST=$(ros2 pkg list)
SEARCH="environment_template"
if [[ "$PKG_LIST" == *"$SEARCH"* ]]; then
    ROS_ENV_TEMPLATE=$(ros2 pkg prefix environment_template)/share/environment_template
    [ -f $ROS_ENV_TEMPLATE/config/environment.sh ] && source $ROS_ENV_TEMPLATE/config/environment.sh
fi