Simplest remap / transform function

Hello there,

I’m looking for a simple function to remap a pose from one reference frame to another. Ideally something in the form of:

poseB = tf.transformations.reorient(poseA, referencePoseA, referencePoseB)

I do NOT want to:

  • fire up an additional launch file
  • write a node to listen, broadcast or do any other voodoo.
  • define or alter a robot model or /tf graph
  • spend three days with tutorials for gazebo, moveit or learn quaternion math

I don’t care about the time difference between the poses, their headers, covariances etc. I only need this very simple function. Does this exist in Kinetic?

This sort of post is better suited for ROS Answers.

I assume you want to transform a pose expressed in a reference frame A to a reference frame B in Python. You can do that very simply with the Transformer class in TF, by using setTransform to define the reference poses, and then transformPose. If you need example code, please post this question on ROS answers.

If you want to do it outside of ROS with a ROS-like API, you can use this Python package*.

I might have misunderstood what you are trying to do. The word “remap” in ROS usually refers to remapping topics. “reorient” sounds like it would change the orientation of a pose. Please consider clarifying that if you take the question to ROS Answers.

spend three days with tutorials for gazebo, moveit or learn quaternion math

I understand your frustration about questions to simple answers being hard to find for open-source software. The best approach to solving this (besides documentation, which is always complicated) seems to be posting clear, searchable questions on Q&A sites like ROS Answers, where you should post this question now if you want to help people who have your problem. Did I mention that you should post this on ROS Answers? I’m looking forward to seeing your post over there.

* The original is here, but my PR for the ROS messages was not merged yet. My fork is ready to use, even if ugly.