[ros-users] PropagationDistanceField usage?

Matt Klingensmith matthewk1989 at aol.com
Mon Nov 22 19:28:39 UTC 2010


Miral,

It appears that the distance_field package included in the debian cturtle install for ubuntu  has an outdated version of distance_field.h,
as my visualization method doesn't include the btTransform argument. I will be deleting my cturtle installation and downloading
from the SVN instead to see if that will work.

Matt Klingensmith

 

 


 

 

-----Original Message-----
From: Mrinal Kalakrishnan <mail at mrinal.net>
To: User discussions <ros-users at code.ros.org>
Sent: Mon, Nov 22, 2010 12:50 am
Subject: Re: [ros-users] PropagationDistanceField usage?


Hi Matthew,



On Sun, Nov 21, 2010 at 8:28 PM, Matthew Jacob Klingensmith

<matthewk1989 at aol.com> wrote:

> 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.



I'm not sure how you're calling the visualization function. I just

wrote a test similar to what you described and it seems to work

correctly. The visualize function publishes markers for points that

are in between a min and max distance field value. The way I would use

it is to set the min and max close to each other, so that you see an

iso-surface of points that are a certain distance away.



I'm including a test that you can try by putting it into

test/test_distance_field.cpp (or use within your program). It

publishes an animation of iso-surfaces of increasing distances from

the y axis. I tested this on all three axes and got the intended

results. Let me know if you have further troubles.



Hope this helps,

Mrinal



TEST(TestPropDistanceField, VisualizeAxes)

{

  PropagationDistanceField df(5.0,5.0,5.0,0.05,-2.5,-2.5,-2.5,10.0);

  df.reset();



  ros::Duration(2.0).sleep(); // hack: wait for rviz to subscribe



  std::vector<btVector3> points;

  for (double y=-2.5; y<2.5; y+=0.05)

  {

    points.push_back(btVector3(0.0,y,0.0));

  }



  df.addPointsToField(points);



  btTransform cur = btTransform::getIdentity();

  for (double d=0.00; d<2.5; d+=0.05)

  {

    df.visualize(d, d+0.04, "/BASE", cur, ros::Time::now());

    ros::Duration(0.1).sleep();

  }

}

_______________________________________________

ros-users mailing list

ros-users at code.ros.org

https://code.ros.org/mailman/listinfo/ros-users


 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101122/d3d950a1/attachment-0003.html>


More information about the ros-users mailing list