Ask Your Question
0

Transform geometry_msgs/TransformedStamped() to sensor_msgs/PointCloud2 on rospy

asked 2016-10-04 20:54:17 -0500

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!

edit retag flag offensive close merge delete

Comments

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.

gvdhoorn gravatar imagegvdhoorn ( 2016-10-05 00:42:59 -0500 )edit

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

lakehanne gravatar imagelakehanne ( 2016-10-05 12:08:53 -0500 )edit

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...

lakehanne gravatar imagelakehanne ( 2016-10-05 12:10:16 -0500 )edit

So you're creating point clouds from scratch, based on TF data coming from the vicon system?

gvdhoorn gravatar imagegvdhoorn ( 2016-10-05 13:56:51 -0500 )edit

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.

lakehanne gravatar imagelakehanne ( 2016-10-05 15:28:46 -0500 )edit

Are you setting the cloud's frame_id to the correct values? Without those, they will never be transformed.

gvdhoorn gravatar imagegvdhoorn ( 2016-10-06 02:09:31 -0500 )edit

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'd

lakehanne gravatar imagelakehanne ( 2016-10-06 11:16:30 -0500 )edit

This 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!

lakehanne gravatar imagelakehanne ( 2016-10-06 11:17:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-10-06 11:19:26 -0500

This has been fixed. In the end, what I did was to use the twist I computed from the four markers in vicon to generate a TransformedStamped msg. This was then used in computing the new cloud's tranform with the do_transform_cloud object. The code is here if you are interested.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-10-04 20:54:17 -0500

Seen: 355 times

Last updated: Oct 06 '16