(SOLVED) New Rasberry Pi 3 B+

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

Re: New Rasberry Pi 3 B+

Corbald
Success! make install finishes and reports success, but it seems to have stripped all the path info out, reporting:

-- Set runtime path of "/usr/local/bin/rtabmap" to ""
-- Installing: /usr/local/bin/rtabmap-console
-- Set runtime path of "/usr/local/bin/rtabmap-console" to ""
-- Installing: /usr/local/bin/rtabmap-extractObject
-- Set runtime path of "/usr/local/bin/rtabmap-extractObject" to ""
-- Installing: /usr/local/bin/rtabmap-camera
-- Set runtime path of "/usr/local/bin/rtabmap-camera" to ""
-- Installing: /usr/local/bin/rtabmap-rgbd_camera
-- Set runtime path of "/usr/local/bin/rtabmap-rgbd_camera" to ""
-- Installing: /usr/local/bin/rtabmap-kitti_dataset
-- Set runtime path of "/usr/local/bin/rtabmap-kitti_dataset" to ""
-- Installing: /usr/local/bin/rtabmap-rgbd_dataset
-- Set runtime path of "/usr/local/bin/rtabmap-rgbd_dataset" to ""
-- Installing: /usr/local/bin/rtabmap-recovery
-- Set runtime path of "/usr/local/bin/rtabmap-recovery" to ""
-- Installing: /usr/local/bin/rtabmap-reprocess
-- Set runtime path of "/usr/local/bin/rtabmap-reprocess" to ""
-- Installing: /usr/local/bin/rtabmap-detectMoreLoopClosures
-- Set runtime path of "/usr/local/bin/rtabmap-detectMoreLoopClosures" to ""
-- Installing: /usr/local/bin/rtabmap-databaseViewer
-- Set runtime path of "/usr/local/bin/rtabmap-databaseViewer" to ""
-- Installing: /usr/local/bin/rtabmap-odometryViewer
-- Set runtime path of "/usr/local/bin/rtabmap-odometryViewer" to ""
-- Installing: /usr/local/bin/rtabmap-dataRecorder
-- Set runtime path of "/usr/local/bin/rtabmap-dataRecorder" to ""
-- Installing: /usr/local/bin/rtabmap-calibration
-- Set runtime path of "/usr/local/bin/rtabmap-calibration" to ""
-- Installing: /usr/local/bin/rtabmap-report
-- Set runtime path of "/usr/local/bin/rtabmap-report" to ""
There were more before that, but they scrolled beyond the terminal's limit.... Is there a better way of fixing this than replacing each one manually?
Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

matlabbe
Administrator
This post was updated on .
Hi,

I confirm that it is working here too. I committed the fix. The tuning guide is for ROS, thus I created a config file with the same parameters for the standalone app. You can download this file rpi3.ini and load it in Preferences dialog of RTAB-Map. I tested with OpenNi2 driver and a Xtion Live Pro. You can close the Odometry panel if the gui is lagging too much.

For the runtime path modified, it is normal. Make sure to do "sudo ldconfig" so that rtabmap can find its libraries when starting. I updated the guide.

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

Re: New Rasberry Pi 3 B+

Corbald
I appreciate the heck outta all of your help! I'll drop one more post in later as a wrap up after I have it all working as expected. TY again!
Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

Corbald
Rtabmap runs and seems to be functional, however it doesn't see the Kinect (1414 or 'for XBOX 360'), despite lsusb returning:

Bus 001 Device 023: ID 045e:02ae Microsoft Corp. Xbox NUI Camera
Bus 001 Device 020: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor
Bus 001 Device 021: ID 045e:02ad Microsoft Corp. Xbox NUI Audio

Bus 001 Device 019: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 004: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I know the Kinect works, as I can use it with Rtabmap on my windows 10 pc.
Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

matlabbe
Administrator
Try freenect driver. I tested on my kinect 360 (model 1414) and it works.
Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

Corbald
No luck :/

pi@raspberrypi:~ $ rtabmap
libEGL warning: DRI2: failed to authenticate
qt5ct: using qt5ct plugin
qt5ct: custom style sheet is disabled
qt5ct: D-Bus global menu: no
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Program started...
send_cmd: Input control transfer failed (18)
freenect_fetch_zero_plane_info: send_cmd read 18 bytes (expected 322)
freenect_camera_init(): Failed to fetch zero plane info for device
[ERROR] (2018-11-29 10:07:40.119) CameraFreenect.cpp:88::init() FreenectDevice: Cannot open Kinect
[ERROR] (2018-11-29 10:07:40.122) CameraFreenect.cpp:338::init() CameraFreenect: Init failed!
[ WARN] (2018-11-29 10:07:40.123) CameraModel.cpp:358::load() Could not load calibration file "/home/pi/Documents/RTAB-Map/camera_info/_depth.yaml".
[ WARN] (2018-11-29 10:07:40.123) CameraModel.cpp:358::load() Could not load calibration file "/home/pi/Documents/RTAB-Map/camera_info/_rgb.yaml".
[ WARN] (2018-11-29 10:07:40.123) CameraFreenect.cpp:358::init() Missing calibration files for camera "" in "/home/pi/Documents/RTAB-Map/camera_info" folder, default calibration used.
send_cmd: Output control transfer failed (-1)
freenect_fetch_reg_pad_info: send_cmd read -1 bytes (expected 8)
freenect_camera_init(): Failed to fetch registration pad info for device
[ERROR] (2018-11-29 10:07:40.125) CameraFreenect.cpp:88::init() FreenectDevice: Cannot open Kinect
[ERROR] (2018-11-29 10:07:40.126) CameraFreenect.cpp:381::init() CameraFreenect: Init failed!
[ WARN] (2018-11-29 10:07:40.129) PreferencesDialog.cpp:5346::createCamera() init camera failed...
Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

matlabbe
Administrator
I reproduced the error after a couple of restarts. Maybe it is an usb issue. Try restarting multiple times to see if it can open it. I have only mouse, keyboard and kinect connected to RPI.

Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

Corbald
This post was updated on .
I'll give it a shot. I'm only running the Kinect. The Pi is headless. Meanwhile, I'm not getting any title-bar on the GUI. I have to alt-tab around. Not a deal breaker, but if it's fixable....

No luck so far. Tried rebooting dozens of times. Tried the Kinect in every USB port. Nothing.
Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

matlabbe
Administrator
To see if you can actually use the kinect on your RPI, you may try building freenect library to get their small testing app:
http://blog.bitcollectors.com/adam/2016/01/kinect-support-for-raspberry-pi-using-libfreenect/

If their simple viewer is working, rtabmap should be able to work when built with that version.

For the titlebar, maybe it is an option somewhere on RPI to hide/show them by default:
https://forum.dexterindustries.com/t/solved-no-title-bar-for-each-window-opened-in-raspbian/3707/6

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

Re: New Rasberry Pi 3 B+

Corbald
This post was updated on .
freenect-camtest gives me

[Stream 70] Inconsistent flag 75 with 237 packets in buf (242 total), resyncing...
Received video frame at -351702810
[Stream 70] Invalid magic ffff
[Stream 70] Invalid magic ffff
[Stream 70] Lost 5 packets
[Stream 70] Lost 11085 total packets in 94 frames (117.925529 lppf)
[Stream 70] Invalid magic ffff
[Stream 70] Invalid magic ffff
[Stream 70] Lost 6 packets
[Stream 70] Lost 11091 total packets in 94 frames (117.989365 lppf)
[Stream 70] Lost too many packets, resyncing...
Received video frame at -349702523
^CReceived depth frame at -348259205
Received video frame at -347702235
[Stream 70] Invalid magic ffff
[Stream 70] Invalid magic ffff
[Stream 70] Lost 6 packets
[Stream 70] Lost 11097 total packets in 95 frames (116.810524 lppf)
[Stream 70] Lost too many packets, resyncing...
Shutting down
write_register: 0x0006 <= 0x00
Received video frame at -345701948
Received video frame at -343701660
Received video frame at -341701373
write_register: 0x0005 <= 0x00
Done!
until I ctrl-C

freenect-glpclview and freenect-glview gives me

pi@raspberrypi:~ $ freenect-glpclview
send_cmd: Input control transfer failed (18)
freenect_fetch_reg_info: send_cmd read 18 bytes (expected 118)
send_cmd: Output control transfer failed (-1)
freenect_fetch_reg_const_shift: send_cmd read -1 bytes (expected 8)
freenect_camera_init(): Failed to fetch const shift for device
Error: Invalid index [0]
Error: Kinect not connected?
pi@raspberrypi:~ $ freenect-glview
Kinect camera test
Number of devices found: 1
send_cmd: Input control transfer failed (18)
freenect_fetch_zero_plane_info: send_cmd read 18 bytes (expected 322)
freenect_camera_init(): Failed to fetch zero plane info for device
Could not open device
Device 0x3c7648 open during shutdown, closing...
pi@raspberrypi:~ $
I should probably have said this earlier, but I'm the outlier with regards to statistical probability of 'getting things to work,' in that I rarely do... Sorry to drag you into this void of tech support :/
Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

matlabbe
Administrator
This post was updated on .
Some related posts:
(low voltage problem) https://github.com/OpenKinect/libfreenect/issues/524
(timing problem) https://raspberrypi.stackexchange.com/questions/74655/erratic-errors-in-libfreenect-on-raspberry-pi-3

Probably it's ok, but just make sure that the kinect's power is plugged into wall.

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

Re: New Rasberry Pi 3 B+

Corbald
This post was updated on .
looks like the timing solution is already applied. I'm scrounging around for another power supply. I'm running the Pi on 2a cell phone wall wort. I'll see if there's a better one around.

Ok, it was the power, at least for the freenect tools. I got video data with freenect-glview! It still doesn't work with rtabmap. I'm assuming I need to compile rtab with that version of freenect, somehow?
Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

matlabbe
Administrator
For reference, my RPI uses a 5V 2.5A power supply. To use freenect built from source, uninstall the binaries:
$ sudo apt-get remove libfreenect*

If the other libfreenect is installed in /usr/local, rtabmap should be able to find it with cmake. Before compilation, verify that WITH_FREENECT is TRUE when doing cmake in rtabmap/build.

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

Re: New Rasberry Pi 3 B+

Corbald
This post was updated on .
I found a 2.5a supply, which seemed to help. I'm going to try recompiling with this new freenect.

pi@raspberrypi:~/rtabmap/build $ cmake ..
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/arm-linux-gnueabihf/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake"
but not all the files it references.

-- PCL definitions don't contain "-march=native", make sure all libraries using Eigen are also compiled without that flag to avoid some segmentation faults (with gdb referring to some Eigen functions).
-- Found Sqlite3: /usr/include /usr/lib/arm-linux-gnueabihf/libsqlite3.so
-- Found OpenMP
-- Found OpenCV: /usr/include/opencv;/usr/include
-- Found PCL: /usr/include/pcl-1.8;/usr/include/eigen3;/usr/include;/usr/include/ni;/usr/include/openni2;/usr/include/vtk-6.3;/usr/include/freetype2;/usr/lib/arm-linux-gnueabihf/openmpi/include/openmpi;/usr/lib/arm-linux-gnueabihf/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent;/usr/lib/arm-linux-gnueabihf/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include;/usr/lib/arm-linux-gnueabihf/openmpi/include;/usr/include/python2.7;/usr/include/arm-linux-gnueabihf;/usr/include/hdf5/openmpi;/usr/include/libxml2;/usr/include/jsoncpp;/usr/include/tcl
-- Found ZLIB: /usr/include
CMake Warning at /usr/lib/arm-linux-gnueabihf/cmake/Qt5/Qt5Config.cmake:26 (find_package):
  Could not find a package configuration file provided by "Qt5Svg" with any
  of the following names:

    Qt5SvgConfig.cmake
    qt5svg-config.cmake

  Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
  "Qt5Svg_DIR" to a directory containing one of the above files.  If "Qt5Svg"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:250 (FIND_PACKAGE)


CMake Warning at /usr/lib/arm-linux-gnueabihf/cmake/Qt5/Qt5Config.cmake:35 (message):
  Failed to find Qt5 component "Svg" config file at
  "/usr/lib/arm-linux-gnueabihf/cmake/Qt5Svg/Qt5SvgConfig.cmake"
Call Stack (most recent call first):
  CMakeLists.txt:250 (FIND_PACKAGE)


-- VTK_RENDERING_BACKEND=OpenGL
-- Found Freenect: /usr/include
-- Found OpenNI2: /usr/include/openni2
-- Found DC1394: /usr/include/dc1394
-- Could NOT find CSPARSE (missing:  CSPARSE_INCLUDE_DIR CSPARSE_LIBRARY)
-- FlyCapture2_INCLUDE_DIR=FlyCapture2_INCLUDE_DIR-NOTFOUND
-- FlyCapture2_LIBRARY=FlyCapture2_LIBRARY-NOTFOUND
-- Triclops_INCLUDE_DIR=Triclops_INCLUDE_DIR-NOTFOUND
-- Triclops_LIBRARY=Triclops_LIBRARY-NOTFOUND
-- FlyCaptureBridge_LIBRARY=FlyCaptureBridge_LIBRARY-NOTFOUND
-- Found Pthreads
-- yaml-cpp not found, euroc_dataset tool won't be built...
-- --------------------------------------------
-- Info :
--   Version : 0.18.2
--   CMAKE_INSTALL_PREFIX = /usr/local
--   CMAKE_BUILD_TYPE =     Release
--   CMAKE_INSTALL_LIBDIR = lib
--   BUILD_APP =            ON
--   BUILD_TOOLS =          ON
--   BUILD_EXAMPLES =       ON
--   BUILD_SHARED_LIBS =    ON
--   CMAKE_CXX_FLAGS =  -fmessage-length=0  -fopenmp
--   PCL_DEFINITIONS = -DEIGEN_USE_NEW_STDVECTOR;-DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET;-DFLANN_STATIC;-Dqh_QHpointer
-- Optional dependencies ('*' affects some default parameters) :
--  *With OpenCV 2 nonfree module (SIFT/SURF) = NO (not found, License: BSD)
--   With external SQLite3     = YES (License: Public Domain)
--   With Freenect             = YES (License: Apache v2 and/or GPLv2)
--   With OpenNI2              = YES (License: Apache v2)
--   With Freenect2            = NO (libfreenect2 not found)
--   With Kinect for Windows 2 = NO (Kinect for Windows 2 SDK not found)
--   With dc1394               = YES (License: LGPL)
--   With FlyCapture2/Triclops = NO (Point Grey SDK not found)
--   With TORO                 = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])
--  *With g2o                  = NO (g2o not found)
--  *With GTSAM                = NO (GTSAM not found)
--   With VERTIGO              = NO (GTSAM or g2o required)
--   With cvsba                = NO (cvsba not found)
--  *With libpointmatcher      = NO (libpointmatcher not found)
--   With loam_velodyne        = NO (loam_velodyne not found)
--   With ZED                  = NO (ZED sdk not found)
--   With RealSense            = NO (librealsense not found)
--   With RealSense2           = NO (librealsense2 not found)
--   With OCTOMAP              = NO (octomap not found)
--   With CPUTSDF              = NO (CPUTSDF not found)
--   With OpenChisel           = NO (open_chisel not found)
--   With libfovis             = NO (libfovis not found)
--   With libviso2             = NO (libviso2 not found)
--   With dvo_core             = NO (dvo_core not found)
--   With okvis                = NO (okvis not found)
--   With msckf_vio            = NO (WITH_MSCKF_VIO=OFF)
--   With ORB_SLAM2            = NO (ORB_SLAM2 not found, make sure environment variable ORB_SLAM2_ROOT_DIR is set)
--   With Qt5                  = YES (License: Open Source or Commercial)
-- --------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/rtabmap/build
pi@raspberrypi:~/rtabmap/build $ make
[  5%] Built target rtabmap_utilite
[  5%] Built target res_tool
make[2]: *** No rule to make target '/usr/lib/arm-linux-gnueabihf/libfreenect.so', needed by '../bin/librtabmap_core.so.0.18.2'.  Stop.
CMakeFiles/Makefile2:267: recipe for target 'corelib/src/CMakeFiles/rtabmap_core.dir/all' failed
make[1]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
pi@raspberrypi:~/rtabmap/build $
Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

Corbald
As far as I could get. I believe the latest freenect is installed, but I can't compile rtab now.

[ 10%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/camera/CameraFreenect.cpp.o
/home/pi/rtabmap/corelib/src/camera/CameraFreenect.cpp:34:25: fatal error: libfreenect.h: No such file or directory

                         ^
compilation terminated.
corelib/src/CMakeFiles/rtabmap_core.dir/build.make:331: recipe for target 'corelib/src/CMakeFiles/rtabmap_core.dir/camera/CameraFreenect.cpp.o' failed
make[2]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/camera/CameraFreenect.cpp.o] Error 1
CMakeFiles/Makefile2:267: recipe for target 'corelib/src/CMakeFiles/rtabmap_core.dir/all' failed
make[1]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
pi@raspberrypi:~/rtabmap/build $
I do have libfreenect.h
pi@raspberrypi:~/rtabmap/build $ sudo find / -type f -name 'libfreenect.h'
find: ‘/run/user/1000/gvfs’: Permission denied
/home/pi/src/libfreenect/include/libfreenect.h
/home/pi/src/libfreenect_old/include/libfreenect.h
/home/pi/src/libfreenect-0.5.7/include/libfreenect.h
find: ‘/proc/756/task/756/net’: Invalid argument
find: ‘/proc/756/net’: Invalid argument
/usr/local/include/libfreenect/libfreenect.h
pi@raspberrypi:~/rtabmap/build $
Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

matlabbe
Administrator
It should be the one in "/usr/local/include/libfreenect". Not sure why that directory is somewhat not added to include directories. I did try on my mac with latest freenect version and freenect still install headers in "/usr/local/include/libfreenect". RTAB-Map should be used "/usr/local/include/libfreenect" directory. When doing cmake in rtabmap, you should see in the list of found dependencies something like this:
-- Found Freenect: /usr/local/include/libfreenect

Another reason is that build cache of rtabmap didn't update properly. Remove everything in rtabmap/build and do a clean cmake so that the correct path (as above) is added for freenect.

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

Re: New Rasberry Pi 3 B+

Corbald
This post was updated on .
I tried 'make clean' but I'm guessing that's not clean enough! :P I'll give it a shot here in a bit!

..

It's definitely seeing it. I'm guessing it was just the already built stuff interfering. Building now.
Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

matlabbe
Administrator
It is a problem with cmake when changing a dependency's location. Cmake keeps in cache some variables (like paths) and won't update them on next cmake. "make clean" only removes compiled files. We could only delete the CMakeCache.txt to force cmake to re-update the cache, though I generally prefer to remove everything in build to make sure everything is re-initialized.

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

Re: New Rasberry Pi 3 B+

Corbald
Yeah, I can see that now! It's past the half way point, and proceeding fine, so far. I'll keep you posted.
Reply | Threaded
Open this post in threaded view
|

Re: New Rasberry Pi 3 B+

Corbald
It works! In the end, it looks like it was libfreenect 0.5.7 which did it, and I think that building it from source is the only step that still needs to go in the guide! Thanks again for all the help!

Incidentally, the 'no title bar' issue is also resolved.
123