- cd to this repo
-
docker build -f Dockerfile -t vslam:0.0.1 --build-arg NUM_THREADS=12 .
- a FBoW vocab file is saved to
VOCAB_FILE_PATH
- config/ is copied to
CONFIG_PATH
, which is set to/vslam_config
- a FBoW vocab file is saved to
-
docker run --rm -it -m 8g -u $(id -u):$(id -g) --net=host -v /dev/shm:/dev/shm -e ROS_DOMAIN_ID=$ROS_DOMAIN_ID -e RMW_IMPLEMENTATION=$RMW_IMPLEMENTATION vslam:0.0.1
- if you require X11, include
-v /tmp/.X11-unix/:/tmp/.X11-unix:ro -e DISPLAY=$DISPLAY
- to bind mount this repository, include
-v $(pwd):/ros2_ws/src/stella_vslam_ros
- to re-build with this bind mount:
colcon build --packages-select stella_vslam_ros
- to re-build with this bind mount:
- example of bind mounting a folder for saving maps:
mkdir maps
sudo chmod 777 maps
- include
-v $(pwd)/maps:/maps
ros2 service call /vslam/save_map nav2_msgs/srv/SaveMap "{map_url: "/maps/test_map"}"
- if you require X11, include
- ZED2 stereo:
ros2 run stella_vslam_ros vslam_node --ros-args -p vocab:=$VOCAB_FILE_PATH -p config:=$CONFIG_PATH/zed2.yaml -p publish_tf:=false -p camera_frame:=zed2_left_camera_frame -r camera/left/image_raw:=/zed2/zed_node/left/image_rect_gray -r camera/right/image_raw:=/zed2/zed_node/right/image_rect_gray
- if there is some error similar to
Error: Can't open display: :0
orFailed to open X display
:- Exit the container
xhost local:docker
- Re-run the container
- if there is some error similar to
config
: path to a config file, e.g. config/zed2.yamlvocab
: path to a vocab filerectify_stereo
(default: false): rectify inbound stereo image pairsmap
: loads a map file for localization if not empty
load_map
: load a map filesave_map
: save a map fileenable_mapping
: choose between SLAM (true) and localization only (false)
stella_vslam's ROS package.
camera/image_raw
camera/left/image_raw
camera/right/image_raw
camera/color/image_raw
camera/depth/image_raw
~/camera_pose
odom_frame
map_frame
base_link
camera_frame
publish_tf
transform_tolerance
use_exact_time
(stereo, RGBD only)
Users unfamiliar with docker, ROS2, or stella_vslam should refer to the tutorial.