Skip to content
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

Build from source is broken for Humble by latest updates in ros2_controllers package #1062

Closed
1 task done
cosmac opened this issue Jul 17, 2024 · 9 comments
Closed
1 task done
Assignees
Labels
bug Something isn't working

Comments

@cosmac
Copy link

cosmac commented Jul 17, 2024

Affected ROS2 Driver version(s)

2.2.14

Used ROS distribution.

Humble

Which combination of platform is the ROS driver running on.

Ubuntu Linux with standard kernel

How is the UR ROS2 Driver installed.

Build the driver from source and using the UR Client Library from binary

Which robot platform is the driver connected to.

UR E-series robot

Robot SW / URSim version(s)

5.1

How is the ROS driver used.

Headless without using the teach pendant

Issue details

Summary

Failed to build Humble branch from source. External function signature changed (see get_segment_tolerances() from ros2-controllers).

Issue details

Steps to Reproduce

git clone --branch humble https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver.git src/Universal_Robots_ROS2_Driver
vcs import src --skip-existing --input src/Universal_Robots_ROS2_Driver/Universal_Robots_ROS2_Driver.humble.repos

colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

Expected Behavior

Build from source successful for all packages.

Actual Behavior

Build fails during ur_controllers

Workaround Suggestion

Update function call:
default_tolerances_ = get_segment_tolerances(get_node()->get_logger(), params_);

Relevant log output

171.3 --- stderr: ur_controllers
171.3 /root/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp: In member function 'virtual controller_interface::return_type ur_controllers::ScaledJointTrajectoryController::update(const rclcpp::Time&, const rclcpp::Duration&)':
171.3 /root/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:92:49: error: no matching function for call to 'get_segment_tolerances(joint_trajectory_controller::Params&)'
171.3    92 |     default_tolerances_ = get_segment_tolerances(params_);
171.3       |                           ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
171.3 In file included from /root/workspace/ros_ur_driver/install/joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller/joint_trajectory_controller.hpp:31,
171.3                  from /root/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/include/ur_controllers/scaled_joint_trajectory_controller.hpp:41,
171.3                  from /root/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:41:
171.3 /root/workspace/ros_ur_driver/install/joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller/tolerances.hpp:96:19: note: candidate: 'joint_trajectory_controller::SegmentTolerances joint_trajectory_controller::get_segment_tolerances(rclcpp::Logger&, const Params&)'
171.3    96 | SegmentTolerances get_segment_tolerances(rclcpp::Logger & jtc_logger, const Params & params)
171.3       |                   ^~~~~~~~~~~~~~~~~~~~~~
171.3 /root/workspace/ros_ur_driver/install/joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller/tolerances.hpp:96:19: note:   candidate expects 2 arguments, 1 provided
171.3 /root/workspace/ros_ur_driver/install/joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller/tolerances.hpp:166:19: note: candidate: 'joint_trajectory_controller::SegmentTolerances joint_trajectory_controller::get_segment_tolerances(rclcpp::Logger&, const SegmentTolerances&, const control_msgs::action::FollowJointTrajectory::Goal&, const std::vector<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char> > >&)'
171.3   166 | SegmentTolerances get_segment_tolerances(
171.3       |                   ^~~~~~~~~~~~~~~~~~~~~~
171.3 /root/workspace/ros_ur_driver/install/joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller/tolerances.hpp:166:19: note:   candidate expects 4 arguments, 1 provided

Accept Public visibility

  • I agree to make this context public
@fmauch fmauch added the bug Something isn't working label Jul 18, 2024
@fmauch
Copy link
Collaborator

fmauch commented Jul 18, 2024

Yes, that needs another round of refactoring. Thanks for pointing that out, though.

@utsavrai
Copy link

Hi @fmauch, the build is still failing for humble.

colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
Starting >>> ur_dashboard_msgs
Starting >>> ur_description
Finished <<< ur_description [0.80s]                                                               
Starting >>> ur_moveit_config                         
Finished <<< ur_moveit_config [0.56s]                                                                    
Finished <<< ur_dashboard_msgs [2.04s]                     
Starting >>> ur_controllers
--- stderr: ur_controllers                              
/home/utsav/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp: In member function ‘virtual controller_interface::return_type ur_controllers::ScaledJointTrajectoryController::update(const rclcpp::Time&, const rclcpp::Duration&)’:
/home/utsav/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:93:50: error: invalid initialization of reference of type ‘const joint_trajectory_controller::Params&’ from expression of type ‘rclcpp::Logger’
   93 |     default_tolerances_ = get_segment_tolerances(logger, params_);
      |                                                  ^~~~~~
In file included from /opt/ros/humble/include/joint_trajectory_controller/joint_trajectory_controller/joint_trajectory_controller.hpp:31,
                 from /home/utsav/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/include/ur_controllers/scaled_joint_trajectory_controller.hpp:41,
                 from /home/utsav/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:41:
/opt/ros/humble/include/joint_trajectory_controller/joint_trajectory_controller/tolerances.hpp:91:57: note: in passing argument 1 of ‘joint_trajectory_controller::SegmentTolerances joint_trajectory_controller::get_segment_tolerances(const joint_trajectory_controller::Params&)’
   91 | SegmentTolerances get_segment_tolerances(Params const & params)
      |                                          ~~~~~~~~~~~~~~~^~~~~~
/home/utsav/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:184:25: error: ‘active_tolerances_’ was not declared in this scope
  184 |       auto active_tol = active_tolerances_.readFromRT();
      |                         ^~~~~~~~~~~~~~~~~~
/home/utsav/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:204:14: error: ‘check_state_tolerance_per_joint’ was not declared in this scope; did you mean ‘joint_trajectory_controller::check_state_tolerance_per_joint’?
  204 |             !check_state_tolerance_per_joint(state_error_, index, active_tol->state_tolerance[index],
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |              joint_trajectory_controller::check_state_tolerance_per_joint
In file included from /opt/ros/humble/include/joint_trajectory_controller/joint_trajectory_controller/joint_trajectory_controller.hpp:31,
                 from /home/utsav/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/include/ur_controllers/scaled_joint_trajectory_controller.hpp:41,
                 from /home/utsav/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:41:
/opt/ros/humble/include/joint_trajectory_controller/joint_trajectory_controller/tolerances.hpp:126:13: note: ‘joint_trajectory_controller::check_state_tolerance_per_joint’ declared here
  126 | inline bool check_state_tolerance_per_joint(
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/utsav/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:210:14: error: ‘check_state_tolerance_per_joint’ was not declared in this scope; did you mean ‘joint_trajectory_controller::check_state_tolerance_per_joint’?
  210 |             !check_state_tolerance_per_joint(state_error_, index, active_tol->goal_state_tolerance[index],
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |              joint_trajectory_controller::check_state_tolerance_per_joint
In file included from /opt/ros/humble/include/joint_trajectory_controller/joint_trajectory_controller/joint_trajectory_controller.hpp:31,
                 from /home/utsav/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/include/ur_controllers/scaled_joint_trajectory_controller.hpp:41,
                 from /home/utsav/workspace/ros_ur_driver/src/Universal_Robots_ROS2_Driver/ur_controllers/src/scaled_joint_trajectory_controller.cpp:41:
/opt/ros/humble/include/joint_trajectory_controller/joint_trajectory_controller/tolerances.hpp:126:13: note: ‘joint_trajectory_controller::check_state_tolerance_per_joint’ declared here
  126 | inline bool check_state_tolerance_per_joint(
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/ur_controllers.dir/build.make:76: CMakeFiles/ur_controllers.dir/src/scaled_joint_trajectory_controller.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/Makefile2:223: CMakeFiles/ur_controllers.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< ur_controllers [8.41s, exited with code 2]

Summary: 3 packages finished [10.6s]
  1 package failed: ur_controllers
  1 package had stderr output: ur_controllers
  4 packages not processed

@fmauch
Copy link
Collaborator

fmauch commented Jul 26, 2024

Yes, this is normal and expected. The upstream changes showed up in the semi-binary builds as soon as they hit the humble branch upstream. Now, that API is published as package to the testing repo, hence the testing binary build was also failing, that was when this issue was created. Since there has not been a sync from testing to main, main still contains the old API, so now the main binary build is failing. This will only affect users building this repo from source without building ros2_controllers from source. There is no way around this, when upstream API is changed.

@utsavrai
Copy link

@fmauch Thanks for answering. I wanted to understand how to successfully build the humble branch from source successfully as I have pulled all the changes and I am still failing to build. Are there more fixes to come?

Thanks

@fmauch
Copy link
Collaborator

fmauch commented Jul 26, 2024

As I've written, for the current humble branch to build you'll need to build ros2_control (and therefore moveit) from source. Or you wait for the next humble sync ;-)

Unless you want to actively take part in development, there should be no reason to build this package from source.

@utsavrai
Copy link

Understood. Thank you very much for responding!

@PedroMoreo
Copy link

I have the same problem.
Thanks a lot.

@fmauch
Copy link
Collaborator

fmauch commented Aug 8, 2024

The humble sync is out, all humble pipelines are green, that should be resolved.

@roboticshard
Copy link

I have faced this issue again unexpectedly this issue existed. How can I solve immediately ?
@fmauch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants