[ODE] Inconsistent depth return for dGeomRay

Shamyl Zakariya zakariya at earthlink.net
Tue Jan 13 18:39:57 MST 2004


Thanks! It worked -- I just wish the documentation had been clear that 
a ray intersects once for each intersection along its length. I had 
read that only one contact is generated, and as such I had sort of 
assumed that meant the closest only. In retrospect, the actual behavior 
makes a lot of sense. Sadly, I had traced the (multiple) return values 
and just interpreted them as noise not realizing I was getting more 
than one per step :/

Anyway, it works great now!

Shamyl Zakariya
   "this is, after all, one of those movies where people spend a great
   deal of time looking at things and pointing."
	From a review of _Fantastic Voyage_

On Jan 13, 2004, at 9:37 AM, Adam D. Moss wrote:

> Shamyl Zakariya wrote:
>> I've been trying to implement a kind of range finder class using 
>> dGeomRay -- as part of a feedback system for my robotics simulations.
>> I'm having trouble with the depth returned by dCollide, however -- 
>> it's inconsistent, or rather, it seems to sometimes skip geoms in my 
>> simulation completely; other times it sees the same geom just fine. 
>> It's repeatable, but doesn't follow any pattern I can detect.
>
> ODE's Ray geoms will (should) cause a collision callback for
> each (implemented) geom they probably-touch -- not exclusively the
> first/nearest.  These callbacks will occur in fairly arbitrary order,
> so it's up to the app to track which one is the nearest to the
> ray's origin for processing after collision is completed, if that data
> is important.  (This could be done elegantly by storing a 'nearest
> ray collision found so far' struct as userdata on the ray geom.)
>
> Regards,
> --Adam
> -- 
> Adam D. Moss   . ,,^^   adam at gimp.org   http://www.foxbox.org/   co:3
> "At this point the rocket becomes engorged with astronauts."
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>



More information about the ODE mailing list