Visible to Intel only — GUID: GUID-8AA38D86-3512-4750-9219-EAD44B099E88
Visible to Intel only — GUID: GUID-8AA38D86-3512-4750-9219-EAD44B099E88
Kudan Visual SLAM
This tutorial tells you how to run a Kudan Visual SLAM (KdVisual) system using a ROS 2 bag as the input containing data of a robot exploring an area.
The ROS 2 tool rviz2 is used to visualize how KdVisual interprets the data from the ROS 2 bag.
Find more information about Kudan Visual SLAM here.
Find more information on Kudan in general here.
Download the Optional Kudan Visual SLAM (KdVisual) Bundle
Download the Robot Complete Kit with the optional Kudan Visual SLAM (KdVisual) bundle.
Go to the Product Download page.
Select the Robot Complete Kit.
Click Customize Download.
Make sure that AMR Kudan SLAM is selected:
This may be in Step 1 or Step 3 depending on the use case you selected.
Click Next until you get to Download.
Click Download.
During installation, you are prompted to enter your product key, so copy the product key displayed on the download page.
Copy edge_insights_for_amr.zip from the developer workstation to the Home directory on your target system. You can use a USB flash drive to copy the file.
Install EI for AMR
Set up a proxy (optional): If a proxy is required to connect to the Internet, add the proxy settings as described below, updating <http_proxy> and <https_proxy> to your actual proxy.
Add proxies in /etc/apt/apt.conf.d/proxy.conf:
echo 'Acquire::http::proxy "http://<http_proxy>:port";' | sudo tee -a /etc/apt/apt.conf.d/proxy.conf echo 'Acquire::https::proxy "http://<https_proxy>:port";' | sudo tee -a /etc/apt/apt.conf.d/proxy.conf
Change the environment.
Change the environment for all users on the system:
sudo su echo 'export http_proxy="http://<http_proxy>:port"' >> /etc/environment echo 'export https_proxy="http://<https_proxy>:port"' >> /etc/environment echo 'export ftp_proxy="http://<ftp_proxy>:port"' >> /etc/environment echo 'export no_proxy="<no_proxy>"' >> /etc/environment exit source /etc/environment
NOTE:These steps are needed only once per host. They do not have to be done for different users or different logins of the same user.Change the environment for the current user only:
echo 'export http_proxy="http://<http_proxy>:port"' >> ~/.bashrc echo 'export https_proxy="http://<https_proxy>:port"' >> ~/.bashrc echo 'export ftp_proxy="http://<ftp_proxy>:port"' >> ~/.bashrc echo 'export no_proxy="<no_proxy>"' >> ~/.bashrc source ~/.bashrc
Read and follow best practices as described in this Linux* wiki about environment variables.
Edit the /etc/sudoers file with visudo:
sudo visudo # Add after other lines that add Defaults: Defaults env_keep += "ftp_proxy http_proxy https_proxy no_proxy"
Run the following commands to go to the directory, change permission of the executable edgesoftware file, and install the bundle:
cd edge_insights_for_amr chmod 775 edgesoftware sudo groupadd docker sudo usermod -aG docker $USER newgrp docker ./edgesoftware install
Type the product key at the prompt:
NOTE:The product key is displayed on the download page. Contact Support Forum if it is not.Based on components selected and system configuration, you might be prompted for additional actions. For example, if your system is behind a proxy, you are asked to enter proxy settings.
When the installation is complete, you see an installation complete message and the installation status for each module.
If any of the installed modules report a failure in the Status column due to a break in the internet connection or for any other reason, run the install again:
./edgesoftware install
Set the correct ownership:
sudo chown $USER:$USER * -R
Verify that all Docker* images were downloaded:
docker image list
Expected output includes all downloaded containers:
REPOSITORY TAG IMAGE ID CREATED SIZE amr-nav2 2022.3 eiforamr-full-flavour-sdk 2022.3 amr-object-detection 2022.3 . .
Run the Sample Application
Check if your installation has the amr-kudan-slam Docker* image.
docker images |grep amr-kudan-slam #if you have it installed, the result is: amr-kudan-slam
NOTE:If the image is not installed, continuing with these steps triggers a build that takes longer than an hour (sometimes, a lot longer depending on the system resources and internet connection).If the image is not installed, Intel recommends repeating the Download the Optional Kudan Visual SLAM (KdVisual) Bundle step.
Go to the AMR_containers folder:
cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_*/AMR_containers
Prepare the environment setup:
source ./01_docker_sdk_env/docker_compose/common/docker_compose.source export CONTAINER_BASE_PATH=`pwd` export ROS_DOMAIN_ID=17 # If the bags were not extracted before, do it now unzip 01_docker_sdk_env/docker_compose/06_bags.zip -d 01_docker_sdk_env/docker_compose/ sudo chmod 0777 -R 01_docker_sdk_env/docker_compose/06_bags
Specify that the Docker* engine uses Release 2022.3.1 of the amr-kudan-slam Docker* image:
export DOCKER_TAG=2022.3.1
Run the Kudan Visual SLAM algorithm using a ROS 2 bag simulating a robot exploring an area:
docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/kudan-slam-cpu.tutorial.yml up
In rviz2, you can see what KdVisual does with the input from the ROS 2 bag.
To close this execution, close the rviz2 window, and press Ctrl-c in the terminal.
Clean up the Docker* images:
docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/kudan-slam-cpu.tutorial.yml down --remove-orphans
KdVisual can also offload some processing to the GPU. To demonstrate this, use this example:
NOTE:Offloading to the GPU only works on systems with 11th Generation Intel® Core™ processors with Intel® Iris® Xe Integrated Graphics.docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/kudan-slam-gpu.tutorial.yml up
On a different terminal, check how much of the GPU is used using intel-gpu-top:
sudo apt-get install intel-gpu-tools sudo intel_gpu_top
To close this execution, close the rviz2 window, and press Ctrl-c in the terminal.
Cleanup the Docker* images:
docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/kudan-slam-gpu.tutorial.yml down --remove-orphans
Troubleshooting
If you encounter this error:
amr-kudan-slam | [kdvisual_ros2_rgbd-1] /workspace/src/gpu/l0_rt_helpers.h:56: L0 error 78000001
The render group might be on a different id then 109 which is placed in the yaml files used in the examples.
To find what id the render group has on your system:
getent group render cat /etc/group |grep render
If the result is different then: render:x:109 change the yml file:
gedit 01_docker_sdk_env/docker_compose/05_tutorials/kudan-slam-gpu.tutorial.yml # and/or gedit 01_docker_sdk_env/docker_compose/05_tutorials/kudan-slam-cpu.tutorial.yml # Change the at the line 26 from 109, to the number you got above.
If you encounter this error:
Failed to initialize SLAM, error 5 = The supplied license key is invalid or expired
Update the EI for AMR software to Release 2022.3.1; see the Get Started Guide for Robots for software install instructions.
If the Kudan Visual SLAM tutorial does not start within a few seconds and you see the message “Building kudan-slam,” the Docker* engine started building the incorrect version of the amr-kudan-slam image. Specify that the Docker* engine must use Release 2022.3.1 of the amr-kudan-slam Docker* image:
export DOCKER_TAG=2022.3.1
If you are building your own Kudan Visual SLAM Docker* image outside the amr-kudan-slam Docker* image, retrieve the updated license file (intel_amr.kdlicense) from the amr-kudan-slam:2022.3.1 Docker* image:
id=$(docker create amr-kudan-slam:2022.3.1) docker cp $id:/home/eiforamr/ros2_ws/install/kdvisual_ros2/share/kdvisual_ros2/config/intel_amr.kdlicense - > temp.tar docker rm -v $id tar xvf temp.tar && rm temp.tar
For general robot issues, go to: Troubleshooting for Robot Tutorials.
Did you find the information on this page useful?
Feedback Message
Characters remaining: