10 Replies Latest reply on Aug 1, 2017 1:47 PM by Intel Corporation

    RTABMAP on Euclid

    MPer

      Has anybody successfully run rtabmap (standalone) on Euclid. I compiled it from the sources and whenever you stop mapping the application receives a segfault. Here's the stack from gdb. (compiled with -g) Looks like the segfault is originating in an Intel provided library.

       

      Thanks,

       

      Methlal

       

       

      [Thread 0x7fff94d0c700 (LWP 2785) exited]

       

      Thread 11 "rtabmap" received signal SIGSEGV, Segmentation fault.

      [Switching to Thread 0x7fff970d3700 (LWP 2668)]

      0x00007fffd5ce85dd in motion::MotionHalListnerAdapter::MotionHAL_onNotify(motion::MotionHAL::NotifyMsg const&) () from /usr/lib/libslimAPI.so

      (gdb) btjavascript:;

      #0  0x00007fffd5ce85dd in motion::MotionHalListnerAdapter::MotionHAL_onNotify(motion::MotionHAL::NotifyMsg const&) () from /usr/lib/libslimAPI.so

      #1  0x00007fffccd7e91d in mmHAL::iAction_sACTIVE_eON_READ(perc::Message const&)

          () from /usr/lib/libmotionHAL.so

      #2  0x00007fffccb6379e in perc::Fsm::fireEvent(perc::Message const&) ()

         from /usr/lib/libinfra.so

      #3  0x00007fffccd7c678 in mmHAL::onRead(int, void*) ()

         from /usr/lib/libmotionHAL.so

      #4  0x00007fffccb5dc2b in perc::Dispatcher::threadLoop() ()

         from /usr/lib/libinfra.so

      #5  0x00007fffccb63159 in perc::Thread::_threadLoop(void*) ()

         from /usr/lib/libinfra.so

      #6  0x00007fffefb856ba in start_thread (arg=0x7fff970d3700)

          at pthread_create.c:333

      #7  0x00007ffff00a63dd in clone ()

          at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

      (gdb)

        • 1. Re: RTABMAP on Euclid
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi MPer,

          Thank you for contacting us. Please allow us to investigate further on this case. We’ll contact you as soon as we have more information.
          We appreciate your patience.

          Regards,
          -Sergio A
           

          • 2. Re: RTABMAP on Euclid
            amitmoran

            Hi,

             

            why did you compile from sources? you can simply install it, no?

             

            amit

            • 3. Re: RTABMAP on Euclid
              MPer

              The issue can be temporarily avoided by commenting out the deletion of the _camera object in the destructor but will obviously result in a memory leak. What's puzzling is that the issue is only seen on Euclid and not on a x86_64 Ubuntu laptop with ZR300.

               

              Thanks,

               

              Methlal

               

              Thread 1 "rtabmap" hit Breakpoint 1, rtabmap::CameraThread::~CameraThread (

                  this=0x40e76c0, __in_chrg=<optimized out>)

                  at /home/euclid/rtabmap/corelib/src/CameraThread.cpp:73

              73        join(true);

              (gdb) list

              68    }

              69   

              70    CameraThread::~CameraThread()

              71    {

              72        UDEBUG("");

              73        join(true);

              74    //    if(_camera)

              75    //    {

              76    //        delete _camera;

              77    //    }

               

              (gdb) print _camera

              $1 = (rtabmap::Camera *) 0x40cdd80 <-- pointer looks valid

               

              (gdb) bt

              #0  rtabmap::CameraThread::~CameraThread (this=0x40e76c0,

                  __in_chrg=<optimized out>)

                  at /home/euclid/rtabmap/corelib/src/CameraThread.cpp:73

               

              #1  0x00007ffff67af54a in rtabmap::CameraThread::~CameraThread (

                  this=0x40e76c0, __in_chrg=<optimized out>)

                  at /home/euclid/rtabmap/corelib/src/CameraThread.cpp:83

              #2  0x00007ffff7633e51 in rtabmap::MainWindow::stopDetection (this=0x9a0f30)

                  at /home/euclid/rtabmap/guilib/src/MainWindow.cpp:4661

              #3  0x00007ffff7999088 in rtabmap::MainWindow::qt_static_metacall (

                  _o=0x9a0f30, _c=QMetaObject::InvokeMetaMethod, _id=32, _a=0x7fffffffc900)

                  at /home/euclid/rtabmap/build/guilib/src/__/include/rtabmap/gui/moc_MainWindow.cpp:527

              #4  0x00007ffff0bb5d2a in QMetaObject::activate(QObject*, int, int, void**) ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5

              #5  0x00007ffff0f28412 in QAction::triggered(bool) ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #6  0x00007ffff0f2a898 in QAction::activate(QAction::ActionEvent) ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #7  0x00007ffff1030560 in ?? ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #8  0x00007ffff1030694 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #9  0x00007ffff10f514a in QToolButton::mouseReleaseEvent(QMouseEvent*) ()

              ---Type <return> to continue, or q <return> to quit---

                 from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #10 0x00007ffff0f74f88 in QWidget::event(QEvent*) ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #11 0x00007ffff10f5229 in QToolButton::event(QEvent*) ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #12 0x00007ffff0f3205c in QApplicationPrivate::notify_helper(QObject*, QEvent*)

                  () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #13 0x00007ffff0f37c19 in QApplication::notify(QObject*, QEvent*) ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #14 0x00007ffff0b8738b in QCoreApplication::notifyInternal(QObject*, QEvent*)

                  () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5

              #15 0x00007ffff0f36b32 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #16 0x00007ffff0f8f57b in ?? ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #17 0x00007ffff0f91b3b in ?? ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #18 0x00007ffff0f3205c in QApplicationPrivate::notify_helper(QObject*, QEvent*)

                  () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #19 0x00007ffff0f37516 in QApplication::notify(QObject*, QEvent*) ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

              #20 0x00007ffff0b8738b in QCoreApplication::notifyInternal(QObject*, QEvent*)

              ---Type <return> to continue, or q <return> to quit---

                  () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5

              #21 0x00007fffe770e4e1 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5

              #22 0x00007fffe77101a5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5

              #23 0x00007fffe76f3f08 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5

              #24 0x00007fffc3027060 in ?? ()

                 from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5

              #25 0x00007fffdfda7197 in g_main_context_dispatch ()

                 from /lib/x86_64-linux-gnu/libglib-2.0.so.0

              #26 0x00007fffdfda73f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0

              #27 0x00007fffdfda749c in g_main_context_iteration ()

                 from /lib/x86_64-linux-gnu/libglib-2.0.so.0

              #28 0x00007ffff0bdd7cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5

              #29 0x00007ffff0b84b4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5

              #30 0x00007ffff0b8cbec in QCoreApplication::exec() ()

                 from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5

              ---Type <return> to continue, or q <return> to quit---

              #31 0x0000000000409f24 in main (argc=1, argv=0x7fffffffd828)

                  at /home/euclid/rtabmap/app/src/main.cpp:98

              (gdb)

              • 4. Re: RTABMAP on Euclid
                MPer

                The issue is seen with Intel provided apps as well.

                 

                Methlal

                 

                 

                euclid@EUCLID_50EF:~/realsense/librealsense/bin$ gdb ./cpp-stride

                GNU gdb (Ubuntu 7.11-0ubuntu1) 7.11

                Copyright (C) 2016 Free Software Foundation, Inc.

                License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

                This is free software: you are free to change and redistribute it.

                There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

                and "show warranty" for details.

                This GDB was configured as "x86_64-linux-gnu".

                Type "show configuration" for configuration details.

                For bug reporting instructions, please see:

                <http://www.gnu.org/software/gdb/bugs/>.

                Find the GDB manual and other documentation resources online at:

                <http://www.gnu.org/software/gdb/documentation/>.

                For help, type "help".

                Type "apropos word" to search for commands related to "word"...

                Reading symbols from ./cpp-stride...(no debugging symbols found)...done.

                (gdb) r

                Starting program: /home/euclid/realsense/librealsense/bin/cpp-stride

                [Thread debugging using libthread_db enabled]

                Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

                [New Thread 0x7ffff1da3700 (LWP 26725)]

                Intrinsics: 0.02

                There are 1 connected RealSense devices.

                 

                Using device 0, an Intel RealSense LR200M

                    Serial number: 3511803773

                    Firmware version: 2.0.71.09

                starting motion!

                Connect, id=0

                [New Thread 0x7fffeeaba700 (LWP 26726)]

                Camera opened: /dev/video3

                [New Thread 0x7fffede7b700 (LWP 26729)]

                [New Thread 0x7fffeda7a700 (LWP 26730)]

                [New Thread 0x7fffed679700 (LWP 26731)]

                Motion device (0): Starting...

                Motion device (0): Started!

                starting video!

                [New Thread 0x7fffdffff700 (LWP 26732)]

                [Thread 0x7fffdffff700 (LWP 26732) exited]

                [Thread 0x7ffff1da3700 (LWP 26725) exited]

                Motion device (0): Stopping...

                 

                Thread 3 "cpp-stride" received signal SIGSEGV, Segmentation fault.

                [Switching to Thread 0x7fffeeaba700 (LWP 26726)]

                0x00007ffff65b65dd in motion::MotionHalListnerAdapter::MotionHAL_onNotify(motion::MotionHAL::NotifyMsg const&) () from /usr/lib/libslimAPI.so

                (gdb)

                (gdb) bt

                #0  0x00007ffff65b65dd in motion::MotionHalListnerAdapter::MotionHAL_onNotify(motion::MotionHAL::NotifyMsg const&) () from /usr/lib/libslimAPI.so

                #1  0x00007ffff32fb91d in mmHAL::iAction_sACTIVE_eON_READ(perc::Message const&)

                    () from /usr/lib/libmotionHAL.so

                #2  0x00007ffff30e079e in perc::Fsm::fireEvent(perc::Message const&) ()

                   from /usr/lib/libinfra.so

                #3  0x00007ffff32f9678 in mmHAL::onRead(int, void*) ()

                   from /usr/lib/libmotionHAL.so

                #4  0x00007ffff30dac2b in perc::Dispatcher::threadLoop() ()

                   from /usr/lib/libinfra.so

                #5  0x00007ffff30e0159 in perc::Thread::_threadLoop(void*) ()

                   from /usr/lib/libinfra.so

                #6  0x00007ffff5e5a6ba in start_thread (arg=0x7fffeeaba700)

                    at pthread_create.c:333

                #7  0x00007ffff6ad93dd in clone ()

                    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

                (gdb)

                • 5. Re: RTABMAP on Euclid
                  MartyG

                  This may not be relevant, but apparently a difference between the ZR300 camera and Euclid is that Euclid lacks a chip that the ZR300 camerat has, and that chip is software-simulated in Librealsense.  This is why Euclid uses a fork version of Librealsense instead of the main branch.

                   

                  Re: librealsense forked?

                  1 of 1 people found this helpful
                  • 6. Re: RTABMAP on Euclid
                    MPer

                    That's the reason. I think that the callbacks getting called after the context object is released. Need the correct way to release object or the destructor of the context object should take care of it.

                     

                    Thanks,

                     

                    Methlal

                    • 7. Re: RTABMAP on Euclid
                      MeitavKleinfeld

                      Hi Methlal,

                       

                      I have managed to run rtabmap on Euclid without running into an issue like this.

                      I have also built it from source since rtabmap doesn't currently show in the package manager when working from Euclid (there might be a way to change this), the instructions on rtabmap's github page worked perfectly.

                      I would like to know what kind of procedure you went through when installing, configuring and running rtabmap, as I did not run into any problems with it.

                       

                      Regards,

                       

                      Meitav

                       

                      Euclid Development Team

                      • 8. Re: RTABMAP on Euclid
                        MPer

                        1)Clone rtabmap with git.

                        2)mkdir build

                        3)cd build

                        4)cmake ..

                        5)make

                        6)sudo make install

                         

                        You need to

                        1) Select zr300 as the RGBD camera

                        2) create a new database,

                        3) run

                        4) stop

                         

                        Then only this issue will appear. Happens when the context object is deleted. Not seen with regular ZR300.

                         

                        Thanks,

                         

                        MPer.

                        • 9. Re: RTABMAP on Euclid
                          MeitavKleinfeld

                          Okay, I'd like to know what exactly you mean when saying "Select zr300 as the RGBD camera", since I don't recall having to choose it specifically.

                          What I did was launch the realsense camera node in one terminal, and in a second one rtabmap using the following command:

                           

                          roslaunch rtabmap_ros rtabmap.launch rtabmap_args:=”—delete_db_on_start”  depth_topic:=/camera/depth/image_raw camera_info:=/camera/color/camera_info visual_odometry:=false odom_topic:=/odom rtabmapviz:=false cloud_floor_culling_height:=0.5

                           

                          Can you try that and tell me if you're getting the same errors?

                           

                          Regards,

                           

                          Meitav

                           

                          Euclid Development Team

                          • 10. Re: RTABMAP on Euclid
                            Intel Corporation
                            This message was posted on behalf of Intel Corporation

                            Hi MPer,

                            Do you still need assistance with this thread?

                            -Sergio A