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

Visualizing 3D data from Laser Scanner

asked 2015-07-23 07:30:21 -0500

ajaymn gravatar image

Hello All, I am new to ROS and I have looked on this portal to check if I am repeating this question but I have not found any satisfactory answer so far. here is what my query is :

I have a LMS400 laser scanner interfaced to ROS using the driver that I pulled from TUM-ROS. I am able to interface to the laser scanner and I am able to publish data that I can see in RVIZ. I also assembled the scans and converted that to a point cloud and I am able to see the point cloud too. However the main issue that I am facing is that the laser scans or the point clouds both render the data on a 2d axes. As I move the scanner in the third axes I do not see the laser scan or the point cloud move in that axes in rviz. Currently I have a fixed frame lms400_tilt_laser that is entered by me as per that frame id in the driver code. I realize that I have to do a transform from this frame to "world" frame or something of this sort but it is still not very clear to me as I think I have not understood the concept of transforms very well. Moreover the standard tutorials refer to the turtle sim and have dependencies that I do not need and cannot remove easily either. Can someone throw light on what to do here and what direction to follow.

Here is a video of what I am able to get running so far. https://youtu.be/afzko7oi1Wc

Hoping to get some answers from experts here.

Thanks and regards ajaymn

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-07-24 19:16:30 -0500

In a simple case coordinate transforms are composed of relative positions and orientations. They describe how to get from one coordinate frame to another, i.e. how far to move along and rotate about certain axes to make your current coordinate frame to coincide with a target frame. Usually such transformations are described in a matrix form. By multiplying, e.g. a vector, by this matrix you are getting a new vector which points to the same point but with respect to a new origin, i.e. target coordinate frame. In ROS these operations are handled by tf package.

The scanner reports measured ranges with respect to a particular point (actually axes) on its body, that is the fixed frame you named lms400_tilt_laser. Obviously, no matter how the scanner is positioned in space it will always report measurements in its frame. That is not very interesting and you want to acquire data w.r.t. some global frame world, e.g. a room floor. Thus, you need to know position and orientation of the scanner w.r.t. world's origin. If pose of the scanner is changing you have to continuously track it in order to get a point cloud of environment.

So, guessing from the frame name, you are going to install scanner on a 1-D tilting unit. That means only one of its coordinates, e.g. pitch, will change over time. All you need to do is convert this pitch value to TF transform and broadcast it to other nodes in ROS (see Writing a tf broadcaster (C++) tutorial).

Once you have your broadcaster up and running you can choose the coordinated frame for point cloud visualization in RViz. Just set Fixed frame parameter to world and you will see moving laser scans.

edit flag offensive delete link more

Comments

Hello Boris, Thanks for the detail reply. I get the concept in theory(your explanation added some more insights). Implementation is a challenge for me right now. Will get there though. Thanks .. will keep you posted as to how I make progress.

ajaymn gravatar image ajaymn  ( 2015-07-26 22:30:49 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-07-23 07:30:21 -0500

Seen: 1,754 times

Last updated: Jul 24 '15