ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The python tf API has transformPoint
, and transformPointCloud
. I'm not sure why they don't show up in the API docs, but here's how they work:
transformPoint(self, target_frame, ps) method of tf.listener.TransformListener instance
:param target_frame: the tf target frame, a string
:param ps: the geometry_msgs.msg.PointStamped message
:return: new geometry_msgs.msg.PointStamped message, in frame target_frame
:raises: any of the exceptions that :meth:`~tf.Transformer.lookupTransform` can raise
Transforms a geometry_msgs PointStamped message to frame target_frame, returns a new PointStamped message.
transformPointCloud(self, target_frame, point_cloud) method of tf.listener.TransformListener instance
:param target_frame: the tf target frame, a string
:param ps: the sensor_msgs.msg.PointCloud message
:return: new sensor_msgs.msg.PointCloud message, in frame target_frame
:raises: any of the exceptions that :meth:`~tf.Transformer.lookupTransform` can raise
Transforms a geometry_msgs PoseStamped message to frame target_frame, returns a new PoseStamped message.
You'll have to either loop over your vector and create PointStamped
objects, or pack all the points into a PointCloud
.