ros-simulation / gazebo_ros_demos

Example robots and code for interfacing Gazebo with ROS
347 stars 225 forks source link

Problem loading controller_manager when starting Moveit2 and gazebo_ros2_control #47

Closed solid-sinusoid closed 2 years ago

solid-sinusoid commented 2 years ago

Hello everyone, I have 2 robotic manipulators in my open source project. I fully configured the first robot to run perfectly using this combination. Despite the fact that both robots are identical in terms of URDF. After configuring the second robot, I encountered unexpected behavior. The launch of the program is accompanied by the controller_manager error:

[spawner.py-4] [ERROR] [1641352939.900824847] [spawner_neptun_arm_controller]: Controller manager not available
[spawner.py-3] [ERROR] [1641352939.918730349] [spawner_joint_state_broadcaster]: Controller manager not available

If the source files of the robot are required, then they can be found at this link

The complete log file is presented below (not from this branch 👆)

```sh 1641352928.3674600 [INFO] [launch]: All log files can be found below /home/bill-finger/.ros/log/2022-01-05-07-22-08-322172-billfinger-pc-108235 1641352928.3677945 [INFO] [launch]: Default logging verbosity is set to INFO 1641352929.3657432 [INFO] [ros2_control_node-1]: process started with pid [108255] 1641352929.3659594 [INFO] [robot_state_publisher-2]: process started with pid [108257] 1641352929.3660595 [INFO] [spawner.py-3]: process started with pid [108259] 1641352929.3661454 [INFO] [spawner.py-4]: process started with pid [108261] 1641352929.3662262 [INFO] [gzserver-5]: process started with pid [108263] 1641352929.3663056 [INFO] [gzclient -6]: process started with pid [108266] 1641352929.3663816 [INFO] [spawn_entity.py-7]: process started with pid [108269] 1641352929.3664567 [INFO] [rviz2-8]: process started with pid [108291] 1641352929.3665392 [INFO] [move_group-9]: process started with pid [108293] 1641352929.8530796 [spawner.py-4] [INFO] [1641352929.852578625] [spawner_neptun_arm_controller]: Waiting for /controller_manager services 1641352929.8731923 [spawner.py-3] [INFO] [1641352929.872901646] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services 1641352929.8755083 [ERROR] [ros2_control_node-1]: process has died [pid 108255, exit code -6, cmd '/opt/ros/foxy/lib/controller_manager/ros2_control_node --ros-args --params-file /tmp/launch_params_1aa5y1ta --params-file /home/bill-finger/rasms_ws/install/neptun_moveit_config/share/neptun_moveit_config/config/neptun_controllers.yaml']. 1641352930.5930386 [rviz2-8] Qt: Session management error: Could not open network socket 1641352931.8601594 [spawner.py-4] [INFO] [1641352931.859851964] [spawner_neptun_arm_controller]: Waiting for /controller_manager services 1641352931.8805783 [spawner.py-3] [INFO] [1641352931.880262050] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services 1641352931.9548535 [INFO] [spawn_entity.py-7]: process has finished cleanly [pid 108269] 1641352932.0512435 [rviz2-8] [INFO] [1641352932.050918999] [rviz2]: Stereo is NOT SUPPORTED 1641352932.0518618 [rviz2-8] [INFO] [1641352932.051044298] [rviz2]: OpenGl version: 4.6 (GLSL 4.6) 1641352932.1977348 [rviz2-8] [INFO] [1641352932.197424416] [rviz2]: Stereo is NOT SUPPORTED 1641352932.3061819 [rviz2-8] Warning: class_loader.impl: SEVERE WARNING!!! A namespace collision has occured with plugin factory for class rviz_default_plugins::displays::InteractiveMarkerDisplay. New factory will OVERWRITE existing one. This situation occurs when libraries containing plugins are directly linked against an executable (the one running right now generating this message). Please separate plugins out into their own library or just don't link against the library and use either class_loader::ClassLoader/MultiLibraryClassLoader to open. 1641352932.3065999 [rviz2-8] at line 253 in /opt/ros/foxy/include/class_loader/class_loader_core.hpp 1641352933.8702288 [spawner.py-4] [INFO] [1641352933.869935892] [spawner_neptun_arm_controller]: Waiting for /controller_manager services 1641352933.8911695 [spawner.py-3] [INFO] [1641352933.890868360] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services 1641352935.3258474 [rviz2-8] [ERROR] [1641352935.325450149] [moveit_ros_visualization.motion_planning_frame]: Action server: /recognize_objects not available 1641352935.4578655 [rviz2-8] Parsing robot urdf xml string. 1641352935.4587970 [rviz2-8] [INFO] [1641352935.457074712] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 0.00124859 seconds 1641352935.4591789 [rviz2-8] [INFO] [1641352935.457136677] [moveit_robot_model.robot_model]: Loading robot model 'neptun'... 1641352935.4594257 [rviz2-8] [INFO] [1641352935.457156042] [moveit_robot_model.robot_model]: No root/virtual joint specified in SRDF. Assuming fixed joint 1641352935.5860350 [rviz2-8] Link base_link had 1 children 1641352935.5869553 [rviz2-8] Link link1 had 1 children 1641352935.5884221 [rviz2-8] Link link2 had 1 children 1641352935.5896580 [rviz2-8] Link link3 had 1 children 1641352935.5914223 [rviz2-8] Link link4 had 1 children 1641352935.5921044 [rviz2-8] Link link5 had 1 children 1641352935.5925164 [rviz2-8] Link link6 had 0 children 1641352935.5972986 [rviz2-8] [WARN] [1641352935.597043268] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic. 1641352935.8817580 [spawner.py-4] [INFO] [1641352935.881462396] [spawner_neptun_arm_controller]: Waiting for /controller_manager services 1641352935.9029191 [spawner.py-3] [INFO] [1641352935.902485761] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services 1641352935.9759324 [rviz2-8] [INFO] [1641352935.975663313] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Starting planning scene monitor 1641352935.9772580 [rviz2-8] [INFO] [1641352935.977056592] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to '/monitored_planning_scene' 1641352936.6356039 [rviz2-8] [INFO] [1641352936.635299723] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Starting planning scene monitor 1641352936.6364915 [rviz2-8] [INFO] [1641352936.635806910] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to '/monitored_planning_scene' 1641352936.6755645 [rviz2-8] [INFO] [1641352936.675200640] [interactive_marker_display_94345384387520]: Connected on namespace: rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic 1641352936.7155459 [rviz2-8] Link base_link had 1 children 1641352936.7157085 [rviz2-8] Link link1 had 1 children 1641352936.7157681 [rviz2-8] Link link2 had 1 children 1641352936.7158198 [rviz2-8] Link link3 had 1 children 1641352936.7158685 [rviz2-8] Link link4 had 1 children 1641352936.7159150 [rviz2-8] Link link5 had 1 children 1641352936.7159669 [rviz2-8] Link link6 had 0 children 1641352936.7588644 [rviz2-8] [INFO] [1641352936.757631806] [interactive_marker_display_94345384387520]: Sending request for interactive markers 1641352936.7920895 [rviz2-8] [INFO] [1641352936.791813827] [interactive_marker_display_94345384387520]: Service response received for initialization 1641352937.8936553 [spawner.py-4] [INFO] [1641352937.893377338] [spawner_neptun_arm_controller]: Waiting for /controller_manager services 1641352937.9104257 [spawner.py-3] [INFO] [1641352937.910139528] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services 1641352939.9012055 [spawner.py-4] [ERROR] [1641352939.900824847] [spawner_neptun_arm_controller]: Controller manager not available 1641352939.9194984 [spawner.py-3] [ERROR] [1641352939.918730349] [spawner_joint_state_broadcaster]: Controller manager not available 1641352939.9371300 [ERROR] [spawner.py-4]: process has died [pid 108261, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py neptun_arm_controller -c /controller_manager --ros-args']. 1641352939.9567206 [ERROR] [spawner.py-3]: process has died [pid 108259, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py joint_state_broadcaster --controller-manager /controller_manager --ros-args']. 1641352941.6368887 [rviz2-8] [INFO] [1641352941.636623698] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Failed to call service get_planning_scene, have you launched move_group or called psm.providePlanningSceneService()? 1641352941.7179387 [rviz2-8] [INFO] [1641352941.717568295] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Failed to call service get_planning_scene, have you launched move_group or called psm.providePlanningSceneService()? 1641352941.7196949 [rviz2-8] [INFO] [1641352941.717662699] [moveit_ros_visualization.motion_planning_frame]: group neptun_arm_group 1641352941.7208910 [rviz2-8] [INFO] [1641352941.717670269] [moveit_ros_visualization.motion_planning_frame]: Constructing new MoveGroup connection for group 'neptun_arm_group' in namespace '' 1641352941.7293777 [rviz2-8] [INFO] [1641352941.729121150] [move_group_interface]: Ready to take commands for planning group neptun_arm_group. 1641352941.7301033 [rviz2-8] [INFO] [1641352941.729164051] [move_group_interface]: Looking around: no 1641352941.7301991 [rviz2-8] [INFO] [1641352941.729176362] [move_group_interface]: Replanning: no 1641353500.1197989 [WARNING] [launch]: user interrupted with ctrl-c (SIGINT) 1641353500.1377134 [rviz2-8] [INFO] [1641353500.122321697] [rclcpp]: signal_handler(signal_value=2) 1641353500.1435847 [rviz2-8] [WARN] [1641353500.133163942] [interactive_marker_display_94345384387520]: Server not available while running, resetting 1641353500.1634634 [INFO] [move_group-9]: process has finished cleanly [pid 108293] 1641353500.1727631 [INFO] [robot_state_publisher-2]: process has finished cleanly [pid 108257] 1641353500.2374523 [rviz2-8] 1641353500.2376561 [rviz2-8] >>> [rcutils|error_handling.c:108] rcutils_set_error_state() 1641353500.2377291 [rviz2-8] This error state is being overwritten: 1641353500.2377932 [rviz2-8] 1641353500.2378542 [rviz2-8] 'rcl node's context is invalid, at /tmp/binarydeb/ros-foxy-rcl-1.1.11/src/rcl/node.c:441' 1641353500.2379131 [rviz2-8] 1641353500.2379708 [rviz2-8] with this new error message: 1641353500.2380273 [rviz2-8] 1641353500.2381430 [rviz2-8] 'publisher's context is invalid, at /tmp/binarydeb/ros-foxy-rcl-1.1.11/src/rcl/publisher.c:423' 1641353500.2382045 [rviz2-8] 1641353500.2382596 [rviz2-8] rcutils_reset_error() should be called after error handling to avoid this. 1641353500.2383440 [rviz2-8] <<< 1641353500.2408717 [rviz2-8] [INFO] [1641353500.240590081] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Stopping planning scene monitor 1641353500.2499344 [rviz2-8] [INFO] [1641353500.249202211] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Stopping planning scene monitor 1641353500.3003180 [ERROR] [gzserver-5]: process has died [pid 108263, exit code -2, cmd 'gzserver -s libgazebo_ros_init.so -s libgazebo_ros_factory.so -s libgazebo_ros_force_system.so ']. 1641353500.3908882 [ERROR] [gzclient -6]: process has died [pid 108266, exit code -2, cmd 'gzclient ']. 1641353500.4720025 [INFO] [rviz2-8]: process has finished cleanly [pid 108291] ```

This link provides an example based on which I made the configuration of both robots

After getting errors like this, I'm really confused. I would be grateful for any help provided


My environment

P.S. If you think I wrote to the wrong repository, please direct me to the correct repository.


Update

I forgot to add that after about 2-3 minutes gazebo_ros2_control is loaded, but this is not the time at which I would like to expect it to start. At the same time, Gazebo itself starts up but without a visible robot model.

solid-sinusoid commented 2 years ago

I apologize guys, I found what the error is, the point is in the mesh files of the model, which is why gazebo could not load this model, for example, keep the screen of one link and there are two more of them. image