moveit / moveit2

:robot: MoveIt for ROS 2
https://moveit.ai/
BSD 3-Clause "New" or "Revised" License
1.09k stars 528 forks source link

moveit_ros_control_interface PACKAGE FAILED on colcon build --mixin release #1569

Closed enriLoniterp closed 1 year ago

enriLoniterp commented 2 years ago

Description

i've following getting started tutorial for developing moveit project (not the first time actually). new ros2 worskspace, i've followed every pass and then i got:

rosdev@rosdev:~/ws_moveit2/src$ cd ~/ws_moveit2
colcon build --mixin release
[0.451s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
    'hardware_interface' is in: /opt/ros/humble
    'controller_interface' is in: /opt/ros/humble
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
    --allow-overriding controller_interface hardware_interface

This may be promoted to an error in a future release of colcon-override-check.
Starting >>> moveit_common
Starting >>> moveit_resources_panda_description
Starting >>> moveit_configs_utils
Starting >>> moveit_resources_fanuc_description
Starting >>> controller_manager_msgs
Starting >>> ros2_control_test_assets
Starting >>> moveit_task_constructor_msgs
Starting >>> rviz_marker_tools
Finished <<< moveit_common [1.09s]                                   
Starting >>> moveit_resources_pr2_description
Finished <<< moveit_configs_utils [1.11s]
Starting >>> moveit_resources_prbt_support
Finished <<< moveit_resources_panda_description [1.18s]
Starting >>> moveit_resources_panda_moveit_config
Finished <<< moveit_resources_fanuc_description [1.24s]
Starting >>> moveit_resources_fanuc_moveit_config
Finished <<< ros2_control_test_assets [1.25s]
Starting >>> hardware_interface
Finished <<< moveit_resources_prbt_support [0.94s]                           
Starting >>> joint_limits
Finished <<< moveit_resources_fanuc_moveit_config [0.89s]                    
Starting >>> rviz_visual_tools
Finished <<< moveit_resources_pr2_description [1.08s]
Starting >>> rosparam_shortcuts
Finished <<< moveit_resources_panda_moveit_config [1.02s]                    
Starting >>> moveit_core
[Processing: controller_manager_msgs, hardware_interface, joint_limits, moveit_core, moveit_task_constructor_msgs, rosparam_shortcuts, rviz_marker_tools, rviz_visual_tools]
Finished <<< rviz_marker_tools [40.1s] 
Starting >>> moveit_resources
Finished <<< joint_limits [38.1s]       
Finished <<< controller_manager_msgs [40.4s]
Finished <<< moveit_resources [0.84s]   
Finished <<< moveit_task_constructor_msgs [46.2s]
Finished <<< rosparam_shortcuts [46.5s]                                        
[Processing: hardware_interface, moveit_core, rviz_visual_tools]               
Finished <<< rviz_visual_tools [1min 25s]    
Finished <<< hardware_interface [1min 29s]   
Starting >>> controller_interface
Starting >>> transmission_interface
[Processing: controller_interface, moveit_core, transmission_interface]
Finished <<< controller_interface [31.3s]   
Starting >>> controller_manager
Finished <<< transmission_interface [31.9s] 
[Processing: controller_manager, moveit_core]
[Processing: controller_manager, moveit_core]
Finished <<< controller_manager [1min 21s]   
Starting >>> ros2controlcli
Finished <<< ros2controlcli [1.09s]          
Starting >>> ros2_control
Finished <<< ros2_control [0.94s]            
[Processing: moveit_core]                                         
[Processing: moveit_core]                                         
Finished <<< moveit_core [4min 27s]                                
Starting >>> moveit_ros_occupancy_map_monitor
Starting >>> moveit_simple_controller_manager
Starting >>> moveit_resources_prbt_ikfast_manipulator_plugin
Starting >>> chomp_motion_planner
Starting >>> pilz_industrial_motion_planner_testutils
Finished <<< moveit_simple_controller_manager [21.2s]
Starting >>> moveit_plugins
Starting >>> moveit_ros_control_interface
Finished <<< moveit_plugins [1.11s]          
Finished <<< pilz_industrial_motion_planner_testutils [26.7s]
Finished <<< chomp_motion_planner [35.5s]    
Starting >>> moveit_chomp_optimizer_adapter
Starting >>> moveit_planners_chomp
--- stderr: moveit_ros_control_interface    
/home/rosdev/ws_moveit2/src/moveit2/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp: In member function ‘bool moveit_ros_control_interface::MoveItControllerManager::fixChainedControllers(std::shared_ptr<controller_manager_msgs::srv::ListControllers_Response_<std::allocator<void> > >&)’:
/home/rosdev/ws_moveit2/src/moveit2/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp:471:22: error: ‘struct controller_manager_msgs::msg::ControllerState_<std::allocator<void> >’ has no member named ‘chain_connections’
  471 |       if (controller.chain_connections.size() > 1)
      |                      ^~~~~~~~~~~~~~~~~
/home/rosdev/ws_moveit2/src/moveit2/moveit_plugins/moveit_ros_control_interface/src/controller_manager_plugin.cpp:478:56: error: ‘struct controller_manager_msgs::msg::ControllerState_<std::allocator<void> >’ has no member named ‘chain_connections’
  478 |       for (const auto& chained_controller : controller.chain_connections)
      |                                                        ^~~~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/moveit_ros_control_interface_plugin.dir/build.make:76: CMakeFiles/moveit_ros_control_interface_plugin.dir/src/controller_manager_plugin.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:143: CMakeFiles/moveit_ros_control_interface_plugin.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< moveit_ros_control_interface [14.4s, exited with code 2]
Aborted  <<< moveit_resources_prbt_ikfast_manipulator_plugin [37.9s]
Aborted  <<< moveit_chomp_optimizer_adapter [3.63s]    
Aborted  <<< moveit_ros_occupancy_map_monitor [39.2s]  
Aborted  <<< moveit_planners_chomp [3.72s]

Summary: 27 packages finished [5min 9s]
  1 package failed: moveit_ros_control_interface
  4 packages aborted: moveit_chomp_optimizer_adapter moveit_planners_chomp moveit_resources_prbt_ikfast_manipulator_plugin moveit_ros_occupancy_map_monitor
  1 package had stderr output: moveit_ros_control_interface
  31 packages not processed

Your environment

Steps to reproduce

Tell us how to reproduce this issue. Attempt to provide a working demo, perhaps using Docker.

Expected behaviour

Build as always, had this problem only recently

Actual behaviour

It has error on building package stated above

Backtrace or Console output

Use gist.github.com to copy-paste the console output or segfault backtrace using gdb.

Abishalini commented 2 years ago

It looks like this change is affecting your build. You need to update the version of ros2_control in your workspace

enriLoniterp commented 2 years ago

Hi @Abishalini, gratefull for your reply.

I have done a git reset hard on MoveitTutorials before e specific commit specified by one of the creators. It worked but basically i have no chainable controllers, maybe when i have time i'll do what you suggested and report it.

Thank you again, Enrico

henningkayser commented 1 year ago

yes, pretty sure it's just caused by an outdated ros2_control version... closing