-
Notifications
You must be signed in to change notification settings - Fork 5
Running traversability with a real robot!
git clone -b traversability_integration https://github.com/suchetanrs/ORB-SLAM3-ROS2-Docker
cd ORB-SLAM3-ROS2-Docker
git submodule update --init --recursive --remote
cd ORB-SLAM3-ROS2-Docker
sudo chmod +x container_root/shell_scripts/docker_install.sh
./container_root/shell_scripts/docker_install.sh
- Build the image:
sudo docker build -t orb-slam3-humble:22.04 .
- Add
xhost +
to your.bashrc
to support correct x11-forwarding usingecho "xhost +" >> ~/.bashrc
source ~/.bashrc
- You can see the built images on your machine by running
sudo docker images
.
-
cd ORB-SLAM3-ROS2-Docker
(ignore if you are already in the folder) sudo docker compose run orb_slam3_22_humble
- This should take you inside the container. Once you are inside, run the command
xeyes
and a pair of eyes should pop-up. If they do, x11 forwarding has correctly been setup on your computer.
Launch the container using steps in (4).
cd /home/traversability/traversability_mapping && ./build.sh
cd /root/colcon_ws/
colcon build --symlink-install
source install/setup.bash
cd /root/trav_ws/
colcon build --symlink-install
source install/setup.bash
Please consider using the VLP-16. Heavy lidars such as OS-128 can lead to very fast RAM memory exhaustion if loop closing is enabled (it is enabled for ORB-SLAM3).
Please rebuild the packages after making parameter changes. The information to do this is given in the upcoming sections.
Inside the docker container there are 3 configuration files you need to tune to run traversability with ORB-SLAM3. These changes are saved and you don't need to rebuild the docker container after making the change. However, you need to rebuild the packages within the container.
The path of the file you need to edit inside the docker container is:
/root/colcon_ws/src/orb_slam3_ros2_wrapper/params/gazebo_rgbd.yaml
You can ignore the parameters for IMU since we run ORB-SLAM3 only in the RGBD mode. Please make sure to edit the camera calibration parameters. If you are running this on a realsense D435i, have a look at these parameters and put them into gazebo_rgbd.yaml
These parameters are not absolute, you may need to re-calibrate your realsense.
The second file you need to edit is:
/root/colcon_ws/src/orb_slam3_ros2_wrapper/params/rgbd-ros-params.yaml
In this, you can leave everything untouched except for the topic names. The topic names are namespaced by default. The namespace is /robot_0
. If you wish to use an absolute topic name, set the parameter values to /topic_name
instead of topic_name
.
If you are running the SLAM via ssh
and not directly on the robot, set the visualization
to false
to avoid X server issues.
There is one file you need to configure: /home/traversability/traversability_mapping/traversability_mapping/params/traversabilityParams.yaml
.
This file has already been configured to use with ORB-SLAM3. The only thing you need to change is the transformation between the lidar and robot body. That is,
T_SLAMFrameToLidarFrame:
quaternion:
x: 0.0
y: 0.2474
z: 0.0
w: 0.9689
translation:
x: 0.0
y: 0.0
z: 0.6
After making these edits, please rebuild the everything using:
cd /home/traversability/traversability_mapping && ./build.sh
cd /home/orb/ORB_SLAM3 && ./build.sh
cd /root/trav_ws/
colcon build --symlink-install
source install/setup.bash
cd /root/colcon_ws/
colcon build --symlink-install
source install/setup.bash
You can use this https://www.andre-gaschler.com/rotationconverter/
to find your values in quaternion. The existing parameter is for a lidar pointed to the front of the robot (You can see how it is placed in the simulation)
ros2 launch orb_slam3_ros2_wrapper unirobot.launch.py