ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

transformation the laser scan data with robot pose !!!!

asked 2018-02-19 11:34:43 -0500

fereydoon gravatar image

hello guys, I want to simulate the bag data that I got from ROS in MATLAB. I separated the pose and range data from the bag file. and I wrote a script to plot the laser data and build a map (I assumed that my poses are correct). when I run my code, It works well, till the robot turns!. at that point, the scan data turns in the opposite direction! till the robot gets straight again. and again when the robot turns again I experience the same problem till the robot gets straight. I don't know whats wrong!!...the transformation I used works well except when the robot turn!!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-20 05:48:59 -0500

Sounds like you did some mix-up when computing rotation (hard to say exactly how without seeing code). Also sounds like this could fixed easily (and hackily ;) ) be fixed by multiplying the angle with -1 before you forward it to your transform computation. I'd certainly recommend to try and understand where the flipped rotation comes from in your code, though.

edit flag offensive delete link more


I figured my problem is related to synchronization and I match the wrong pose to the scan data. after some research I found that I should use the \tf data but I dont know how to use them. do you have any idea how to get the robot pose at the time of sensor reading?

fereydoon gravatar image fereydoon  ( 2018-02-20 09:13:56 -0500 )edit

The tf tutorials ( ) should be helpful. You basically do a query to tf using sensor_data.header.stamp as the timestamp.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2018-02-20 18:00:03 -0500 )edit

Stefan Kohlbrecher
thank you for replying to me I will test this and comment back later.

fereydoon gravatar image fereydoon  ( 2018-02-21 01:15:09 -0500 )edit

Hi. Have you solved this problem? I am also troubled with it. Do you have idea about how to get the robot pose at the time of sensor reading ?

xikui1231 gravatar image xikui1231  ( 2018-05-28 04:28:45 -0500 )edit

Question Tools



Asked: 2018-02-19 11:34:43 -0500

Seen: 679 times

Last updated: Feb 20 '18