static_assert error when building descartes_tutorials in melodic
Opened this issue · 6 comments
Environment: Ubuntu 18.04 with ROS Melodic.
When trying to build descartes_tutorials, I get the following error:
Errors << descartes_tutorials:make /home/kat/Ros/test_moveit/logs/descartes_tutorials/build.make.000.log
In file included from /usr/include/eigen3/Eigen/Core:347:0,
from /usr/include/eigen3/Eigen/Geometry:11,
from /home/kat/Ros/test_moveit/src/moveit/moveit_core/robot_model/include/moveit/robot_model/joint_model.h:47,
from /home/kat/Ros/test_moveit/src/moveit/moveit_core/robot_model/include/moveit/robot_model/joint_model_group.h:41,
from /home/kat/Ros/test_moveit/src/moveit/moveit_core/robot_model/include/moveit/robot_model/robot_model.h:47,
from /home/kat/Ros/test_moveit/src/moveit/moveit_core/kinematic_constraints/include/moveit/kinematic_constraints/kinematic_constraint.h:40,
from /home/kat/Ros/test_moveit/src/descartes/descartes_core/include/descartes_core/robot_model.h:23,
from /home/kat/Ros/test_moveit/src/descartes/descartes_moveit/include/descartes_moveit/moveit_state_adapter.h:22,
from /home/kat/Ros/test_moveit/src/descartes/descartes_moveit/include/descartes_moveit/ikfast_moveit_state_adapter.h:22,
from /home/kat/Ros/test_moveit/src/descartes_tutorials/descartes_tutorials/src/tutorial2.cpp:9:
/usr/include/eigen3/Eigen/src/Geometry/Transform.h: In instantiation of ‘Eigen::Transform<Scalar, Dim, Mode, _Options>::Transform(const Eigen::Transform<_Scalar, Dim, OtherMode, OtherOptions>&) [with int OtherMode = 2; int OtherOptions = 0; _Scalar = double; int _Dim = 3; int _Mode = 1; int _Options = 0]’:
/home/kat/Ros/test_moveit/src/descartes_tutorials/descartes_tutorials/src/tutorial2.cpp:232:21: required from here
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: error: static assertion failed: YOU_PERFORMED_AN_INVALID_TRANSFORMATION_CONVERSION
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
^
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: note: in definition of macro ‘EIGEN_STATIC_ASSERT’
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
^~~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:347:0,
from /usr/include/eigen3/Eigen/Geometry:11,
from /home/kat/Ros/test_moveit/src/moveit/moveit_core/robot_model/include/moveit/robot_model/joint_model.h:47,
from /home/kat/Ros/test_moveit/src/moveit/moveit_core/robot_model/include/moveit/robot_model/joint_model_group.h:41,
from /home/kat/Ros/test_moveit/src/moveit/moveit_core/robot_model/include/moveit/robot_model/robot_model.h:47,
from /home/kat/Ros/test_moveit/src/moveit/moveit_core/kinematic_constraints/include/moveit/kinematic_constraints/kinematic_constraint.h:40,
from /home/kat/Ros/test_moveit/src/descartes/descartes_core/include/descartes_core/robot_model.h:23,
from /home/kat/Ros/test_moveit/src/descartes/descartes_moveit/include/descartes_moveit/moveit_state_adapter.h:22,
from /home/kat/Ros/test_moveit/src/descartes/descartes_moveit/include/descartes_moveit/ikfast_moveit_state_adapter.h:22,
from /home/kat/Ros/test_moveit/src/descartes_tutorials/descartes_tutorials/src/tutorial1.cpp:9:
/usr/include/eigen3/Eigen/src/Geometry/Transform.h: In instantiation of ‘Eigen::Transform<Scalar, Dim, Mode, _Options>::Transform(const Eigen::Transform<_Scalar, Dim, OtherMode, OtherOptions>&) [with int OtherMode = 2; int OtherOptions = 0; _Scalar = double; int _Dim = 3; int _Mode = 1; int _Options = 0]’:
/home/kat/Ros/test_moveit/src/descartes_tutorials/descartes_tutorials/src/tutorial1.cpp:160:69: required from here
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: error: static assertion failed: YOU_PERFORMED_AN_INVALID_TRANSFORMATION_CONVERSION
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
^
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: note: in definition of macro ‘EIGEN_STATIC_ASSERT’
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
^~~~~~~~~~~~~
make[2]: *** [CMakeFiles/descartes_tutorials_tutorial1.dir/src/tutorial1.cpp.o] Error 1
make[1]: *** [CMakeFiles/descartes_tutorials_tutorial1.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/descartes_tutorials_tutorial2.dir/src/tutorial2.cpp.o] Error 1
make[1]: *** [CMakeFiles/descartes_tutorials_tutorial2.dir/all] Error 2
make: *** [all] Error 2
Seems that there's something wrong with
error: static assertion failed: YOU_PERFORMED_AN_INVALID_TRANSFORMATION_CONVERSION
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
This seems to be related to descartes/issues/234.
Running this on the repo fixed the error mentioned above:
find ./ -type f -exec sed -i 's/Affine3d/Isometry3d/g' {} \;
But then I got this error:
/home/kat/Ros/test_moveit/devel/lib/libdescartes_moveit.so: undefined reference to `tf::poseEigenToMsg(Eigen::Transform<double, 3, 1, 0> const&, geometry_msgs::Pose_<std::allocator<void> >&)'
/home/kat/Ros/test_moveit/devel/lib/libdescartes_moveit.so: undefined reference to `tf::poseMsgToEigen(geometry_msgs::Pose_<std::allocator<void> > const&, Eigen::Transform<double, 3, 1, 0>&)'
collect2: error: ld returned 1 exit status
descartes_tutorials/descartes_tutorials/CMakeFiles/descartes_tutorials_tutorial1.dir/build.make:273: recipe for target '/home/kat/Ros/test_moveit/devel/lib/descartes_tutorials/tutorial1' failed
make[2]: *** [/home/kat/Ros/test_moveit/devel/lib/descartes_tutorials/tutorial1] Error 1
CMakeFiles/Makefile2:23321: recipe for target 'descartes_tutorials/descartes_tutorials/CMakeFiles/descartes_tutorials_tutorial1.dir/all' failed
make[1]: *** [descartes_tutorials/descartes_tutorials/CMakeFiles/descartes_tutorials_tutorial1.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 82%] Building CXX object moveit/moveit_ros/move_group/CMakeFiles/moveit_move_group_default_capabilities.dir/src/default_capabilities/plan_service_capability.cpp.o
/home/kat/Ros/test_moveit/devel/lib/libdescartes_moveit.so: undefined reference to `tf::poseEigenToMsg(Eigen::Transform<double, 3, 1, 0> const&, geometry_msgs::Pose_<std::allocator<void> >&)'
/home/kat/Ros/test_moveit/devel/lib/libdescartes_moveit.so: undefined reference to `tf::poseMsgToEigen(geometry_msgs::Pose_<std::allocator<void> > const&, Eigen::Transform<double, 3, 1, 0>&)'
collect2: error: ld returned 1 exit status
descartes_tutorials/descartes_tutorials/CMakeFiles/descartes_tutorials_tutorial2.dir/build.make:273: recipe for target '/home/kat/Ros/test_moveit/devel/lib/descartes_tutorials/tutorial2' failed
make[2]: *** [/home/kat/Ros/test_moveit/devel/lib/descartes_tutorials/tutorial2] Error 1
CMakeFiles/Makefile2:23399: recipe for target 'descartes_tutorials/descartes_tutorials/CMakeFiles/descartes_tutorials_tutorial2.dir/all' failed
make[1]: *** [descartes_tutorials/descartes_tutorials/CMakeFiles/descartes_tutorials_tutorial2.dir/all] Error 2
Which I fixed by adding
trajectory_msgs
tf
tf_conversions
+ eigen_conversions
)
to descartes_tutorials/CMakeLists.txt
.
I submitted a PR that fixes these errors #15.
@Jmeyer1292 What are the best practices for contributioning to this repo? I am a newbie when it comes to OS contributions. Would it make sense to open a melodic-migration
branch?
Thank you so much for your post! It's fixed my issue.
@kkufieta for the time being it's ok to create PR's against the master branch. It should compile on both kinetic and melodic. This repo also encourages following ROS and Google coding style guide. Hope that answers your question.
Hey tehre
I use ros-kinetic on Ubuntu 16.04 and want to build melodic code I got this error:
e/eigen3/Eigen/src/Geometry/Transform.h: In instantiation of ‘Eigen::Transform<Scalar, Dim, Mode, _Options>::Transform(const Eigen::Transform<_Scalar, Dim, OtherMode, OtherOptions>&) [with int OtherMode = 2; int OtherOptions = 0; _Scalar = double; int _Dim = 3; int _Mode = 1; int _Options = 0]’:
/home/mlamprecht/Desktop/ros_projects/src/moveit_grasps/src/grasp_data.cpp:163:81: required from here
/usr/include/eigen3/Eigen/src/Core/util/StaticAssert.h:32:40: error: static assertion failed: YOU_PERFORMED_AN_INVALID_TRANSFORMATION_CONVERSION
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
Your FIx:
find ./ -type f -exec sed -i 's/Affine3d/Isometry3d/g' {} ;
did not work for me ....