Closed newcanopies closed 1 year ago
Can you try or #76? This error always comes, but it is not persistent. The rviz robot visualization causes it
TL;DR: Make sure the joint state broadcaster is loaded and running!
The error message is maybe not as clear as it could be, but its cause is relatively simple and straightforward. TF is being published by the robot state publisher - which takes in joint states, performs FK and publishes the kinematic chain in task space. Now, the reason the frame doesn't exist is because nobody publishes the joint states. In the context of ros2_control you have to make sure that the joint_state_broadcaster, formerly known as joint_state_controller is loaded and actively running. That broadcaster is responsible for publishing the joint states from your ros2_control'ed hardware so that the RSP can publish tf.
Can you try or #76?
Today, pulling 76 breaks the launch:
File "
Was there supposed to be another PR to try before letters or 76 ? I'm aware PR work is on-going, many thanks!
Dear @newcanopies #76 has been merged to master.
Therefore ros2_demo_control_robot
does not exist anymore.
You should use
ros2 launch ros2_control_demo_bringup rrbot_system_position_only.launch.py
instead.
I believe, as others, that this reorganization is more aligned with the usual organization in the ros community (thanks to @destogl and all the people working on this PR)
Dear @olivier-stasse
I pulled the merged Master branch, symlink rebuilt, sourced install, and ran the command w/ following error:
$ ros2 launch ros2_control_demo_bringup rrbot_system_position_only.launch.py
Rviz loads just a blank white window with logo
[robot_state_publisher-2] [INFO] [1623849443.972490800] [robot_state_publisher]: got segment world
[ros2_control_node-1] [INFO] [1623849443.976244800] [RRBotSystemPositionOnlyHardware]: Starting ...please wait...
[spawner.py-4] [INFO] [1623849444.141214700] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1623849444.142010300] [spawner_forward_position_controller]: Waiting for /controller_manager services
[rviz2-3] [INFO] [1623849444.238352000] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-3] [INFO] [1623849444.238554000] [rviz2]: OpenGl version: 3.1 (GLSL 1.4)
[rviz2-3] [INFO] [1623849444.260247000] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-3] Parsing robot urdf xml string.
[rviz2-3] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist
[rviz2-3] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp
[rviz2-3] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist
[rviz2-3] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp
My use case requires both Rviz and Gazebo, so I also tested:
$ ros2 launch ros2_control_demo_bringup rrbot_system_position_only_gazebo.launch.py
Note the memory leak warnings below:
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [gzserver-1]: process started with pid [1291]
[INFO] [gzclient -2]: process started with pid [1293]
[INFO] [ros2_control_node-3]: process started with pid [1296]
[INFO] [robot_state_publisher-4]: process started with pid [1299]
[INFO] [rviz2-5]: process started with pid [1301]
[INFO] [spawner.py-6]: process started with pid [1303]
[INFO] [spawner.py-7]: process started with pid [1305]
[INFO] [spawn_entity.py-8]: process started with pid [1307]
[robot_state_publisher-4] Parsing robot urdf xml string.
[robot_state_publisher-4] Link base_link had 1 children
[robot_state_publisher-4] Link link1 had 1 children
[robot_state_publisher-4] Link link2 had 3 children
[robot_state_publisher-4] Link camera_link had 1 children
[robot_state_publisher-4] Link camera_link_optical had 0 children
[robot_state_publisher-4] Link hokuyo_link had 0 children
[robot_state_publisher-4] Link tool_link had 0 children
[robot_state_publisher-4] [INFO] [1623849357.283296000] [robot_state_publisher]: got segment base_link
[robot_state_publisher-4] [INFO] [1623849357.283410900] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-4] [INFO] [1623849357.283430600] [robot_state_publisher]: got segment camera_link_optical
[robot_state_publisher-4] [INFO] [1623849357.283440400] [robot_state_publisher]: got segment hokuyo_link
[robot_state_publisher-4] [INFO] [1623849357.283448900] [robot_state_publisher]: got segment link1
[robot_state_publisher-4] [INFO] [1623849357.283457900] [robot_state_publisher]: got segment link2
[robot_state_publisher-4] [INFO] [1623849357.283467200] [robot_state_publisher]: got segment tool_link
[robot_state_publisher-4] [INFO] [1623849357.283475700] [robot_state_publisher]: got segment world
[ros2_control_node-3] [INFO] [1623849357.293212300] [controller_manager]: update rate is 2 Hz
[ros2_control_node-3] [INFO] [1623849357.508231400] [controller_manager]: Loading controller 'joint_state_broadcaster'
[rviz2-5] [INFO] [1623849357.624541800] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-5] [INFO] [1623849357.624805000] [rviz2]: OpenGl version: 3.1 (GLSL 1.4)
[rviz2-5] [INFO] [1623849357.650657300] [rviz2]: Stereo is NOT SUPPORTED
[spawner.py-6] [INFO] [1623849357.796982400] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[ros2_control_node-3] [INFO] [1623849357.799786100] [controller_manager]: Loading controller 'forward_position_controller'
[rviz2-5] Parsing robot urdf xml string.
[rviz2-5] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist
[rviz2-5] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp
[rviz2-5] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist
[rviz2-5] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp
[spawn_entity.py-8] [INFO] [1623849357.839777300] [spawn_entity]: Spawn Entity started
[spawn_entity.py-8] [INFO] [1623849357.840153200] [spawn_entity]: Loading entity published on topic robot_description
[spawn_entity.py-8] [INFO] [1623849357.843224000] [spawn_entity]: Waiting for entity xml on robot_description
[spawn_entity.py-8] [INFO] [1623849357.857309200] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-8] [INFO] [1623849357.857899300] [spawn_entity]: Waiting for service /spawn_entity
[rviz2-5] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist
[rviz2-5] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp
[rviz2-5] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist
[rviz2-5] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp
[rviz2-5] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist
[rviz2-5] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp
[rviz2-5] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist
[rviz2-5] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp
[ros2_control_node-3] [INFO] [1623849358.294194800] [controller_manager]: Configuring controller 'joint_state_broadcaster'
[spawner.py-7] [INFO] [1623849358.294831900] [spawner_forward_position_controller]: Loaded forward_position_controller
[rviz2-5] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist
[rviz2-5] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp
[ros2_control_node-3] [INFO] [1623849358.297761000] [controller_manager]: Configuring controller 'forward_position_controller'
[ros2_control_node-3] [INFO] [1623849358.299595200] [forward_position_controller]: configure successful
[rviz2-5] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist
[rviz2-5] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp
[rviz2-5] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist
[rviz2-5] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp
[spawner.py-6] [INFO] [1623849359.295421300] [spawner_joint_state_broadcaster]: Configured and started joint_state_broadcaster
[INFO] [spawner.py-6]: process has finished cleanly [pid 1303]
[spawn_entity.py-8] [INFO] [1623849359.358654300] [spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [rrbot_system_position]
[INFO] [spawn_entity.py-8]: process has finished cleanly [pid 1307]
[gzserver-1] [INFO] [1623849359.492016800] [gazebo_ros2_control]: Loading gazebo_ros2_control plugin
[gzserver-1] [INFO] [1623849359.499923500] [gazebo_ros2_control]: Starting gazebo_ros2_control plugin in namespace: /
[gzserver-1] [INFO] [1623849359.500347300] [gazebo_ros2_control]: Starting gazebo_ros2_control plugin in ros 2 node: gazebo_ros2_control
[gzserver-1] [INFO] [1623849359.500410500] [gazebo_ros2_control]: Loading parameter file /home/user/ws_control/install/ros2_control_demo_bringup/share/ros2_control_demo_bringup/config/rrbot_gazebo_forward_controller_position.yaml
[gzserver-1]
[gzserver-1] [INFO] [1623849359.506868100] [gazebo_ros2_control]: connected to service!! robot_state_publisher
[gzserver-1] [INFO] [1623849359.508145400] [gazebo_ros2_control]: Recieved urdf from param server, parsing...
[gzserver-1] [ERROR] [1623849359.525327400] [rclcpp]: Error in destruction of rcl service handle: the Node Handle was destructed too early. You will leak memory
[gzserver-1] [ERROR] [1623849359.525420300] [rclcpp]: Error in destruction of rcl service handle: the Node Handle was destructed too early. You will leak memory
[gzserver-1] [ERROR] [1623849359.525440300] [rclcpp]: Error in destruction of rcl service handle: the Node Handle was destructed too early. You will leak memory
[gzserver-1] [ERROR] [1623849359.525457100] [rclcpp]: Error in destruction of rcl service handle: the Node Handle was destructed too early. You will leak memory
[gzserver-1] [ERROR] [1623849359.525479700] [rclcpp]: Error in destruction of rcl service handle: the Node Handle was destructed too early. You will leak memory
[gzserver-1] [ERROR] [1623849359.525492800] [rclcpp]: Error in destruction of rcl client handle: the Node Handle was destructed too early. You will leak memory
[gzserver-1] [ERROR] [1623849359.525499900] [rclcpp]: Error in destruction of rcl client handle: the Node Handle was destructed too early. You will leak memory
[gzserver-1] [ERROR] [1623849359.525505300] [rclcpp]: Error in destruction of rcl client handle: the Node Handle was destructed too early. You will leak memory
[gzserver-1] [ERROR] [1623849359.525515800] [rclcpp]: Error in destruction of rcl client handle: the Node Handle was destructed too early. You will leak memory
[gzserver-1] [ERROR] [1623849359.525523200] [rclcpp]: Error in destruction of rcl client handle: the Node Handle was destructed too early. You will leak memory
[gzserver-1] [ERROR] [1623849359.525526800] [rclcpp]: Error in destruction of rcl client handle: the Node Handle was destructed too early. You will leak memory
[spawner.py-7] [INFO] [1623849360.296684600] [spawner_forward_position_controller]: Configured and started forward_position_controller
[INFO] [spawner.py-7]: process has finished cleanly [pid 1305]
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[rviz2-5] [INFO] [1623849383.261512700] [rclcpp]: signal_handler(signal_value=2)
[robot_state_publisher-4] [INFO] [1623849383.261501400] [rclcpp]: signal_handler(signal_value=2)
[ros2_control_node-3] [INFO] [1623849383.261562300] [rclcpp]: signal_handler(signal_value=2)
[INFO] [robot_state_publisher-4]: process has finished cleanly [pid 1299]
[INFO] [ros2_control_node-3]: process has finished cleanly [pid 1296]
[INFO] [rviz2-5]: process has finished cleanly [pid 1301]
am I missing a step? Thank you!
Dear @olivier-stasse
I pulled the merged Master branch, symlink rebuilt, sourced install, and ran the command w/ following error: $
ros2 launch ros2_control_demo_bringup rrbot_system_position_only.launch.py
Rviz loads just a blank white window with logo
[robot_state_publisher-2] [INFO] [1623849443.972490800] [robot_state_publisher]: got segment world [ros2_control_node-1] [INFO] [1623849443.976244800] [RRBotSystemPositionOnlyHardware]: Starting ...please wait... [spawner.py-4] [INFO] [1623849444.141214700] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services [spawner.py-5] [INFO] [1623849444.142010300] [spawner_forward_position_controller]: Waiting for /controller_manager services [rviz2-3] [INFO] [1623849444.238352000] [rviz2]: Stereo is NOT SUPPORTED [rviz2-3] [INFO] [1623849444.238554000] [rviz2]: OpenGl version: 3.1 (GLSL 1.4) [rviz2-3] [INFO] [1623849444.260247000] [rviz2]: Stereo is NOT SUPPORTED [rviz2-3] Parsing robot urdf xml string. [rviz2-3] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist [rviz2-3] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp [rviz2-3] Warning: Invalid frame ID "link1" passed to canTransform argument source_frame - frame does not exist [rviz2-3] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.10/src/buffer_core.cpp
Sorry maybe I missed it, but I do not see an error rather warnings. Could you highlight the error you are talking about ?
For the second part of your discussion, could you elaborate on which version gazebo_ros2_control and gazebo_ros_pkgs you are working ? I tested everything with commit 1b90ab1c4f2830 for gazebo_ros2_control and gazebo_ros_pkgs version 3.5.3 (commit 3f18465d3f) (edited) So to be precise I recompiled the two packages from sources.
Dear @newcanopies I forgot to mention but indeed they are some problems with gazebo right now on master. You could try to apply #109 .
Dear @newcanopies the new changes should have fixed your issue of having rviz being blank. This will not fix the warnings. The gazebo simulation have also been fixed.
Thank you kindly @olivier-stasse, the error seems to have changed:
76 has been merged to master.
Therefore
ros2_demo_control_robot
does not exist anymore.You should use
ros2 launch ros2_control_demo_bringup rrbot_system_position_only.launch.py
instead.
Above position_only
works after pulling today's Master sources for rps2_control, ros2_controllers and ros2_control_demos.
However, Gazebo launch fails with controller_manager:
ros2 launch ros2_control_demo_bringup rrbot_system_position_only_gazebo.launch.py
now the joint_state_broadcaster in controller_manager spawner.py-5
process dies with the following error seen at the very end:
control workspace is upto date with Master, rosdeps, rebuilt and sourced.
make sure that the joint_state_broadcaster, formerly known as joint_state_controller is loaded and actively running.
The demo rrbot joint_state_broadcaster is loaded here by the Gazebo launch file:
rrbot_system_position_only_gazebo.launch.py
https://github.com/ros-controls/ros2_control_demos/blob/bf32f38d4d3dca02bde7d46ac15af51fe4870c66/ros2_control_demo_bringup/launch/rrbot_system_position_only_gazebo.launch.py#L62-L67
ros2_control in Foxy had ABI breaking changes. We ran into the same problem the other day. In order to fix your problem you have essentially two options:
obosolete...
I use the "sudo apt intstall ros-foxy-control " and "sudo apt install ros-foxy-controllers" then remove the the build ,install files and rebuild the workspace. this issus is fixed.
$
ros2 launch ros2_control_demo_robot rrbot_system_position_only.launch.py
the error is persistent with any robot/package launching Rviz2 configs, including this demo.
tf2 is installed as debian $
ros2 pkg prefix tf2
/opt/ros/foxyThank you!