Skip to content

Set up your developer environment

In this page we provide some tips to set up your developer environment. We recommend developing from a the PAL docker container.

Docker image to use and shared files

To develop aiming to deploy on a robot we strongly recommend using the PAL development docker. The PAL Public Docker is aimed for showcase of basic capabilities of the robot and does not contain neither the keys to update & upgrade from corporate nor the PAL tools to deploy in the robot.

PAL development docker creates a shared docker-host folder in $HOME/exchange. Make sure this folder exists in hour host PC. We strongly recommend to put there all developments you would like to compile against all the PAL stack, in particular, all ROS 2 workspaces and packages.

It is also recommended to store any other data you may generate from the docker container in this folder. This way no information will be lost if you remove the docker container, e.g., to update the image. If you don't need to update the image, it is recommended not to remove the docker container, specially if you manually install other software (e.g. python packages via pip, or debian packages via apt).

bashrc customization

Make sure to source the ROS environment and PAL OS in your ~/.bashrc (e.g., source /opt/ros/humble/setup.bash and source /opt/pal/alum/setup.bash). This way, you won't need to source it every time you open a new terminal.

If you plan to use the container to test software locally on you machine and do not deploy it to the robot, you can also source your workspace. If you plan to deploy the code on the robot, it is recommended not to source the worskpace. The deploy tool would potentially complain if a workspace is sourced. Remember you can source your local workspace in the terminal each time you need to test software locally.

You can also add any other customizations you may need, e.g., aliases to deploy the code to the robot (e.g., alias deploy="ros2 run pal_deploy deploy").

If you plan to test things locally in your PC, it is also recommended to add the ROS domain ID to your bashrc, and make sure that no one else in your network is using the same domain ID. By setting a specific default domain ID in your bashrc, you prevent streaming data from the robot to your PC and vice versa, in case you forget to set the domain ID in the terminal.

alias deploy="ros2 run pal_deploy deploy"` # useful alias to deploy code to the robot

source /opt/ros/humble/setup.bash
source /opt/pal/alum/setup.bash

source /path/to/your/workspace/install/setup.bash # only if you don't plan to deploy software to the robot, only test locally

export ROS_DOMAIN_ID=2 # if you plan to test things locally in your PC, set a default domain ID different from the robot's and other users in the network

Get started with simulation

If you still have not done so, get started with the simulation of you robot, in Gazebo or in MuJoCo.

Check you can visualize topics from the robot

Whenever you need to connect to the robot, either to run some nodes on your PC or to inspect some ROS information from the robot, you first need to make sure that you are in the same network as the robot. If it is not the case, connect to that network and restart your docker container.

Then, set your domain ID to be the same as the robot and make sure you can visualize the topics from the robot (e.g., ros2 topic list).

You can make use of the standard ROS2 tools visual interfaces, such as rqt or rviz to visually inspect the data from the robot.

Visualization of robot sensors
Figure 1: Visualization of robot sensors.

Tips to work with Visual Studio Code (optional)

If you use Visual Studio Code as your IDE, we recommend the following extensions: