0
$\begingroup$

I'm currently working on a robot using ROS 2. When I launch my robot in the Gazebo environment, it works fine, but when I try to visualize it in RViz, I get the following error:

error: '[rviz2-4] Error:   TF_NAN_INPUT: Ignoring transform for child_frame_id "wheel_BL_link" from authority "Authority undetectable" because of a nan value in the transform (nan nan nan) (nan nan nan nan)
[rviz2-4]          at line 237 in ./src/buffer_core.cpp
[rviz2-4] Error:   TF_DENORMALIZED_QUATERNION: Ignoring transform for child_frame_id "wheel_BL_link" from authority "Authority undetectable" because of an invalid quaternion in the transform (nan nan nan nan)
[rviz2-4]          at line 256 in ./src/buffer_core.cpp

Also, this robot uses a customized controller for locomotion, which after other Notes like rf2o_laser_odometry_node-18, and cartographer.

Any insights on how to resolve this?

$\endgroup$

2 Answers 2

0
$\begingroup$

Start introspecting your TF tree, and see where the invalid transform is coming from

ros2 run tf2_tools view_frames

ros2 run tf2_ros tf2_echo wheel_BL_link [target_frame]

for more information see https://docs.ros.org/en/rolling/Tutorials/Intermediate/Tf2/Introduction-To-Tf2.html

$\endgroup$
3
  • $\begingroup$ Thanks. Let me try this. $\endgroup$ Commented Feb 26 at 21:14
  • $\begingroup$ I still receive the same error after launching " ros2 run tf2_ros tf2_echo wheel_BL_link [target_frame]". $\endgroup$ Commented Feb 27 at 7:56
  • $\begingroup$ sure, but you have to analyze which transform is wrong and who is publishing it $\endgroup$ Commented Feb 27 at 8:14
0
$\begingroup$

I was able to debug the error by adding the position state interface to my <state_interface name="velocity"/> and <state_interface name="position"/> in the GazeboSystem. I also added a position to my controller manager.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.