UniversalRobots / Universal_Robots_ROS2_Gazebo_Simulation

BSD 3-Clause "New" or "Revised" License
69 stars 29 forks source link

Cannot start simulated controller #7

Closed fmauch closed 2 years ago

fmauch commented 2 years ago

I've just tested the package again locally and I couldn't get it running. My robot collapses in Gazebo.

Tested on galactic and rolling

ros2 launch ur_simulation_gazebo ur_sim_control.launch.py launch_rviz:=false
[INFO] [launch]: All log files can be found below /home/mauch/.ros/log/2022-02-17-17-33-48-428280-ids-felino-1467787
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [1467792]
[INFO] [spawner-2]: process started with pid [1467794]
[INFO] [spawner-3]: process started with pid [1467796]
[INFO] [gzserver-4]: process started with pid [1467798]
[INFO] [gzclient   -5]: process started with pid [1467800]
[INFO] [spawn_entity.py-6]: process started with pid [1467803]
[robot_state_publisher-1] Link base_link had 2 children
[robot_state_publisher-1] Link base had 0 children
[robot_state_publisher-1] Link base_link_inertia had 1 children
[robot_state_publisher-1] Link shoulder_link had 1 children
[robot_state_publisher-1] Link upper_arm_link had 1 children
[robot_state_publisher-1] Link forearm_link had 1 children
[robot_state_publisher-1] Link wrist_1_link had 1 children
[robot_state_publisher-1] Link wrist_2_link had 1 children
[robot_state_publisher-1] Link wrist_3_link had 2 children
[robot_state_publisher-1] Link flange had 1 children
[robot_state_publisher-1] Link tool0 had 0 children
[robot_state_publisher-1] Link ft_frame had 0 children
[robot_state_publisher-1] [INFO] [1645115629.849598149] [robot_state_publisher]: got segment base
[robot_state_publisher-1] [INFO] [1645115629.849816430] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1645115629.849829497] [robot_state_publisher]: got segment base_link_inertia
[robot_state_publisher-1] [INFO] [1645115629.849835587] [robot_state_publisher]: got segment flange
[robot_state_publisher-1] [INFO] [1645115629.849840830] [robot_state_publisher]: got segment forearm_link
[robot_state_publisher-1] [INFO] [1645115629.849845750] [robot_state_publisher]: got segment ft_frame
[robot_state_publisher-1] [INFO] [1645115629.849850729] [robot_state_publisher]: got segment shoulder_link
[robot_state_publisher-1] [INFO] [1645115629.849855794] [robot_state_publisher]: got segment tool0
[robot_state_publisher-1] [INFO] [1645115629.849860601] [robot_state_publisher]: got segment upper_arm_link
[robot_state_publisher-1] [INFO] [1645115629.849865675] [robot_state_publisher]: got segment world
[robot_state_publisher-1] [INFO] [1645115629.849870454] [robot_state_publisher]: got segment wrist_1_link
[robot_state_publisher-1] [INFO] [1645115629.849875341] [robot_state_publisher]: got segment wrist_2_link
[robot_state_publisher-1] [INFO] [1645115629.849880039] [robot_state_publisher]: got segment wrist_3_link
[spawner-3] [INFO] [1645115630.018245809] [spawner_joint_trajectory_controller]: Waiting for /controller_manager services
[spawner-2] [INFO] [1645115630.023778367] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawn_entity.py-6] [INFO] [1645115630.221397392] [spawn_ur]: Spawn Entity started
[spawn_entity.py-6] [INFO] [1645115630.221701841] [spawn_ur]: Loading entity published on topic robot_description
[spawn_entity.py-6] [INFO] [1645115630.223669776] [spawn_ur]: Waiting for entity xml on robot_description
[spawn_entity.py-6] [INFO] [1645115630.226405134] [spawn_ur]: Waiting for service /spawn_entity, timeout = 5
[spawn_entity.py-6] [INFO] [1645115630.226649655] [spawn_ur]: Waiting for service /spawn_entity
[spawn_entity.py-6] [INFO] [1645115631.235188872] [spawn_ur]: Calling service /spawn_entity
[spawn_entity.py-6] [INFO] [1645115631.342849033] [spawn_ur]: Spawn status: SpawnEntity: Successfully spawned entity [ur]
[spawn_entity.py-6] /opt/ros/rolling/lib/python3.8/site-packages/rclpy/qos.py:307: UserWarning: DurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL is deprecated. Use DurabilityPolicy.TRANSIENT_LOCAL instead.
[spawn_entity.py-6]   warnings.warn(
[INFO] [spawn_entity.py-6]: process has finished cleanly [pid 1467803]
[spawner-3] [INFO] [1645115632.024827197] [spawner_joint_trajectory_controller]: Waiting for /controller_manager services
[spawner-2] [INFO] [1645115632.030173033] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner-3] [INFO] [1645115634.031438651] [spawner_joint_trajectory_controller]: Waiting for /controller_manager services
[spawner-2] [INFO] [1645115634.036481980] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner-3] [INFO] [1645115636.037947883] [spawner_joint_trajectory_controller]: Waiting for /controller_manager services
[spawner-2] [INFO] [1645115636.043177276] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner-3] [INFO] [1645115638.044545151] [spawner_joint_trajectory_controller]: Waiting for /controller_manager services
[spawner-2] [INFO] [1645115638.049869327] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner-3] [ERROR] [1645115640.051332917] [spawner_joint_trajectory_controller]: Controller manager not available
[spawner-2] [ERROR] [1645115640.056365590] [spawner_joint_state_broadcaster]: Controller manager not available
[ERROR] [spawner-3]: process has died [pid 1467796, exit code 1, cmd '/opt/ros/rolling/lib/controller_manager/spawner joint_trajectory_controller -c /controller_manager --ros-args'].
[ERROR] [spawner-2]: process has died [pid 1467794, exit code 1, cmd '/opt/ros/rolling/lib/controller_manager/spawner joint_state_broadcaster --controller-manager /controller_manager --ros-args'].

I'll leave this as a comment for now.

jbeck28 commented 2 years ago

Can confirm that I have the same problem on rolling.

fmauch commented 2 years ago

For me this was resolved by installing / building gazebo_ros2_control. I had been changing around with building things from source and deinstalling packages that I seem to have confused myelf. @jbeck28 I hope this also helps you. If not, feel free to comment here.

I'll close this, as this was not really an issue, but user stupidity from my side. A simple rosdep install --from-paths . --ignore-src would have shown the problem.