ros-industrial-attic / ur_modern_driver

(deprecated) ROS 1 driver for CB1 and CB2 controllers with UR5 or UR10 robots from Universal Robots
Apache License 2.0
305 stars 338 forks source link

Build fails: missing ur_msgs/RobotModeDataMsg.h #293

Closed JanTromp closed 5 years ago

JanTromp commented 5 years ago

Hi, I cloned the kinetic-devel ur_modern_driver in my src folder. When i try catkin_make is get the following error:

####
#### Running command: "make pkg ur_modern_driver -j8 -l8" in "/home/mifa/ws_moveit/build"
####
make: *** No rule to make target 'pkg'.  Stop.
Invoking "make pkg ur_modern_driver -j8 -l8" failed

Then my catkin_make stops.

When i try to run the catkin build command i get the following error:

Errors     << ur_modern_driver:make /home/mifa/ws_moveit/logs/ur_modern_driver/build.make.000.log                                                                                                          
In file included from /opt/ros/kinetic/include/hardware_interface/robot_hw.h:35:0,
                 from /opt/ros/kinetic/include/controller_interface/controller_base.h:37,
                 from /opt/ros/kinetic/include/controller_manager/controller_spec.h:41,
                 from /opt/ros/kinetic/include/controller_manager/controller_manager.h:36,
                 from /home/mifa/ws_moveit/src/ur_modern_driver/include/ur_modern_driver/ros/controller.h:20,
                 from /home/mifa/ws_moveit/src/ur_modern_driver/src/ros/controller.cpp:19:
/opt/ros/kinetic/include/hardware_interface/internal/interface_manager.h:69:85: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
   static const void callConcatManagers(typename std::vector<T*>& managers, T* result)
                                                                                     ^
In file included from /opt/ros/kinetic/include/hardware_interface/robot_hw.h:35:0,
                 from /opt/ros/kinetic/include/controller_interface/controller_base.h:37,
                 from /opt/ros/kinetic/include/controller_manager/controller_spec.h:41,
                 from /opt/ros/kinetic/include/controller_manager/controller_manager.h:36,
                 from /home/mifa/ws_moveit/src/ur_modern_driver/include/ur_modern_driver/ros/hardware_interface.h:20,
                 from /home/mifa/ws_moveit/src/ur_modern_driver/src/ros/hardware_interface.cpp:19:
/opt/ros/kinetic/include/hardware_interface/internal/interface_manager.h:69:85: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
   static const void callConcatManagers(typename std::vector<T*>& managers, T* result)
                                                                                     ^
In file included from /home/mifa/ws_moveit/src/ur_modern_driver/src/ros/hardware_interface.cpp:19:0:
/home/mifa/ws_moveit/src/ur_modern_driver/include/ur_modern_driver/ros/hardware_interface.h: In constructor ‘VelocityInterface::VelocityInterface(URCommander&, hardware_interface::JointStateInterface&, std::vector<std::__cxx11::basic_string<char> >&, double)’:
/home/mifa/ws_moveit/src/ur_modern_driver/include/ur_modern_driver/ros/hardware_interface.h:75:10: warning: ‘VelocityInterface::max_vel_change_’ will be initialized after [-Wreorder]
   double max_vel_change_;
          ^
/home/mifa/ws_moveit/src/ur_modern_driver/include/ur_modern_driver/ros/hardware_interface.h:74:40: warning:   ‘std::array<double, 6ul> VelocityInterface::prev_velocity_cmd_’ [-Wreorder]
   std::array<double, 6> velocity_cmd_, prev_velocity_cmd_;
                                        ^
/home/mifa/ws_moveit/src/ur_modern_driver/src/ros/hardware_interface.cpp:50:1: warning:   when initialized here [-Wreorder]
 VelocityInterface::VelocityInterface(URCommander &commander, hardware_interface::JointStateInterface &js_interface,
 ^
In file included from /home/mifa/ws_moveit/src/ur_modern_driver/src/ros/mb_publisher.cpp:19:0:
/home/mifa/ws_moveit/src/ur_modern_driver/include/ur_modern_driver/ros/mb_publisher.h:27:38: fatal error: ur_msgs/RobotModeDataMsg.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/ur_driver.dir/src/ros/mb_publisher.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/ur_driver.dir/all] Error 2
make: *** [all] Error 2
cd /home/mifa/ws_moveit/build/ur_modern_driver; catkin build --get-env ur_modern_driver | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd

I am new to ros so i have no idea what i'm doing when i run catkin make or build.

Annyone knows what is making this crash?

Kind regards, Jan Tromp.

martimorta-at-work commented 5 years ago

Hi Jan, catkin_make should be ran from the workspace's root, maybe that's the problem.

I strongly recommend to learn ROS before trying to work with more complex stuff, the best way is following the tutorials

gavanderhoorn commented 5 years ago

There are a few warnings, but this is the only error:

In file included from /home/mifa/ws_moveit/src/ur_modern_driver/src/ros/mb_publisher.cpp:19:0:
/home/mifa/ws_moveit/src/ur_modern_driver/include/ur_modern_driver/ros/mb_publisher.h:27:38: fatal error: ur_msgs/RobotModeDataMsg.h: No such file or directory

@JanTromp: how have you setup your workspace and installed ROS?

RobotModeDataMsg is definitely part of ur_msgs, so I'm wondering why you are missing it.

miguelprada commented 5 years ago

RobotModeDataMsg is definitely part of ur_msgs, so I'm wondering why you are missing it.

Yes, but it's probably not in the released binaries until the next sync.

@JanTromp the build should probably succeed if you add kinetic-devel branch of universal_robot repository to your workspace as well, until the updated version of the binaries is released.

JanTromp commented 5 years ago

Update:

I redownloaded the universal_robot package (this time made sure i had the kinetic devel branch) en ran catkin build. It succeeded:

[build] Summary: All 19 packages succeeded!                                    
[build]   Ignored:   2 packages were skipped or are blacklisted.               
[build]   Warnings:  1 packages succeeded with warnings.                       
[build]   Abandoned: None.                                                     
[build]   Failed:    None.

The warning

/opt/ros/kinetic/include/hardware_interface/internal/interface_manager.h:69:85: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
   static const void callConcatManagers(typename std::vector<T*>& managers, T* result)

But i guess i can ignore this warning for now right?

Thank you all for your input!

gavanderhoorn commented 5 years ago

Yes, you can ignore the warning for now.

As @miguelprada writes: as soon as the next Kinetic sync is out (announced here) you don't need to have a clone of universal_robot in your workspace any more.

gavanderhoorn commented 5 years ago

I've pinned this as I expect other users to run into this as well -- or at least until the Kinetic sync.

gavanderhoorn commented 5 years ago

Unpinning as Kinetic has been synced.