UniversalRobots / Universal_Robots_ROS_Driver

Universal Robots ROS driver supporting CB3 and e-Series
Apache License 2.0
767 stars 405 forks source link

ROS Melodic build error due to ur_msgs mismatch (old build issue) #404

Closed gokhansolak closed 3 years ago

gokhansolak commented 3 years ago

Summary

I cannot catkin_make as the _urmsgs package does not have the variable expected by the hardware interface.

Universal_Robots_ROS_Driver/ur_robot_driver/src/hardware_interface.cpp:396:39: error: ‘ur_msgs::SetPayload::Request {aka struct ur_msgs::SetPayloadRequest_<std::allocator<void> >}’ has no member named ‘mass’
             << " set_payload(" << req.mass << ", [" << req.center_of_gravity.x << ", " << req.center_of_gravity.y

Similar to #235, but the solution there does not work (anymore). I have the Fmauch's fork on calibration_devel branch, that meta-package does not contain a ur_msgs package anymore. Rosdep installs a ur_msgs to the system, but that version does not build with this driver.

Versions

Details

The system-wide ur_msgs package, installed by rosdep is: ros-melodic-ur-msgs/bionic,now 1.3.4-1bionic.20210525.170053 amd64 [installed]

Steps to Reproduce

Install according to the instructions.

fmauch commented 3 years ago

Did you make sure to pull the universal_robots repository from my fork to the most recent version? There's been a major change including handling this properly. The driver's master branch now builds corrently with the ur_msgs package installed by rosdep. Which is why it is not anymore included in my fork.

gokhansolak commented 3 years ago

The fork and the commit were correct. Strangely, deleting ROS build solved the issue (rm -rf build/ devel/). I used to have a build with older versions of these packages... Thank you!

fmauch commented 3 years ago

right, as it has been built previously, it still hangs around in the devel / install space... thanks for following this up.

ljden commented 3 years ago

I was having the same issue when updating to the newest setup. Removing the build did not fix it. Instead, I had to re-source the /opt/ros/melodic/setup.bash after installing ur_msgs so that ROS had the correct view of packages etc. After doing this, it built correctly.

ilariagi commented 2 years ago

ROS Melodic, not working for me either building together ur_modern_driver and universal_robot packages. I got this error error: ‘ur_msgs::SetPayloadRequest {aka struct urmsgs::SetPayloadRequest<std::allocator >}’ has no member named ‘payload’ return (resp.success = commander_.setPayload(req.payload));

fmauch commented 2 years ago

@ilariagi Please don't dig out old issues. Especially, if they don't connect to the repository. Neither ur_modern_driver, nor universal_robot nor ur_msgs are part of this repo. If you have problems compiling the ur_modern_driver please check it there.


Edit: Corresponding issue: https://github.com/ros-industrial/ur_modern_driver/issues/383