Robotics StackExchange | Archived questions

MoveIt Tutorials not building on ROS Melodic

[ROS Melodic, Ubuntu 18.04, MacBook Pro mid-2014]
[This attempted install used the latest packages out of the box]

I've tried following the MoveIt! Getting Started Tutorial using both the MoveIt! binaries as well as building MoveIt! from source and in each case I end up with a StaticAssert error while building ws_moveit/src/moveit_tutorials.
There seem to be two errors, and shown below. Anyone able to help me resolve this?

    Errors     << moveit_tutorials:make /home/user/ws_moveit/logs/moveit_tutorials/build.make.002.log                       
    In file included from /usr/include/eigen3/Eigen/Core:347:0,
                 from /usr/include/eigen3/Eigen/Geometry:11,
                 from /opt/ros/melodic/include/moveit/robot_model/joint_model.h:47,
                 from /opt/ros/melodic/include/moveit/robot_model/joint_model_group.h:41,
                 from /opt/ros/melodic/include/moveit/robot_model/robot_model.h:47,
                 from /opt/ros/melodic/include/moveit/robot_model_loader/robot_model_loader.h:41,
                 from /home/user/ws_moveit/src/moveit_tutorials/doc/robot_model_and_robot_state/src/robot_model_and_robot_state_tutorial.cpp:40:
    /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/user/ws_moveit/src/moveit_tutorials/doc/robot_model_and_robot_state/src/robot_model_and_robot_state_tutorial.cpp:118:102:   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 /opt/ros/melodic/include/moveit/robot_model/joint_model.h:47,
             from /opt/ros/melodic/include/moveit/robot_model/joint_model_group.h:41,
             from /opt/ros/melodic/include/moveit/robot_model/robot_model.h:47,
             from /opt/ros/melodic/include/moveit/robot_model_loader/robot_model_loader.h:41,
             from /home/user/ws_moveit/src/moveit_tutorials/doc/state_display/src/state_display_tutorial.cpp:40:
/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/user/ws_moveit/src/moveit_tutorials/doc/state_display/src/state_display_tutorial.cpp:101:114:   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 /opt/ros/melodic/include/moveit/robot_model/joint_model.h:47,
             from /opt/ros/melodic/include/moveit/robot_model/joint_model_group.h:41,
             from /opt/ros/melodic/include/moveit/robot_model/robot_model.h:47,
             from /opt/ros/melodic/include/moveit/robot_model_loader/robot_model_loader.h:41,
             from /home/user/ws_moveit/src/moveit_tutorials/doc/interactivity/include/interactivity/interactive_robot.h:43,
             from /home/user/ws_moveit/src/moveit_tutorials/doc/interactivity/src/interactive_robot.cpp:39:
/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/user/ws_moveit/src/moveit_tutorials/doc/interactivity/src/interactive_robot.cpp:93:79:   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]: *** [doc/robot_model_and_robot_state/CMakeFiles/robot_model_and_robot_state_tutorial.dir/src/robot_model_and_robot_state_tutorial.cpp.o] Error 1
make[1]: *** [doc/robot_model_and_robot_state/CMakeFiles/robot_model_and_robot_state_tutorial.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [doc/state_display/CMakeFiles/state_display_tutorial.dir/src/state_display_tutorial.cpp.o] Error 1
make[1]: *** [doc/state_display/CMakeFiles/state_display_tutorial.dir/all] Error 2
make[2]: *** [doc/interactivity/CMakeFiles/interactivity_utils.dir/src/interactive_robot.cpp.o] Error 1
make[1]: *** [doc/interactivity/CMakeFiles/interactivity_utils.dir/all] Error 2
make: *** [all] Error 2

Asked by Nap on 2018-12-11 08:24:25 UTC

Comments

This looks slightly different than this bug, but likely caused by the same issue. What commit/branch do you have checked out for moveit_tutorials? What package version are you on for moveit?

Asked by jarvisschultz on 2018-12-11 11:49:36 UTC

@jarvisschultz: Spot on though I found the problem via another path. I happened to have successfully, but not entirely smoothly, installed MoveIt in a VM a couple weeks ago. So I did a diff to find the problem.

Asked by Nap on 2018-12-11 21:22:08 UTC

The VM was a rather disappointing trial run as RViz is super processor hungry. Simply opening RViz lagged my guest so much that I could makes coffees between mouse clicks, and that was even after I managed to reduce the frame-rate to 10hz. Hence the move to bare metal.

Asked by Nap on 2018-12-11 21:26:37 UTC

Another point worth mentioning is that once franka_ros is cloned, which I found was best done outside the tutorial workspace, the franka_description sub-folder needs to be copy/pasted into your workspace, not the whole package (unless you need the other stuff).

Asked by Nap on 2018-12-11 21:30:23 UTC

So were you now able to build the tutorials packages? If so, I'll create an answer for this question. Also, yes rviz in a VM can be tough (although with the right combo of machine+driver+settings I've been able to get it to work well in the past).

Asked by jarvisschultz on 2018-12-12 08:46:25 UTC

moveit_tutorials bf3a0b4d2696f39bd0bb8846af697f98b734cfd8 Binaries build but not from source. I get similar, but not the same, errors (StaticAsserts) in robot_model_and_robot_state_tutorial.cpp:135, motion_planning_pipeline_tutorial.cpp:97, and motion_planning_api_tutorial.cpp:136

Asked by Nap on 2018-12-14 08:27:09 UTC

I would be interested in reading how you got the VM to work well. I'm trying to run it on a Macbook Pro but we have some iMac in our lab (old and new) on which we run Ubuntu VMs.

Asked by Nap on 2018-12-14 08:31:41 UTC

In my experience there is no magic trick to getting VMs to play nicely with 3D graphics. How it works depends a lot on hardware specifics and takes a lot of debugging. When I'm advising students, I try to avoid debugging VM issues and instead encourage native installs.

Asked by jarvisschultz on 2018-12-14 08:39:52 UTC

When I build that same commit (bf3a0b4) against the 0.10.5-0bionic.20181117.215502 version of MoveIt! currently on the apt repositories I have no errors. Is your machine up-to-date? Can you double check you've checked out the right commit? You could delete your build and devel dirs and retry?

Asked by jarvisschultz on 2018-12-14 08:53:02 UTC

I tried to see if I could fix the build from source, but it's not that simple,, without being familiar with the code.

Asked by Nap on 2018-12-16 00:37:38 UTC

@jarvisschultz: Good news, it appears the errors have now been fixed in the repo, and I was able to successfully build from source. Thanks for following this up.

Asked by Nap on 2018-12-17 06:45:09 UTC

Can you point me to how or where "the code was fixed in the repo"? It's great your problem is solved, but it would be nice to have an answer for what actually solved your problem.

Asked by jarvisschultz on 2018-12-18 15:27:48 UTC

@jarvisschultz: Unfortunately there isn't much to say. I happened to get to the Source Install | MoveIt page via a different path (not realising it was actually the same page I had used earlier), so I ran through the instructions and it worked.

Asked by Nap on 2018-12-18 22:15:28 UTC

@jarvisschultz: I've checked the logs of all the installed repositories, and only https://github.com/ros-planning/moveit.git has been updated since I opened the question. So what I think has happened is the moveit repo was brought up to date with the changes made in the moveit_tutorials repo.

Asked by Nap on 2018-12-18 22:18:53 UTC

Answers