Closed Icon45 closed 1 year ago
What's happening here when the RViz robot is white and collapsed is usually that /tf
transforms aren't being published. I often see this when some node has crashed or hasn't started properly.
If you run
ros2 run rqt_graph rqt_graph
and/or
ros2 node list
is the /robot_state_publisher
node up and running?
Are there any errors or warnings in the terminal window where you launched ur_sim_control.launch.py
?
In the terminal, I get this:
and is currently working on an up-to-date installation of ROS 2 rolling
.
ros2 node list
gives:
dan@computer:~/ros/gz_ws$ ros2 node list
/controller_manager
/gazebo
/gazebo_ros2_control
/joint_state_broadcaster
/joint_trajectory_controller
/robot_state_publisher
/rviz2
/transform_listener_impl_558a77d220f0
And my ROS graph:
I can't try out my humble
installation right now but I'll try when I get a chance.
Let me know what's going on on your machine.
I'm getting the following warning in my terminal after launching ur_sim_control.launch.py
[rviz2-7] Warning: Invalid frame ID "forearm_link" passed to canTransform argument source_frame - frame does not exist
[rviz2-7] at line 93 in ./src/buffer_core.cpp
[rviz2-7] Warning: Invalid frame ID "shoulder_link" passed to canTransform argument source_frame - frame does not exist
[rviz2-7] at line 93 in ./src/buffer_core.cpp
[rviz2-7] Warning: Invalid frame ID "upper_arm_link" passed to canTransform argument source_frame - frame does not exist
[rviz2-7] at line 93 in ./src/buffer_core.cpp
[rviz2-7] Warning: Invalid frame ID "wrist_1_link" passed to canTransform argument source_frame - frame does not exist
[rviz2-7] at line 93 in ./src/buffer_core.cpp
[rviz2-7] Warning: Invalid frame ID "wrist_2_link" passed to canTransform argument source_frame - frame does not exist
[rviz2-7] at line 93 in ./src/buffer_core.cpp
When I run rqt_graph it just shows the /robot_state_publisher and nothing else.
I'm currently using a brand new installation of humble and the official ros2-driver for the UR-Bots
When running ros2 node list I only get these nodes listed:
/gazebo /robot_state_publisher /rviz2 /transform_listener_impl_55fc3b443790
In gazebo my robot is orientated horizontally. It is stretched out along the forward axis (so not collapsed or bend at any joints).
Update: I tried again to get it up and running. I didn't do anything different to last time but got slightly different results. Gazebo and RViz still look the same. The warning in my console is also still there. But when i run rqt_graph i see the following
If I run ros2 node list I get the old output.
This doesn't fix the issue but at least rqt_graph is showing what ros2 node list prints out. Really don't know why the other nodes aren't starting as they should
Can you post the entire text of your console output after you launch?
Did you use rosdep
to install all dependencies for your workspace?
The robot controller nodes aren't launching for you. I wonder if you're missing a package. If I recall correctly, the error messages that occur when the gazebo_ros2_control
plugin is not installed are not that informative, but cause /controller_manager
to fail to start, and then other controllers can't be spawned.
I didn't use rosdep to install any dependecies. I just setup a fresh bootable usb and installed ros2-humble, the Universal Robot Ros2 Driver, colcon, etc. I created a workspace with a src directory and cloned your repos in there, ran colcon build and tried to launch the gazebo sim with the launch file, but got the described issue.
Don't know why gazebo_ros2_control fails to install.
So here is what my console output is. This is only from a few seconds of running. It was stopped right after RViz opened. Gazebo already opened before that.
Note: 'Schreibtisch' is german for desktop but this shouldn't be an issue.
This is the relevant part of the error, though it's not informative about WHY the error happened.
ros2_control
Output``` [INFO] [1684423295.029702332] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' node to exist [spawner-3] [INFO] [1684423295.030303384] [spawner_joint_trajectory_controller]: Waiting for '/controller_manager' node to exist [spawn_entity.py-6] [INFO] [1684423296.526037373] [spawn_ur]: Calling service /spawn_entity [spawn_entity.py-6] [INFO] [1684423296.884246912] [spawn_ur]: Spawn status: SpawnEntity: Successfully spawned entity [ur] [spawner-2] [INFO] [1684423297.048555739] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' node to exist [spawner-3] [INFO] [1684423297.049675852] [spawner_joint_trajectory_controller]: Waiting for '/controller_manager' node to exist [INFO] [spawn_entity.py-6]: process has finished cleanly [pid 8436] [spawner-2] [INFO] [1684423299.081568071] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' node to exist [spawner-3] [INFO] [1684423299.081701567] [spawner_joint_trajectory_controller]: Waiting for '/controller_manager' node to exist [spawner-2] [INFO] [1684423301.116170954] [spawner_joint_state_broadcaster]: Waiting for '/controller_manager' node to exist [spawner-3] [INFO] [1684423301.118941935] [spawner_joint_trajectory_controller]: Waiting for '/controller_manager' node to exist [spawner-2] [ERROR] [1684423303.136676786] [spawner_joint_state_broadcaster]: Controller manager not available [spawner-3] [ERROR] [1684423303.139498580] [spawner_joint_trajectory_controller]: Controller manager not available [ERROR] [spawner-3]: process has died [pid 8430, exit code 1, cmd '/opt/ros/humble/lib/controller_manager/spawner joint_trajectory_controller -c /controller_manager --ros-args']. [ERROR] [spawner-2]: process has died [pid 8428, exit code 1, cmd '/opt/ros/humble/lib/controller_manager/spawner joint_state_broadcaster --controller-manager /controller_manager --ros-args'] ```
I didn't use rosdep to install any dependecies.
You should always install dependencies with rosdep
when you're building from source in a workspace.
I am pretty sure that you are missing the gazebo_ros2_control
plugin and so the version of /controller_manager
that interacts with the Gazebo simulation never starts. That level of detail is not obvious from the messages, I've just had this issue before.
Anyway, since /controller_manager
is not running, none of the controller spawners can load their controllers, and you end up missing all the nodes that allow you to control the robot and that get joint values from the physics simulation and broadcast them to ROS.
Thank you very much (!) for helping me to sort out this issue. Running the rosdep install --from-paths src --ignore-src -r -y
command fixed the problem for me and the package now is working as it should (except for the movit launch file stuff mentioned in https://github.com/danzimmerman/Universal_Robots_ROS2_Gazebo_Simulation/issues/1 of course).
Hi @danzimmerman,
i've tried to get this Repo to work with your version of the description repo. After launching Rviz i got some sort of error and a weird looking robot. Don't know if this might be a bug in this repo or an issue in my project setup.