Closed LiShuaixin closed 5 years ago
The problem might be related to the version of eigen. Also, segmap is using an older version of libpointmatcher
and libpointmatcher_ros
(https://github.com/ethz-asl/ethzasl_icp_mapping/commit/a7d8ea9). I found the commit hash in this file. Maybe, updating this file, will update the dependencies?
This is the list of changes made to libpointmatcher_ros, since commit a7d8ea9.
Hi @PhiBabin , thanks for your reply. Have you run segmap? which verision of eigen should I use to make the whole thing right? I'll also try to fix the issue using the latest version of eigen
I have not run segmap. You simply have to make sure that every package is using the same Eigen version. So it's more about finding a different version of Eigen on your system, than trying to compile with the latest version of Eigen.
Hi, thanks for your suggestion. I use Eigen 3.2 and check every packages in the project to ensure the consistency of Eigen version and the issue was solved.
Hi, I tried to testing segmap whose dependencies including libpointmatcher, but the system was killed by a segment fault caused at
PointMatcher_ros::rosMsgToPointMatcherCloud<float>(cloud_msg_in);
I debugged the code and found the exact position of the fault is at line 159 in
pointmatcher_ros/point_cloud.cpp
:case PF::FLOAT32: { view(dim, ptId) = T(*reinterpret_cast<const float*>(fPtr));
It shows that the segment fault occurred when assigning vals to
view
, which is aEigen::Block<Matrix>
.Moreover, I can successfully
cout
the vals of*reinterpret_cast<const float*>(fPtr)
which means the accessing of the array is valid. And, it is valid at line 77 in the same .cpp file, when usingcloud.getFeatureViewByName(it->name).setConstant(1);
to assign vals to the matrix. But it is invalid ifcout
the matrix after assignment. It's so weird!As far as I know, if the declaration of a dynamic matrix with known size or other fixed-size matrix, the assignment and accessing of the matrix should be legal. Is this the problem of the version of Eigen?