Ask Your Question
2

Aggregating Point Clouds in Fixed Frame

asked Feb 21

jeffdelmerico gravatar image jeffdelmerico
21 3

updated Feb 22

I'm working on a project where I'd like to aggregate/concatenate several filtered point clouds produced by a Kinect into a single point cloud in the fixed (/map) frame. This is not for mapping purposes, so I don't want to explicitly match scans; I would just like to combine several views of the same thing into one point cloud. I am, however, doing mapping simultaneously with a 2D laser scanner in order to correct the odometry.

The basic approach I'm taking is to take the kinect point cloud, transform it from the /openni_depth_frame to the /map frame, process it, and then add it to an aggregate point cloud that is then published to the /map frame. It seems like this would produce a point cloud that is fixed with respect to the map and aligned with the rest of the laser and kinect data. However, this produces a point cloud that is fixed, but not aligned (it's floating above the plane of the map and rotated). On the other hand, if I publish the aggregate cloud to /openni_depth_frame, it is then properly aligned, but moves relative to the map. I suspect that the alignment problem has something to do with the difference in axis alignment conventions between tf and image frames, but I thought I was taking care of that by using the depth frame.

Supposing that you're dealing with odometry independently, what would be the right way to project a bunch of point clouds to the fixed frame and concatenate them? I'd be happy to provide some code if it's unclear what I'm trying to do, but this portion is kinda buried inside a bigger project, and I'd have to take some time to work up a toy example.

Thanks for your thoughts.

-Jeff

delete close flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
4

answered Feb 21

Ivan Dryanovski gravatar image Ivan Dryanovski
2221 15 27 50
http://robotics.ccny.cuny...

Your approach is correct, but it sounds like you might be using the wrong moving frame, ie /openni_depth_frame instead of /openni_depth_optical_frame.

The best practice is to look up the tf between the fixed frame (/map) and the cloud.header.frame_id of the cloud message you receive. This way, you don't need to hard-code the moving frame id.

link delete flag offensive edit

Comments

Thanks Ivan. That turned out to not be the main issue, but I will adopt these best practices in the future. I must have missed the bit in the tf documentation that transforms are always frame_id to child_frame_id for transformations in either direction, so I was transforming the wrong way. Thanks!

jeffdelmerico (Feb 22)edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Follow

subscribe to rss feed

Stats

Asked: Feb 21

Seen: 88 times

Last updated: Feb 22