-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CloudCamera::calculateNormalsOrganized() failed when processing PointCloudXYZRGBA #6
Comments
To my analysis, when processing XYZRGBA pointclouds, A simple way to fix this issue, and to make the codes more safe, is to invoke
This will ensure the |
Added parameters to specify the number of dimensions to consider for each point, When invoking pcl::PointCloud< PointT >::getMatrixXfMap() Signed-off-by: Sharron LIU <sharron.liu@intel.com>
@atenpas I added a patch for this issue. Could you review? |
Added parameters to specify the number of dimensions to consider for each point, When invoking pcl::PointCloud< PointT >::getMatrixXfMap() Signed-off-by: Sharron LIU <sharron.liu@intel.com>
Added parameters to specify the number of dimensions to consider for each point, When invoking pcl::PointCloud< PointT >::getMatrixXfMap() Signed-off-by: Sharron LIU <sharron.liu@intel.com>
Added parameters to specify the number of dimensions to consider for each point, When invoking pcl::PointCloud< PointT >::getMatrixXfMap() Signed-off-by: Sharron LIU <sharron.liu@intel.com>
When input point clouds are XYZRGBA, cloud camera failed at normal calculation.
The assertion failure message:
/usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h:241: void Eigen::PlainObjectBase<Derived>::resize(Eigen::PlainObjectBase<Derived>::Index, Eigen::PlainObjectBase<Derived>::Index) [with Derived = Eigen::Matrix<double, 3, -1>; Eigen::PlainObjectBase<Derived>::Index = long int]: Assertion (!(RowsAtCompileTime!=Dynamic) || (nbRows==RowsAtCompileTime)) && (!(ColsAtCompileTime!=Dynamic) || (nbCols==ColsAtCompileTime)) && (!(RowsAtCompileTime==Dynamic && MaxRowsAtCompileTime!=Dynamic) || (nbRows<=MaxRowsAtCompileTime)) && (!(ColsAtCompileTime==Dynamic && MaxColsAtCompileTime!=Dynamic) || (nbCols<=MaxColsAtCompileTime)) && nbRows>=0 && nbCols>=0 && "Invalid sizes when resizing a matrix or array."' failed.
GDB back trace when the assertion happened:
Thread 1 "grasp_library" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
0 0x00007ffff46b5e97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
1 0x00007ffff46b7801 in __GI_abort () at abort.c:79
2 0x00007ffff46a739a in __assert_fail_base (fmt=0x7ffff482e7d8 "%s%s%s:%u: %s%sAssertion %s' failed.\n%n", assertion=assertion@entry=0x5555555b6600 "(!(RowsAtCompileTime!=Dynamic) || (nbRows==RowsAtCompileTime)) && (!(ColsAtCompileTime!=Dynamic) || (nbCols==ColsAtCompileTime)) && (!(RowsAtCompileTime==Dynamic && MaxRowsAtCompileTime!=Dynamic) || ("..., file=file@entry=0x5555555b65c0 "/usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h", line=line@entry=241, function=function@entry=0x5555555b77e0 <Eigen::PlainObjectBase<Eigen::Matrix<double, 3, -1, 0, 3, -1> >::resize(long, long)::PRETTY_FUNCTION> "void Eigen::PlainObjectBase::resize(Eigen::PlainObjectBase::Index, Eigen::PlainObjectBase::Index) [with Derived = Eigen::Matrix<double, 3, -1>; Eigen::PlainObjectBase<Derive"...) at assert.c:92
3 0x00007ffff46a7412 in __GI___assert_fail (assertion=0x5555555b6600 "(!(RowsAtCompileTime!=Dynamic) || (nbRows==RowsAtCompileTime)) && (!(ColsAtCompileTime!=Dynamic) || (nbCols==ColsAtCompileTime)) && (!(RowsAtCompileTime==Dynamic && MaxRowsAtCompileTime!=Dynamic) || ("..., file=0x5555555b65c0 "/usr/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h", line=241, function=0x5555555b77e0 <Eigen::PlainObjectBase<Eigen::Matrix<double, 3, -1, 0, 3, -1> >::resize(long, long)::PRETTY_FUNCTION> "void Eigen::PlainObjectBase::resize(Eigen::PlainObjectBase::Index, Eigen::PlainObjectBase::Index) [with Derived = Eigen::Matrix<double, 3, -1>; Eigen::PlainObjectBase<Derive"...) at assert.c:101
4 0x00005555555800fa in Eigen::PlainObjectBase<Eigen::Matrix<double, 3, -1, 0, 3, -1> >::resize(long, long) ()
5 0x00007ffff6e221d8 in CloudCamera::calculateNormalsOrganized() () at /usr/local/lib/libgrasp_candidates_generator.so
6 0x00007ffff6e24596 in CloudCamera::calculateNormals(int) () at /usr/local/lib/libgrasp_candidates_generator.so
7 0x00007ffff6e03f1a in CandidatesGenerator::preprocessPointCloud(CloudCamera&) () at /usr/local/lib/libgrasp_candidates_generator.so
8 0x000055555557083d in GraspLibraryNode::detectGraspPosesInTopic() ()
9 0x00005555555705a1 in GraspLibraryNode::onInit() ()
10 0x0000555555571196 in main ()
The text was updated successfully, but these errors were encountered: