atenpas/agile_grasp

Eigen crash on ubuntu 18.04

evankrause opened this issue · 1 comments

I'm using a forked version of this repo (with ROS stripped off) and recently tried to get things working on Ubuntu 18.04. Initially, things would crash with some cryptic eigen related errors, but after some effort debugging, I think I have things working and wanted to share my fixes in case someone else was having similar issues.

Basically there were some dimension mismatches in several places and also an index out of bounds issue. I have no idea why things work on older version on Ubuntu (I've been using 14.04 until now), but maybe it's because of Eigen changes?

The biggest issue was in handle_search.cpp line 103 "if (inliersi < 0)". Here, inliers[i] is a Vector2d so the "(2)" index is out of bounds and causes things to crash. I changed this to "if (inliersi < 0)" but I'm not 100% this is correct. Can anyone verify that this is the correct fix here?

You can see my full set of changes here: https://github.com/evankrause/agile_grasp/tree/ubuntu-18.04

I think that's the correct fix. That looks like a bug actually. Thanks for fixing! Will create a PR later.