RGB-D SLAM example on ROS and Raspberry Pi 3
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/RGB-D-SLAM-example-on-ROS-and-Raspberry-Pi-3-tp1250.html
RGB-D SLAM example on ROS and Raspberry Pi 3
Setup
In this example, I assume that IP of RPi is 192.168.0.3 and that the one of the client computer is 192.168.0.2. You can get IPs with "$ ifconfig". The ROS master will be running on RPi. Mapping will be done on RPi, and only visualization on the client computer. A Kinect v1 is connected on RPi.
Raspberry Pi
$ export ROS_IP=192.168.0.3
$ roslaunch freenect_launch freenect.launch depth_registration:=true data_skip:=2
$ roslaunch rtabmap_ros rgbd_mapping.launch rtabmap_args:="--delete_db_on_start --Vis/MaxFeatures 500 --Mem/ImagePreDecimation 2 --Mem/ImagePostDecimation 2 --Kp/DetectorStrategy 6 --OdomF2M/MaxSize 1000 --Odom/ImageDecimation 2" rtabmapviz:=false
To increase odometry frame rate, input images are decimated by 2. This gives around 175 ms per frame for odometry. At 175 ms per frame, we don't need 30 Hz kinect frames, so data_skip is set to 2 to save some computation time. Here is the CPU usage on RPi ("nodelet" is freenect_launch):

Client computer
$ export ROS_MASTER_URI=http://192.168.0.3:11311
$ export ROS_IP=192.168.0.2
$ ROS_NAMESPACE=rtabmap
$ rosrun rtabmap_ros rtabmapviz _subscribe_odom_info:=false _frame_id:=camera_link
Well, RVIZ could also be used.


cheers