tf odometry and laserscan. Plus Rviz visualisation

asked 2017-11-06 04:11:20 -0500

bonchai gravatar image


I am trying to use rviz to visualise the creation of a 2d map using laserscan and odometry messages.

I have successfully created, published and visualised the odometry message in isolation and laserscan in isolation using rviz. i.e i can see my robot moving along a set path with odometry and i can see my environment (walls etc.) through laserscan message.

What I want to do is link the two together. So that the laserscan message is 'location aware' so instead of just seeing a laserscan at that moment in time, i want rviz to be able to hold the laserscan data points as the robot is travelling in the environment and therefore over time it will build up a 2d map of the whole environment.

I think the way to achieve this is to use the tf message. I have read the tf tutorials but I struggle to fully understand what it is i need to do with the tf message. - What am i transforming? Is it odometry message against laserscan, so tf message frame id = odom and child frame id = laser? -What about the data? Is it purely the odometry message data i already have or do i need to do a calculation? - Do i need to publish all three messages?

Thank you in advance!

edit retag flag offensive close merge delete


You better look up gmapping

Humpelstilzchen gravatar image Humpelstilzchen  ( 2017-11-07 12:37:39 -0500 )edit