ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Unable to execute motion plan in MoveIt 2 and ROS2 controller manager keeps dying

asked 2023-06-01 02:33:59 -0500

Roskuttan gravatar image

updated 2023-06-06 10:35:30 -0500

Hello ROS Community,

I am currently working on a project with MoveIt 2 and ROS2 (Humble) and I am facing an issue I can't seem to resolve.

Context:

I am running a simulation of a six-jointed robot and using MoveIt 2 for planning. I have successfully created a motion plan for my robot, but when I try to execute the plan, it fails. Additionally, my controller manager keeps dying.

image description

image description

LOG:

roskuttan@SILENT-KILLERED:~/hexa_bot_ws$ ros2 launch hexa_bot_description_moveit_config demo.launch.py use_sim_time:=true
[INFO] [launch]: All log files can be found below /home/roskuttan/.ros/log/2023-05-31-21-33-40-784795-SILENT-KILLERED-11858
[INFO] [launch]: Default logging verbosity is set to INFO
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
[INFO] [static_transform_publisher-1]: process started with pid [11859]
[INFO] [robot_state_publisher-2]: process started with pid [11861]
[INFO] [move_group-3]: process started with pid [11863]
[INFO] [rviz2-4]: process started with pid [11865]
[INFO] [ros2_control_node-5]: process started with pid [11867]
[INFO] [spawner-6]: process started with pid [11869]
[INFO] [spawner-7]: process started with pid [11871]
[static_transform_publisher-1] [INFO] [1685549021.419656555] [static_transform_publisher0]: Spinning until stopped - publishing transform
[static_transform_publisher-1] translation: ('0.000000', '0.000000', '0.000000')
[static_transform_publisher-1] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-1] from 'world' to 'base_link'
[ros2_control_node-5] [INFO] [1685549021.428105055] [resource_manager]: Loading hardware 'GazeboSystem'
[ros2_control_node-5] terminate called after throwing an instance of 'pluginlib::LibraryLoadException'
[ros2_control_node-5]   what():  According to the loaded plugin descriptions the class gazebo_ros2_control/GazeboSystem with base class type hardware_interface::SystemInterface does not exist. Declared types are  fake_components/GenericSystem mock_components/GenericSystem test_hardware_components/TestSystemCommandModes test_hardware_components/TestTwoJointSystem test_system
[ros2_control_node-5] Stack trace (most recent call last):
[ros2_control_node-5] #16   Object "", at 0xffffffffffffffff, in
[ros2_control_node-5] #15   Object "/opt/ros/humble/lib/controller_manager/ros2_control_node", at 0x55bfce760d84, in
[ros2_control_node-5] #14   Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7f99cabb9e3f, in __libc_start_main
[robot_state_publisher-2] [WARN] [1685549021.429758155] [kdl_parser]: The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia.  As a workaround, you can add an extra dummy link to your URDF.
[ros2_control_node-5] #13   Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7f99cabb9d8f, in
[ros2_control_node-5] #12   Object "/opt/ros/humble/lib/controller_manager/ros2_control_node", at 0x55bfce76089e, in
[ros2_control_node-5] #11   Object "/opt/ros/humble/lib/libcontroller_manager.so", at 0x7f99cb26d171, in controller_manager::ControllerManager::ControllerManager(std::shared_ptr<rclcpp::Executor>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::NodeOptions const&)
[ros2_control_node-5] #10   Object "/opt/ros/humble/lib/libcontroller_manager.so", at 0x7f99cb26c257, in controller_manager::ControllerManager::init_resource_manager(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[robot_state_publisher-2] [INFO] [1685549021.429863355] [robot_state_publisher]: got segment JAW1_1
[robot_state_publisher-2] [INFO] [1685549021.429918055] [robot_state_publisher]: got segment JAW2_1
[robot_state_publisher-2] [INFO] [1685549021.429927655] [robot_state_publisher]: got segment JAW3_1
[robot_state_publisher-2] [INFO] [1685549021.429934355] [robot_state_publisher]: got segment JAW6_1
[robot_state_publisher-2] [INFO] [1685549021.429940655] [robot_state_publisher]: got segment Jaw4_1
[robot_state_publisher-2] [INFO] [1685549021.429946955] [robot_state_publisher]: got segment Jaw5_1
[robot_state_publisher-2] [INFO] [1685549021.429953255] [robot_state_publisher]: got segment NEMA_3_1
[robot_state_publisher-2] [INFO] [1685549021.429959555] [robot_state_publisher]: got segment NEMA_4_1
[robot_state_publisher-2] [INFO] [1685549021.429965955] [robot_state_publisher]: got segment NEMA_5_1
[robot_state_publisher-2] [INFO] [1685549021.429972355] [robot_state_publisher]: got segment Nema_1_1
[robot_state_publisher-2] [INFO] [1685549021.429978655] [robot_state_publisher]: got segment Nema_2_1 ...
(more)
edit retag flag offensive close merge delete

Comments

Hello,

Can you please, post your log and screenshot over here, I think you have enough karma to upload images.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2023-06-01 03:14:58 -0500 )edit

I have atttached the log in the drive because i am unable to post the full log here

Roskuttan gravatar image Roskuttan  ( 2023-06-01 03:43:07 -0500 )edit

I have updated your question, I hope it helps you.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2023-06-01 04:25:41 -0500 )edit

ok thank you so much

Roskuttan gravatar image Roskuttan  ( 2023-06-01 04:45:37 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2023-06-08 21:20:57 -0500

Roskuttan gravatar image

updated 2023-06-08 22:24:08 -0500

I have successfully resolved the issue and would like to share the resolution process, which may benefit others who encounter a similar problem. The issue I faced was twofold:

1. Discrepancy in the Naming Convention:

In my hexa_bot.yaml file, the arm controller was referenced as arm_controller. However, in the MoveIt configuration files, ros2_controllers.yaml and moveit_controllers.yaml, the arm controller was named arm_controller_controller. This inconsistency in naming caused the system to be unable to correctly identify and match the arm controller across these files, leading to the failure in the execution of the motion plan. image description

image description

2. Incorrect Node Launch Sequence:

There was an issue with the controller manager dying, which was due to the incorrect sequence in which the launch nodes were initiated. The gazebo launch node should be started first, followed by the MoveIt demo launch node. Failing to do so resulted in the controller manager not starting properly.

It's important to note that the issue was not related to the gazebo_ros2_control tag, which was initially suspected to be the cause.

By correcting the naming discrepancy and ensuring consistency in referencing the arm controller across all the files (I changed arm_controller_controller to arm_controller in the ros2_controllers.yaml and moveit_controllers.yaml files), I was able to resolve the first issue. Ensuring the correct sequence of node launches resolved the second issue. Now, with the correct and consistent naming and proper node launch sequence, the system can accurately identify the arm controller, allowing the motion plan to be executed correctly and the ROS2 controller manager to function without any interruptions.

This experience serves as a reminder of the importance of maintaining consistent naming conventions across different files within a project, especially when these files have interdependencies, and the necessity of following the correct node launch sequence.

I hope this detailed explanation assists others facing similar issues. Consistency is crucial when dealing with complex systems like ROS2.

I'd like to express my sincere gratitude to @danzimmerman for directing me towards the right path. Your input played a crucial role in identifying the root causes and arriving at the solutions. Thank you!

edit flag offensive delete link more
1

answered 2023-06-05 06:41:31 -0500

danzimmerman gravatar image

updated 2023-06-05 06:44:34 -0500

You're having problems loading the gazebo_ros2_control plugin:

[ros2_control_node-5] [INFO] [1685549021.428105055] [resource_manager]: Loading hardware 'GazeboSystem'
[ros2_control_node-5] terminate called after throwing an instance of 'pluginlib::LibraryLoadException'
[ros2_control_node-5]   what():  According to the loaded plugin descriptions the class 
gazebo_ros2_control/GazeboSystem with base class type hardware_interface::SystemInterface does not exist. Declared 
types are fake_components/GenericSystem mock_components/GenericSystem 
test_hardware_components/TestSystemCommandModes test_hardware_components/TestTwoJointSystem test_system

I'd double-check that gazebo_ros2_control is installed properly and check your URDF and config files to make sure you've set up the plugin configuration correctly.

The controller manager is supplied by the ros2_control_node, so /controller_manager dies when this exception is thrown.

edit flag offensive delete link more

Comments

I have tried building gazebo_ros2_control using both the apt and source methods, but unfortunately, I encountered the same error with both approaches. Moreover, I am facing difficulties in executing the motion planning. It would be greatly appreciated if you could assist me in resolving this issue, as it is crucial for me to keep my project on track. To provide better context, I have shared my files at the following link: files.

Roskuttan gravatar image Roskuttan  ( 2023-06-05 08:08:41 -0500 )edit

Moreover, I am facing difficulties in executing the motion planning

This is related. MoveIt will attempt to send the motion plan to the joint controller, but if /controller_manager has died, your joint trajectory controller (arm_controller_controller) won't be operational and there's nothing to execute the plan.

I believe that in config/hexa_bot.ros2_control.xacro your <hardware> plugin should be gazebo_ros2_control/GazeboSystem (like here, for example) not mock_components/GenericSystem.

danzimmerman gravatar image danzimmerman  ( 2023-06-05 18:29:22 -0500 )edit

Thank You let me try that

Roskuttan gravatar image Roskuttan  ( 2023-06-05 21:01:31 -0500 )edit

I tried to add gazebo_ros2_control/GazeboSystem still controller manager is not active check the log HERE

Roskuttan gravatar image Roskuttan  ( 2023-06-06 01:41:32 -0500 )edit

I found the root cause of the controller manager failure. It was due to not launching Gazebo with MoveIt together. These two components require separate files to be launched. I followed your previous suggestion and launched the 'gazebo.launch.py' file first, followed by the MoveIt launch file ('demo.launch.py'). By changing the parameter to 'gazebo_ros2_control/GazeboSystem', I managed to activate the controller manager successfully. However, despite these modifications, I encountered another error that prevented the execution from proceeding. Any assistance you can provide would be greatly appreciated.

Roskuttan gravatar image Roskuttan  ( 2023-06-06 09:40:00 -0500 )edit

I have attached my workspace, including all my files and logs, to provide a better understanding of my setup and the error I encountered. find the files HERE

Roskuttan gravatar image Roskuttan  ( 2023-06-06 09:59:51 -0500 )edit

I noticed your hexa_bot.yaml refers to arm_controller but your MoveIt config's ros2_controllers.yaml and moveit_controllers.yaml refer to arm_controller_controller. I wonder if that has something to do with it?

danzimmerman gravatar image danzimmerman  ( 2023-06-06 18:27:14 -0500 )edit

Thank you! I discovered that the arm controllers' names were different in the YAML file, just as you mentioned. This turned out to be the root cause of the issue I was facing. I'm incredibly grateful for your help and prompt response.

Roskuttan gravatar image Roskuttan  ( 2023-06-08 20:40:41 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-06-01 02:33:59 -0500

Seen: 1,218 times

Last updated: Jun 08 '23