kinect v1 (kinect for xbox 360) driver installation for rtabmap

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

kinect v1 (kinect for xbox 360) driver installation for rtabmap

elgarbe
Hi, I'm trying to use a kinect 1 for 3d mapping or 2d slam. First I want to test that it is working ok.
The first thing I do is
sudo apt-get install ros-kinetic-rtabmap-ros
the run rtabmap. Crate new database, choose freenect driver and click on Play button. Few second later I get "the camera has reach the end of stream" and no image.
rtabmap terminal:

elgarbe@i7:~$ rtabmap
[ WARN] (2019-08-30 22:00:57.620) Parameters.cpp:1113::readINI() Section "Core" in /home/elgarbe/.rtabmap/rtabmap.ini doesn't exist... Ignore this warning if the ini file does not exist yet. The ini file will be automatically created when rtabmap will close.
Program started...
Could not open audio: -1
[ WARN] (2019-08-30 22:01:41.824) CameraModel.cpp:358::load() Could not load calibration file "/home/elgarbe/Documents/RTAB-Map/camera_info/A70773W02670238A_depth.yaml".
[ WARN] (2019-08-30 22:01:41.824) CameraModel.cpp:358::load() Could not load calibration file "/home/elgarbe/Documents/RTAB-Map/camera_info/A70773W02670238A_rgb.yaml".
[ WARN] (2019-08-30 22:01:41.824) CameraFreenect.cpp:367::init() Missing calibration files for camera "A70773W02670238A" in "/home/elgarbe/Documents/RTAB-Map/camera_info" folder, default calibration used.
[ERROR] (2019-08-30 22:01:50.224) CameraFreenect.cpp:156::getData() Not received any frames since 5 seconds, try to restart the camera again.
[ WARN] (2019-08-30 22:01:50.224) CameraThread.cpp:156::mainLoop() no more images...
Could not open audio: -1
[ WARN] (2019-08-30 22:02:55.868) CameraModel.cpp:358::load() Could not load calibration file "/home/elgarbe/Documents/RTAB-Map/camera_info/A70773W02670238A_depth.yaml".
[ WARN] (2019-08-30 22:02:55.868) CameraModel.cpp:358::load() Could not load calibration file "/home/elgarbe/Documents/RTAB-Map/camera_info/A70773W02670238A_rgb.yaml".
[ WARN] (2019-08-30 22:02:55.868) CameraFreenect.cpp:367::init() Missing calibration files for camera "A70773W02670238A" in "/home/elgarbe/Documents/RTAB-Map/camera_info" folder, default calibration used.
[ERROR] (2019-08-30 22:03:04.274) CameraFreenect.cpp:156::getData() Not received any frames since 5 seconds, try to restart the camera again.
[ WARN] (2019-08-30 22:03:04.274) CameraThread.cpp:156::mainLoop() no more images...
[ERROR] (2019-08-30 22:03:26.856) CameraOpenni.cpp:136::init() OpenNI exception: virtual void pcl::OpenNIGrabber::start() in /build/pcl-6_P28C/pcl-1.7.2/io/src/openni_grabber.cpp @ 257 : Could not start streams. Reason: virtual void openni_wrapper::OpenNIDevice::startDepthStream() @ /build/pcl-6_P28C/pcl-1.7.2/io/src/openni_camera/openni_device.cpp @ 588 : starting depth stream failed. Reason: Device Protocol: Command Invalid!
[ WARN] (2019-08-30 22:03:27.245) PreferencesDialog.cpp:5550::createCamera() init camera failed... 
Could not open audio: -1
[ WARN] (2019-08-30 22:03:44.975) CameraModel.cpp:358::load() Could not load calibration file "/home/elgarbe/Documents/RTAB-Map/camera_info/A70773W02670238A_depth.yaml".
[ WARN] (2019-08-30 22:03:44.975) CameraModel.cpp:358::load() Could not load calibration file "/home/elgarbe/Documents/RTAB-Map/camera_info/A70773W02670238A_rgb.yaml".
[ WARN] (2019-08-30 22:03:44.975) CameraFreenect.cpp:367::init() Missing calibration files for camera "A70773W02670238A" in "/home/elgarbe/Documents/RTAB-Map/camera_info" folder, default calibration used.
[ERROR] (2019-08-30 22:03:53.343) CameraFreenect.cpp:156::getData() Not received any frames since 5 seconds, try to restart the camera again.
[ WARN] (2019-08-30 22:03:53.343) CameraThread.cpp:156::mainLoop() no more images...
Closing RTAB-Map...
All done!

So, I start to look at some other testing options but I found too many blogs and tutorials and don't know how to proced.
Any help?
Reply | Threaded
Open this post in threaded view
|

Re: kinect v1 (kinect for xbox 360) driver installation for rtabmap

elgarbe
I've installed

sudo apt install ros-kinetic-freenect-launch

and can roslaunch freenect_launch freenect.launch
and
rosrun image_view image_view image:=/camera/depth/image_raw
and
rosrun image_view image_view image:=/camera/rgb/image_raw

so, sensor is working ok.
But, now rtabmap is dead, it says "camera initialization faild"

how can I try with openni driver? I'm installed rtabmap from binary...

thank
Reply | Threaded
Open this post in threaded view
|

Re: kinect v1 (kinect for xbox 360) driver installation for rtabmap

matlabbe
Administrator
Hi,

The standalone binaries would work out-of-the-box for freenect driver, not sure what is the problem (are you on arm architecture?). Sometimes it fails the first time we click Play (no frames received), but clicking again works. As you have ros, can you try this example?
$ roslaunch freenect_launch freenect.launch depth_registration:=true
$ roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start"

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: kinect v1 (kinect for xbox 360) driver installation for rtabmap

elgarbe
I think I mess up with several driver installation, I've tried so many blogpost...
Is there a way to uninstall all openni and freenect driver from my system? I would like to start over on a clean system.
Right now I'm on x64, but I will go to arm soon (I have an odroid xu4)

Reply | Threaded
Open this post in threaded view
|

Re: kinect v1 (kinect for xbox 360) driver installation for rtabmap

matlabbe
Administrator
Hi,

If you built/installed some stuff from source, they would likely be installed in /usr/local prefix directory. On x64, kinectv1 drivers (libopenni-dev or libfreenect-dev) can be installed with apt-get. I prefer freenect generally.

The rtabmap binaries should use the system freenect library, you can try this to make sure you use the right rtabmap (if you built/installed also a version from source), use kinetic instead of melodic on 16.04:
$ /opt/ros/melodic/bin/rtabmap

Make sure you are not in a Virtual Machine. Make sure the kinect is powered in the wall (not just connected by usb).

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: kinect v1 (kinect for xbox 360) driver installation for rtabmap

elgarbe
Thank! I manage to make it work with freenect.
No I will move to rtabmap on odroid and record needed topics to make offline 3d mapping.
I will ask on a new thread.