tf2_ros.Buffer.transform error in ROS2 python

asked 2021-03-12 09:39:51 -0500

gd gravatar image

updated 2021-03-12 09:46:57 -0500

Hi !

I would like to transform a pose from one frame to another: I did:

self.tfBuffer = tf2_ros.Buffer()
self.tflistener = tf2_ros.TransformListener(self.tfBuffer, self)
self.tfcam2base_link = TransformStamped()
self.tf_timeout  = Duration(seconds = 0, nanoseconds = 100000000)

self.tf_odom2base_link = self.tfBuffer.lookup_transform("base_link", "odom", t, self.tf_timeout)

target_pose_s = self.tfBuffer.transform(pose_msg, "odom")

everything works, except the last line where I get;

File "/home/rover/ros2_foxy/install/lib/python3.6/site-packages/tf2_ros/", line 203, in get raise TypeException('Type %s if not loaded or supported'% str(key)) tf2_ros.buffer_interface.TypeException: Type <class 'geometry_msgs.msg._pose_stamped.posestamped'=""> if not loaded or supported

I'm running ROS2 Foxy on Ubuntu 18.04 .

Thanks for any help, g

edit retag flag offensive close merge delete



I have exactly the same error with ros foxy. I tried to transform a Vector3Stamped message to another frame. I'll keep you informed if I manage to find the problem

Alia gravatar image Alia  ( 2021-03-23 11:52:20 -0500 )edit

I think this is a duplicate of

The root cause seems to be this issue:

clyde gravatar image clyde  ( 2021-03-24 12:57:42 -0500 )edit