ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to convert a Pose to PyKDL Frame in python (and vice versa)

asked 2022-01-07 14:18:02 -0500

anton.deguet gravatar image

In ROS1 I used tf_conversions.posemath, toMsg and fromMsg. I'm porting my code to ROS2 and I can't seem to find the Python3 module tf_conversions. If the module existing, what is the debian package to install (Ubuntu 20.04/Galactic)? If not, is there a different module/API available?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-01-07 16:36:57 -0500

osilva gravatar image

toMsg and fromMsg were not ported to ROS 2. Refer to this discussion:

https://github.com/ros-visualization/...

You can use:

void tf2::convert(const A & a, B & b)

https://docs.ros.org/en/melodic/api/t...

convert() function converts any type to any type (messages or not). Matching toMsg and from Msg conversion functions need to exist. If they don't exist or do not apply (for example, if your two classes are ROS messages), just write a specialization of the function.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-01-07 14:18:02 -0500

Seen: 117 times

Last updated: Jan 07 '22