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

Revision history [back]

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.