Transform geometry_msgs/TransformedStamped() to sensor_msgs/PointCloud2 on rospy
Hi people,
I have a geometry_msgs/TransformedStamped() vector which I am trying to translate to sensor_msgs/PointCloud2. I have looked aroun in the rospy api docs but nothing clear comes out strking.
Question: Has anyone ever used rospy to do this sort of transformation in the past? Example codes/pointing to api references would be helpful.
Thanks!
What is it exactly that you are trying to do, and what is the end result you are after? A transform cannot be meaningfully 'translated' into a point cloud, afaict.
Data is from vicon_bridge package w/each marker packed into a geometry/TransformStamped() msg. I'm trying to stream the markers' world position to move-it as a sensor_msgs/PointCloud2 msg. I wrote a basic rospy code that picks the vector3() translation information but the pcl doens't show directions
Wondering if I should somehow include the rotation information in the pcl code so i can see the rotation of the clouds when an object moves. Code is here: https://github.com/SeRViCE-Lab/superc...
So you're creating point clouds from scratch, based on TF data coming from the vicon system?
Yes. I have the code here: https://github.com/SeRViCE-Lab/superc... . For some reason, my clouds are static and never move even when my object changes position.
Are you setting the cloud's
frame_id
to the correct values? Without those, they will never be transformed.The
frame_id
of the child cloud doesn't matter AFAIK. What matters is that the fixed frame we are transforming into must match that of the markers from vicon. What I eventually did was to use the twist I computed from the four markers in vicon to generate a TransformedStamped msg. This was cont'dThis was then used in computing the new cloud's tranform with the
do_transform_cloud
object. The code is here if you are interested. It is working!