rtabmap crash after pressing New database

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

rtabmap crash after pressing New database

DocBrowm
Hey!

I installed the standalone version of rtabmap. Everything compiled fine but if I try to create a new database, rtabmap just crashes and shows the message:

"Description:

[FATAL] (2014-12-01 11:26:16.596) VWDictionary.cpp:74::parseParameters() Condition (_nndrRatio > 0.0f) not met!

The application will now exit..."

I hope someone knows whats wrong
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

matlabbe
Administrator
Thx for the question, because the answer was lost in the old googlecode wiki... here it is:

Is your operating system uses commas instead of dots for floating point number?

There is an issue when converting a number like "0,6", it gives "0.0". Try set env variable LANG=en_US.UTF-8 before starting rtabmap.

I had this problem for ROS on a french operating system: https://code.ros.org/trac/ros/ticket/2438. On linux:
$ set LANG=en_US.UTF-8
$ rtabmap
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

DocBrown
Thank you so much! That was the problem.

What I had to do to solve the problem:

-sudo apt-get install locales
-sudo dpkg-reconfigure locales
-set LANG=en_US.UTF-8

Best wishes
Michael
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

André
Hi,

I have the same error. I tryed to do what you guys did and had no success. What should be the problem?

I am using LANG=pt_BR.UTF-8

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

matlabbe
Administrator
Verify that LANG environment variable is correctly set:
$ export LANG=en_US.UTF-8
$ env | grep LANG
LANG=en_US.UTF-8
$ rtabmap



Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

matlabbe
Administrator
I checked again about this problem, and it should be fixed now with this commit.
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

Alex
Hello I am having the same problem on Windows 8, I checked the previous answers and the operating system uses "." for decimals and windows doesn't have the LANG environmental variable although US is the default language in my operating system. I am not sure about the UTF-8 part though.

I think the problem lies on the Memory::init() function cause it is called when pressing the new database button and when trying the to run the odometry_viewer.exe (I was running all the executables trying to understand were was the problem) which both call that function. The messages after executing odometry_viewer are:
[ INFO] (2015-04-02 20:48:09) main.cpp:528::main() Using OpenNI camera
[ INFO] (2015-04-02 20:48:09) main.cpp:597::main() Odometry used =           GFTT+BRIEF
[ INFO] (2015-04-02 20:48:09) main.cpp:598::main() Camera rate =             0.000000 Hz
[ INFO] (2015-04-02 20:48:09) main.cpp:599::main() Maximum clouds shown =    10
[ INFO] (2015-04-02 20:48:09) main.cpp:600::main() Delay =                   0.000000 s
[ INFO] (2015-04-02 20:48:09) main.cpp:601::main() Max depth =               5.000000
[ INFO] (2015-04-02 20:48:09) main.cpp:602::main() Reset odometry coutdown = 0
[ INFO] (2015-04-02 20:48:09) main.cpp:603::main() Local history =           1000
[ INFO] (2015-04-02 20:48:09) main.cpp:632::main() Nearest neighbor =         kNNBruteForce
[ INFO] (2015-04-02 20:48:09) main.cpp:633::main() Nearest neighbor ratio =  0.700000
[ INFO] (2015-04-02 20:48:09) main.cpp:634::main() Max features =            0
[ INFO] (2015-04-02 20:48:09) main.cpp:635::main() Min inliers =             20
[ INFO] (2015-04-02 20:48:09) main.cpp:636::main() Inlier maximum correspondences distance = 0.010000
[ INFO] (2015-04-02 20:48:09) main.cpp:637::main() RANSAC iterations =       30
[ INFO] (2015-04-02 20:48:09) main.cpp:638::main() GPU =                     false
[ INFO] (2015-04-02 20:48:09) main.cpp:662::main() BRIEF bytes =             32

and then it crashes. I think the problem is in the line this->parseParameters(parameters);
I converted the rtabmap.ini file encoding to see if the encoding of the parameters was the problem but still it didn't.

The software was compiled from the source code.

Regards,
Alex

Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

matlabbe
Administrator
I though the nndrRatio bug was fixed by the linked commit above... If odometryViewer crashes, this is not related to the ini file. When the odometryViewer crashes, is there an error/fatal error message shown?
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

Alex
Maybe it wasn't nndrRatio this time, I entered it here because it happens when pressing new database. The only messages that appear are the ones I mentioned before it crashes. After that it says that rtabmap-odometetry.exe has stopped working. If I press debug I can open it with visual studio but I can't really understand anything from the Disassembly window. Also I get errors when trying to compile it in debug mode so I can't do it step by step in order to get any more info.

Regards Alex
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

matlabbe
Administrator
Are you able to run rtabmap-rgbd_camera?
$ rtabmap-rgbd_camera 1
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

Alex
No that makes it crash too. It doesn't crash if I run it with no parameters i.e. $rtabmap-rgbd_camera
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

matlabbe
Administrator
I fixed a crash on Openni2 driver with rtabmap-rgbd_camera on Windows yesterday. You may want to update the code and try again. However, if it doesn't crash without arguments and you can see images, you could use the Openni driver instead of the Openni2 driver.

Now for the rtabmap-odometryViewer, can you run it in debug mode and show the log here?
$ rtabmap-odometryViewer.exe -debug
  Note that you can choose the driver to use with the "-driver #" option. See "--help" for info.
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

Alex
Ok I will try it with the update. Although something bizarre happened, if I run the program through the command prompt it works when I start a new database, but if I start it by double clicking the executable it crashes. I am confused now :S.
The output from $ rtabmap-odometryViewer.exe -debug is:

[DEBUG] (2015-04-03 21:22:03) Memory.cpp:377::rtabmap::Memory::parseParameters()
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:491::rtabmap::Memory::parseParameters() new detector strategy
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:132::rtabmap::Memory::init()
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:377::rtabmap::Memory::parseParameters()
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:1006::rtabmap::Memory::clear()
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:3757::rtabmap::Memory::cleanUnusedWords() removing 0 words (dictionary size=0)...
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:1040::rtabmap::Memory::clear()
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:1069::rtabmap::Memory::clear()
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:1075::rtabmap::Memory::clear()
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:3757::rtabmap::Memory::cleanUnusedWords() Removing 0 words (dictionary size=0)...
[DEBUG] (2015-04-03 21:22:03) VWDictionary.cpp:326::rtabmap::VWDictionary::clear()
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:1097::rtabmap::Memory::clear()
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:245::rtabmap::Memory::init() ids start with 1
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:246::rtabmap::Memory::init() map ids start with 0
[DEBUG] (2015-04-03 21:22:03) Memory.cpp:313::rtabmap::Memory::init() Total word references added = 0
[ERROR] (2015-04-03 21:22:04) CameraRGBD.cpp:211::rtabmap::CameraOpenni::init() OpenNI exception: void __cdecl pcl::OpenNIGrabber::setupDevice(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const pcl::OpenNIGrabber::Mode &,const pcl::OpenNIGrabber::Mode &) in ..\pcl-1.7.2\io\src\openni_grabber.cpp @ 344 : No devices connected.
[DEBUG] (2015-04-03 21:22:04) CameraRGBD.cpp:148::rtabmap::CameraOpenni::~Camera Openni()
[DEBUG] (2015-04-03 21:22:04) CloudViewer.cpp:102::rtabmap::CloudViewer::~CloudViewer()
[DEBUG] (2015-04-03 21:22:04) Memory.cpp:322::rtabmap::Memory::~Memory()
[DEBUG] (2015-04-03 21:22:04) Memory.cpp:325::rtabmap::Memory::~Memory()
[DEBUG] (2015-04-03 21:22:04) Memory.cpp:1006::rtabmap::Memory::clear()
[DEBUG] (2015-04-03 21:22:04) Memory.cpp:3757::rtabmap::Memory::cleanUnusedWords() Removing 0 words (dictionary size=0)...
[DEBUG] (2015-04-03 21:22:04) Memory.cpp:1040::rtabmap::Memory::clear()
[DEBUG] (2015-04-03 21:22:04) Memory.cpp:1069::rtabmap::Memory::clear()
[DEBUG] (2015-04-03 21:22:04) Memory.cpp:1075::rtabmap::Memory::clear()
[DEBUG] (2015-04-03 21:22:04) Memory.cpp:3757::rtabmap::Memory::cleanUnusedWords() Removing 0 words (dictionary size=0)...
[DEBUG] (2015-04-03 21:22:04) VWDictionary.cpp:326::rtabmap::VWDictionary::clear()
[DEBUG] (2015-04-03 21:22:04) Memory.cpp:1097::rtabmap::Memory::clear()
[DEBUG] (2015-04-03 21:22:04) VWDictionary.cpp:326::rtabmap::VWDictionary::clear()
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap crash after pressing New database [(nndrRatio > 0.0f) not met!]

matlabbe
Administrator
You should start the console applications in a command window, because some require arguments (if they don't have ones, they quit instantly). The error above is that no devices are connected. It should be shown in red:
[ERROR] (2015-04-03 21:22:04) CameraRGBD.cpp:211::rtabmap::CameraOpenni::init() OpenNI exception: 
void __cdecl pcl::OpenNIGrabber::setupDevice(const class std::basic_string<char,struct std::char_traits<char>,
class std::allocator<char> > &,const pcl::OpenNIGrabber::Mode &,const pcl::OpenNIGrabber::Mode &) in
 ..\pcl-1.7.2\io\src\openni_grabber.cpp @ 344 : No devices connected. 

Try another driver (default is openni) or check if your sensor is really connected. You can execute with "--help" argument to see drivers you can use.