Re: RGB-D SLAM example on ROS and Raspberry Pi 3

Posted by Lewthie on
URL: http://official-rtab-map-forum.206.s1.nabble.com/RGB-D-SLAM-example-on-ROS-and-Raspberry-Pi-3-tp1250p1260.html

Super helpful. Thanks so much for the step by step. Unfortunately, while I can get successful connection between my RPi and Client. I can't see anything in my RTABMAPVIZ window.

I am using a Raspberry Pi 2 Model B running Lubuntu 14.04 connected to an Asus Xtion Pro Live with Openni2. My client computer is running Ubuntu 14.04. I've confirmed the connection since I can run rviz on the client computer and received visual data from the camera. However, when I try to run rtabmapviz, the screen is completely empty. I've followed your instructions carefully, changing only freenect to openni2 where necessary and I feel this may be the source of the problem.

How should I modify the commands for an Openni2 camera?

Regards

matlabbe wrote

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