Visible to Intel only — GUID: GUID-D68788E9-2C1C-42C3-84FD-4B74DCF2CFD2
Visible to Intel only — GUID: GUID-D68788E9-2C1C-42C3-84FD-4B74DCF2CFD2
Troubleshooting for Robot Tutorials
This guide lists common troubleshooting tips for robot tutorials.
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:
echo $DISPLAY
If this variable is empty, it will cause issues when opening applications that need 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:
For example:
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:
export ROS_DOMAIN_ID=<value>
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 services: common: environment: 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 ROS_DOMAIN_ID=<choose 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 will be set to the given value. services: ros-base: image: ${REPO_URL}amr-ubuntu2004-ros2-foxy-ros-base:${DOCKER_TAG:-latest} container_name: ${CONTAINER_NAME_PREFIX:-amr-sdk-}ros-base environment: ROS_DOMAIN_ID: <choose ID> env_file: - ./.env extends:
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. services: battery_bridge: image: ${REPO_URL}amr-ubuntu2004-ros2-foxy-battery_bridge:${DOCKER_TAG:-latest} container_name: ${CONTAINER_NAME_PREFIX:-amr-sdk-}battery_bridge extends: file: ../01_amr/amr-sdk.all.yml service: ros-base volumes: - /dev/battery_bridge:/dev/battery_bridge:rw build: target: battery_bridge network_mode: host restart: "no" command: - | source ros_entrypoint.sh source battery-bridge/src/prebuilt_battery_bridge/local_setup.bash export ROS_DOMAIN_ID=58 sleep 5 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>"
NOTE: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:
mkdir /tmp/tmp_home export HOME=/tmp/tmp_home ./run_interactive_docker.sh eiforamr-full-flavour-sdk:<release_tag> eiforamr