s-nakaoka / choreonoid

An integrated graphical robotics application framework
http://choreonoid.org
Other
94 stars 58 forks source link

Floating point exception when using the Kinematic Check tool #38

Open haudren opened 9 years ago

haudren commented 9 years ago

When I use the kinematic fault checker (In the tools menu), choreonoid crashes when attempting to check.

Workflow:

Open choreonoid
Add the HRP2 model (Open OpenHRP model)
Add a sample motion (Import hrpsys sequence file) i.e. a *.pos file
Tools -> Kinematic Checker -> Default settings -> Apply

Result:

Program received signal SIGFPE, Arithmetic exception.
0x00007fffe4fc62a1 in at (colIndex=0, rowIndex=0, this=0x1e48be0)
    at /home/herve/workspace/choreonoid_drc/choreonoid/src/Util/Deque2D.h:561
561         return buf[(offset + (rowIndex * colSize_)) % capacity_ + colIndex];

Backtrace: https://gist.github.com/haudren/42ffc65ebad9244a3573

However, the fault checker does work properly whenever I use the sample GR0001 project. I suppose that there is a problem with either my setup, or with the hrpsys files that are not wrapped in a pseq.

Anyway I do not think the application should ever crash on SIGFPE during normal use.

I can send you the .cnoid file if you wish.

Thank you, Hervé

haudren commented 9 years ago

Note I just checked the values in the above expression:

return buf[(offset + (rowIndex * colSize_)) % capacity_ + colIndex];
offset = 0
rowIndex = 0
colSize_ = 1
capacity = 0
colIndex = 0

So obviously, we are trying to take the 0-modulus of 0, which does not go very well... I am guessing badly initialized values.

haudren commented 9 years ago

Another note: the tool works as expected when using only the position and velocity checking. Using the self-collision test triggers the abnormal behaviour.