Re: [osg-users] Beginners pain...

2006-11-16 Thread Anders Backman

And you do of course know about the following tools:

http://playerstage.sourceforge.net/index.php?src=gazebo
http://www.pyrorobotics.org/?page=The_20Pyrobot_20Simulator

They are Robot simulation environments, I think most of them use ODE.

I know there are a few more, but I couldnt recall the names of them right now...

/Anders

On 11/16/06, antoine.rennuit <[EMAIL PROTECTED]> wrote:






Hi Harald (and others),

I am very much involved in physics engines for games and virtual reality,
and as far as I know all physics engines come with optimized collision
detection (optimization is a key feature because it is really greedy). I
don't know exactely what you mean by "simulation" but if it is dynamical
simulation you should have a look at http://www.ode.org/ which is the best
free dynamical simulator I know - though it is far behind its commercial
counterparts. It includes proper collision detection and polyarticulated
rigid bodies dynamics.

Another point: in most well written applications, physics (for the
simulation of your robot) and rendering are isolated layers. Different
functions, different packages... That makes sense and is worth keeping for
general understanding of the architecture.

Antoine.



> Hi Marco,
>
> On 11/16/06, Marco Jez wrote:
> > There is a good article on GameDev.net that explains how to do collision
> > detection between ellipsoids and polygons. I've used it to implement
> > viewer-world collision detection and it works fine:
> >
> >
http://www.gamedev.net/reference/articles/article1026.asp
> >
> > The ray-polygon intersection test performed by osgUtil::IntersectVisitor
is
> > not enough for this kind of collision detection (unless you can model
the
> > collider as a point rather than as an ellipsoid).
>
> Heh heh, neat little trick with transforming a sphere to ellipsoid.
> All we need now is an EllipsoidIntersector ;-)
>
> > When the project I'm working on is finished I'll be able to release my
CD
> > code as open source.
>
> Oooh what a tease. I very much look forward to that day.
>
> Any chance of it being a Christmas present?
>
> Or fat free alternative to an Easter egg ;-)
>
> Good luck with the project,
> Robert.
> ___
> osg-users mailing list
> osg-users@openscenegraph.net
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/


 Accédez au courrier électronique de La Poste
sur www.laposte.net ou sur 3615 LAPOSTENET (0,34€ TTC /mn)
1 Giga de stockage gratuit – Antispam et antivirus intégrés
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/





--



Anders Backman   Email:[EMAIL PROTECTED]
HPC2N/VRlab  Phone:+46 (0)90-786 9936
Umea university  Cellular: +46 (0)70-392 64 67
S-901 87 UMEA SWEDEN Fax:  +46 90-786 6126
  http://www.cs.umu.se/~andersb
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Beginners pain...

2006-11-16 Thread antoine.rennuit


Hi Harald (and others),

I am very much involved in physics engines for games and virtual reality, and 
as far as I know all physics engines come with optimized collision detection 
(optimization is a key feature because it is really greedy). I don't know 
exactely what you mean by "simulation" but if it is dynamical simulation you 
should have a look at http://www.ode.org/ which is the best free dynamical 
simulator I know - though it is far behind its commercial counterparts. It 
includes proper collision detection and polyarticulated rigid bodies dynamics.

Another point: in most well written applications, physics (for the simulation 
of your robot) and rendering are isolated layers. Different functions, 
different packages... That makes sense and is worth keeping for general 
understanding of the architecture.

Antoine.


> Hi Marco,
>
> On 11/16/06, Marco Jez wrote:
> > There is a good article on GameDev.net that explains how to do collision
> > detection between ellipsoids and polygons. I've used it to implement
> > viewer-world collision detection and it works fine:
> >
> > http://www.gamedev.net/reference/articles/article1026.asp
> >
> > The ray-polygon intersection test performed by osgUtil::IntersectVisitor is
> > not enough for this kind of collision detection (unless you can model the
> > collider as a point rather than as an ellipsoid).
>
> Heh heh, neat little trick with transforming a sphere to ellipsoid.
> All we need now is an EllipsoidIntersector ;-)
>
> > When the project I'm working on is finished I'll be able to release my CD
> > code as open source.
>
> Oooh what a tease. I very much look forward to that day.
>
> Any chance of it being a Christmas present?
>
> Or fat free alternative to an Easter egg ;-)
>
> Good luck with the project,
> Robert.
> ___
> osg-users mailing list
> osg-users@openscenegraph.net
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/

Accédez au courrier électronique de La Poste
sur www.laposte.net ou sur 3615 LAPOSTENET (0,34€ TTC /mn)
1 Giga de stockage gratuit – Antispam et antivirus intégrés


___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Re: [osg-users] Beginners pain...

2006-11-16 Thread Marco Jez

Hi Robert,


Oooh what a tease.  I very much look forward to that day.

Any chance of it being a Christmas present?


Actually, yes. The project, although expected to end this month, won't 
probably be completed before Jan 2007, but the collision detection code is 
just a single file and it shouldn't require heavy refactoring in order to be 
detached from the project's source tree.



Good luck with the project,


Thank you,
Marco

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Beginners pain...

2006-11-16 Thread Robert Osfield

Hi Marco,

On 11/16/06, Marco Jez <[EMAIL PROTECTED]> wrote:

There is a good article on GameDev.net that explains how to do collision
detection between ellipsoids and polygons. I've used it to implement
viewer-world collision detection and it works fine:

http://www.gamedev.net/reference/articles/article1026.asp

The ray-polygon intersection test performed by osgUtil::IntersectVisitor is
not enough for this kind of collision detection (unless you can model the
collider as a point rather than as an ellipsoid).


Heh heh, neat little trick with transforming a sphere to ellipsoid.
All we need now is an EllipsoidIntersector ;-)


When the project I'm working on is finished I'll be able to release my CD
code as open source.


Oooh what a tease.  I very much look forward to that day.

Any chance of it being a Christmas present?

Or fat free alternative to an Easter egg ;-)

Good luck with the project,
Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Beginners pain...

2006-11-16 Thread Marco Jez

Hi Harald and Andreas,

Simple collision detection is easy: You can do that with an 
intersect-visitor and test if a given beam intersects something. This way 
you could simulate a sensor that looks at exactly one direction.
There are more sophisticated methods, but others will have to comment on 
that.


There is a good article on GameDev.net that explains how to do collision 
detection between ellipsoids and polygons. I've used it to implement 
viewer-world collision detection and it works fine:


http://www.gamedev.net/reference/articles/article1026.asp

The ray-polygon intersection test performed by osgUtil::IntersectVisitor is 
not enough for this kind of collision detection (unless you can model the 
collider as a point rather than as an ellipsoid).


When the project I'm working on is finished I'll be able to release my CD 
code as open source.


Cheers,
Marco

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Beginners pain...

2006-11-16 Thread Robert Osfield

Hi Harald,

I'll add a little, but since Andreas hasalready answer most of your
questions better than I could I just add a few extras.

On 11/16/06, harald graef <[EMAIL PROTECTED]> wrote:

- how can I do collision detection?


You have a variety of options, in OSG-1.2 you'll find the
osgUtil::IntersectVisitor & PickVisitor that both support line segment
intersections with the scene.


In the CVS version of the OSG I have began working on a more general
purpose class for doing intersection testing, which you'll find in
osgUtil/IntersectionVisitor.  This visitor allows you to attach
generic Intersector objects, and these may take the form of
LineSegmentIntersector, PolytopeIntersector or IntersectorGroup.  By
the end of the both their will be a PlaneIntersector too.   The
PolytopeIntersector doesn't yet support fine grained intersections
with triangles and lines yet but this will come in time for OSG-1.3.

There are also 3rd party specialist collision detection libraries that
you could search for and integrate with the OSG.  Depending on your
needs this might be the route you'd want to go done.  Have a search
through the mailing list archives to see some options.



  This is a crucial point. Putting some sensors to the virtual robot and gainig
- are there invisible objects?
  A sensor detection-field can simply be modeled as mesh, which is invisible.
  Actions are only taken, when the detection-field-mesh collides with something.


The way to do this is to create a polygon mesh (in the form of an
osg::Geometry) and make its parents NodeMask with a mask that the cull
traversal doesn't pass so its not seen.  But have the intesection
traversal accept this mask.  This way you get the intersections but
don't see the object.

Robert.
___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


Re: [osg-users] Beginners pain...

2006-11-15 Thread Andreas Goebel

Hi,

I can only answer parts of your questions and hope others will chime in.

harald graef schrieb:

Hi osg-users,

I intend to write a simulator for my robot projects (http://home.arcor.de/harald.graef). 

Fumbling around with the code since some time it was not possible to solve the "virtual world problem". 
Since now I used th Crystal Space Engine, but it is more intended as a gaming engine - very powerfull, but very complicated.

Even when you are not new to software development.

To come to the question: OSG looks a lot more compatible to my understanding of 
programming, but
- how can I do collision detection?
  This is a crucial point. Putting some sensors to the virtual robot and gainig 
information about
  the things in front of it is one of the core questions.
  I didn't find any example for CD.

  
Simple collision detection is easy: You can do that with an 
intersect-visitor and test if a given beam intersects something. This 
way you could simulate a sensor that looks at exactly one direction.
There are more sophisticated methods, but others will have to comment on 
that. Maybe (if your sensors work exactly in one direction) what I said 
is already enough for you.

- are there invisible objects?
  A sensor detection-field can simply be modeled as mesh, which is invisible.
  Actions are only taken, when the detection-field-mesh collides with something.

  
You can set alpha to zero to make things invisible or set the node-mask 
to zero. If you set alpha to zero, things are still pickable, if you set 
the node-mask to zero an intersect-visitor will not find it. I don´t 
understand your detection-field mesh well enough to tell you which to use.

- Does OSG run on weak hardware?
  If ever, I finish this simulator, I want to give it to the robo-builder 
community.
  I'm afraid, that many of this people do work with older computers. I'm not 
very familiar with
  Open GL - is hardware acceleration a really need (sorry for that question)?

  
As my customers are schools I can tell you the following: OSG runs quite 
well on weak hardware as long as there is an hardware-accelerated 
graphics-card. My application even runs on a pentium mmx 233 MHz with a 
frame-rate of about 10 Hz.
If you don´t have hardware-acceleration you can still use it (not well, 
of course) if you have a fast processor: I develop the linux-port of my 
application in vmware which has no hardware-accelleration. This runs 
about 10 Hz or so, too.
If you keep your app simple you will get the needed 60 Hz easily with a 
500 MHz processor and a 32 mb graphics-adapter.
But be aware of the fact that _all_ openGL applications will crash badly 
if the openGL driver is crappy. I had to change some GraphicsAdapters 
(buy new ones for about 15 Euro) at my school and advise other customers 
to do so, too.


I researched about a year ago which library to use for my project and 
never ever regretted to have chosen OpenSceneGraph. It is extremly well 
designed. At first I was a bit sceptical because of the lack of 
documentation, but I found that the design is so well that most of the 
time you don´t need any documentation. The examples and the source and 
the help on this list are usually better that most documentation for 
other projects.


You will certainly be able to do the collision detection you need, 
though maybe not "out of the box".



Regards,

Andreas
Thanks a lot. 

Suggestions about robot-simulation, or the difference between 
a solder iron and a computer keyboard are very welcome.


Harald
__
"Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de
Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht!

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/



  



___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


[osg-users] Beginners pain...

2006-11-15 Thread harald graef
Hi osg-users,

I intend to write a simulator for my robot projects 
(http://home.arcor.de/harald.graef). 

Fumbling around with the code since some time it was not possible to solve the 
"virtual world problem". 
Since now I used th Crystal Space Engine, but it is more intended as a gaming 
engine - very powerfull, but very complicated.
Even when you are not new to software development.

To come to the question: OSG looks a lot more compatible to my understanding of 
programming, but
- how can I do collision detection?
  This is a crucial point. Putting some sensors to the virtual robot and gainig 
information about
  the things in front of it is one of the core questions.
  I didn't find any example for CD.

- are there invisible objects?
  A sensor detection-field can simply be modeled as mesh, which is invisible.
  Actions are only taken, when the detection-field-mesh collides with something.

- Does OSG run on weak hardware?
  If ever, I finish this simulator, I want to give it to the robo-builder 
community.
  I'm afraid, that many of this people do work with older computers. I'm not 
very familiar with
  Open GL - is hardware acceleration a really need (sorry for that question)?

Thanks a lot. 

Suggestions about robot-simulation, or the difference between 
a solder iron and a computer keyboard are very welcome.

Harald
__
"Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de
Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht!

___
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/