Permission Denied Error
For a permission denied error when running a script:
$ ./run_interactive_docker.sh eiforamr-full-flavour-sdk:<TAG> eiforamr
bash: ./run_interactive_docker.sh Permission denied
Give executable permission to the script:
chmod 755 run_interactive_docker.sh
DISPLAY Environment Variable Error
For errors related to the DISPLAY environment variable when trying to open the Docker* container or a GUI application, enter the command:
If this variable is empty, it causes issues when opening applications that need a GUI.
The most common solution is to give it the 0:0 value:
export DISPLAY= "0:0"
If the connection with the system is via VNC, DISPLAY should be already set.
If it is not, find out the value of DISPLAY set by vncserver and then set the correct value:
ps ax |grep vncserver
/usr/bin/Xtigervnc :42 -desktop ....
/usr/bin/perl /usr/bin/vncserver -localhost no -geometry 1920x1000 -depth 24 :42
export DISPLAY= ":42"
Use ROS_DOMAIN_ID to Avoid Interference in ROS Messages
A typical method to demonstrate a use case requires you to start a container (or group of containers) and exchange ROS messages between various ROS nodes. However, interference from other ROS nodes can disrupt the whole process. For example, you might receive ROS messages from unknown nodes that are not intended for the demo use case. These other nodes could be on the same host machine or on other host machines within the local network. In this scenario, it can be difficult to debug and resolve the interference.
You can avoid this by declaring ROS_DOMAIN_ID as a fixed numeric value per use case, under the following conditions:
The ROS_DOMAIN_ID should be same for all containers launched for a particular use case.
The ROS_DOMAIN_ID should be an integer between 0 and 101.
After launching the container, you can declare it with:
For more information, go to: ROS_DOMAIN_ID
To add the ROS_DOMAIN_ID, you can choose any of the below options.
Add it in the common.yml file for all containers:
# In file 01_docker_sdk_env/docker_compose/common/common.yml
# ROS_DOMAIN_ID can be added that applies to all use cases
ROS_DOMAIN_ID: <choose ID>
Add it in the .env file for all containers:
# In file 01_docker_sdk_env/docker_compose/01_amr/.env
# add below line and provide ROS_DOMAIN_ID
Add it in the specific yml file for a specific use case for specific targets:
# In the below example, ROS_DOMAIN_ID is added in ros-base target
# For any use case where this target is used, the ROS_DOMAIN_ID is set to the given value.
ROS_DOMAIN_ID: <choose ID>
Add it in the specific yml file in the command: section and apply only after launching the containers:
# In file 01_docker_sdk_env/docker_compose/05_tutorials/fleet_mngmnt_with_low_battery.up.tutorial.yml
# In the below example, ROS_DOMAIN_ID is set to 58
# You may change it to any new value as per use case requirement.
ros2 run battery_pkg battery_bridge
Add it while running a container using the run_interactive_docker.sh script:
# by adding env parameter, ROS_DOMAIN_ID can be exported inside container:
./run_interactive_docker.sh <image name> <user> --extra_params "-e ROS_DOMAIN_ID=<choose ID>"
You can use any number between 0 and 101 (inclusive), to set ROS_DOMAIN_ID
, as long as it is not used by a different ROS system.
Be aware that you can also use these options to modify other environment variables.
System HOME Directory Issues
If your test system uses $HOME mounted in remote volumes, for example, in a network file system (NFS), you may encounter the error below when you try to run a Docker* image using the ./run_interactive_docker.sh script:
docker: Error response from daemon: error while creating mount source path '/nfs/site/home/<user>': mkdir /nfs/site/home/<user>: file exists.
To avoid this, before you run a Docker* image, create a new directory in /tmp (or any locally mounted volume), and set $HOME to the new path:
./run_interactive_docker.sh eiforamr-full-flavour-sdk:<release_tag> eiforamr