IFRA-Cranfield / ros2_SimRealRobotControl

This repository provides ready-to-use ROS2 (Humble) packages to execute simple programs and sequences and control different Industrial and Collaborative Robots using ROS 2.
Apache License 2.0
85 stars 10 forks source link

Robot Falled off in Simulation #10

Closed kaicongw closed 5 months ago

kaicongw commented 6 months ago

Hello,

I was trying to run simulations after I installed ros2_SimRealRobotControl following all the steps in the ReadMe (including the new IFRA_LinkAttacher ROS2-Gazebo plugin). However, when I launched the Gazebo simulation environment or the Gazebo + MoveIt!2 environment, my robot always falled off without maintaining its home position. I could not run any other programs to contorl its movements as well. What could be the reasons?

I tried the following command:

ros2 launch ros2srrc_irb120_gazebo simulation.launch.py layout:=ros2srrc_irb120_1 endeffector:=RobAlone

ros2 launch ros2srrc_irb120_moveit2 moveit2.launch.py layout:=ros2srrc_irb120_1 endeffector:=RobAlone

These were some of the log messages:

[ERROR] [spawner-7]: process has died [pid 10964, exit code 1, cmd '/opt/ros/humble/lib/controller_manager/spawner egp64_finger_left_controller -c /controller_manager --ros-args']. [INFO] [spawner-8]: process started with pid [11008] [spawner-8] [INFO] [1711945806.801040381] [spawner_egp64_finger_right_controller]: Waiting for '/controller_manager' node to exist [spawner-8] [INFO] [1711945808.817141369] [spawner_egp64_finger_right_controller]: Waiting for '/controller_manager' node to exist [spawner-8] [INFO] [1711945810.833380512] [spawner_egp64_finger_right_controller]: Waiting for '/controller_manager' node to exist [spawner-8] [INFO] [1711945812.848078482] [spawner_egp64_finger_right_controller]: Waiting for '/controller_manager' node to exist [spawner-8] [ERROR] [1711945814.865378198] [spawner_egp64_finger_right_controller]: Controller manager not available [ERROR] [spawner-8]: process has died [pid 11008, exit code 1, cmd '/opt/ros/humble/lib/controller_manager/spawner egp64_finger_right_controller -c /controller_manager --ros-args'].

case-a2 commented 5 months ago

I am having the same issue. I suspect a dependency was updated.

chytra3 commented 5 months ago

https://github.com/IFRA-Cranfield/ros2_RobotSimulation/issues/26#issue-2237939225

you can refer to this issue , it is exactly the same error . That got resolved .

kaicongw commented 5 months ago

IFRA-Cranfield/ros2_RobotSimulation#26 (comment)

you can refer to this issue , it is exactly the same error . That got resolved .

Thank you so much! It worked. I got it solved using the method you mentioned. Using the 0.4.6 version of ros-humble-gazebo-ros2-control is the key.