[ros-users] PropagationDistanceField usage?

Matthew Jacob Klingensmith matthewk1989 at aol.com
Mon Nov 22 04:28:25 UTC 2010

Hello ROS users list,

I am currently trying to develop an application using the
PropagationDistanceField class found in the distance_field package.
However, I am getting some unexpected results when I do simple tests with

Constructing the distance field with parameters:

x_size: 5.0 meters
y_size: 5.0 meters
z_size: 5.0 meters
origin_x : -2.5 meters
origin_y : -2.5 meters
origin_z : -2.5 meters
resolution: 0.05 meters
max_distance: 10 meters

And doing the following:

std::vector<btVector3> points;
for(double y = -2.5; y < 2.5; y+=0.05)



I should expect to get a distance field which has a line of zeroes along
the y axis, with increasing distances from there. However, the distance
field I actually get has a line of zeroes along a line roughly where y=0,
and both x and z are set to what should be y.

Here is a screenshot of the vizualization I get out of rviz when I try
adding in a line of points along the y axis (I added the colored markers
along the XY plane myself, the red markers come out of the vizualization


When I instead try to add a line along the x or z axes, I get an even
stranger result, where there is simply a point at the origin and nothing


Seeing these results, I am wondering if I am using the distance field
class properly. I was under the impression that "addPointsToField" was
supposed to take in a vector of points in world coordinates, and then
compute the distance transformation of the voxel field given those points.
Is this correct?

Thank you

Matthew Klingensmith
mklingen at andrew.cmu.edu

More information about the ros-users mailing list