multiple pointcloud2 to one single laserscan

asked 2016-10-05 04:02:13 -0500

herimakil gravatar image

Hello there,

I have a robot using 2 3D cámeras (both different) Astra Pro and Pico_flexx, both them get a different pointcloud output but both are pointcloud2, one of those cámeras is watching forward and the other one backwards.

I am trying to get odometry and navigation with those cámeras both since one wouldn't be enough, and for that i was already using laser_scan_matcher, in the documentation says it can use pointcloud2 as an input.

AMCL accepts only laserscan for navigation since it was developed for 2d navigation.

So, what i tried first was pointcloud_to_laserscan with one camera which i found insufficient for the purpose (that's why 2 cameras).

I need to "merge" those 2 pointclouds into one but what i found at the forums tells that both pointclouds need to have the same number of points (to concat...)

Any idea what to use to either use both clouds for laser_scan_matcher, or to achive 2 pointclouds into 1 laserscan?

thank you

edit retag flag offensive close merge delete

Comments

1

transform both pointclouds to laserscan1 and laserscan2, in a script, subscribe to both laserscans and make another one which is -PI to PI, fill the angle with both laserscans data and infinity for blind zone angle.

zhibo gravatar image zhibo  ( 2016-10-05 08:19:51 -0500 )edit

could this help with the merging of the laserscans? https://github.com/iralabdisco/ira_la...

herimakil gravatar image herimakil  ( 2016-10-06 09:39:59 -0500 )edit
1

Yes, this is a very nice one, the inputs are laserscan msg descrived in the launch file, so you have to convert point_cloud to laser scan first, and i think you can adjust the relative angle by dynamic config, you should be able to output one single laserscan topic

zhibo gravatar image zhibo  ( 2016-10-06 11:24:52 -0500 )edit

Okay, i tried it and i can't make it work, not to mention that it does a lot of transformations between laser to pointcloud to move it to a frame destination.

From what i've seen here tutorial it transforms

herimakil gravatar image herimakil  ( 2016-10-14 03:34:37 -0500 )edit

the lasers to pointclouds to use x y z pose to move it to the frame destination since the laser has only x y. In my case i don't need Z because i already transform the lasers from pointclouds and they will all be in the same plane (even if they came from different Z positions).

herimakil gravatar image herimakil  ( 2016-10-14 03:38:19 -0500 )edit