logo logo
Home arrow Forums...
Monday, 05 January 2009
 
 
English English  Español Español  
Upcoming Events
10.Jun. 2009

IWANN 2009
Salamanca, Spain
11.Jun. 2009

Toward a Science of Consciousness
Hong Kong, China
15.Jun. 2009

International Workshop on Machine Consciousness
Hong Kong, China
15.Jun. 2009

The 8th IEEE International Conference on Cognitive Informatics
Hong Kong, China
22.Jun. 2009

IWINAC 2009
Santiago de Compostela, Spain
Tag Cloud
Architectures Associations Books Conferences Conscious Consciousness Developer Documentación Documentation Español Howto Machine Machine Consciousness Machines Neuroscience Publications Research Researchers Reviews Robotics Robots Spanish Studio VPL
Spotlight
Conscious-Robots.com Forum  


avionf18
User

Expert Boarder
Posts: 24
graphgraph
Karma: 3  
Creación de laberinto - 2008/03/12 12:39 Quiero crear un laberinto, el unico metodo que se el AddBox(Vector);,me sale una pared. Mi pregunta si ¿existe algún metodo para crear esquinas?. O creo la esquinas con 2 AddBox(Vector);.



UN SALUDO
  The administrator has disabled public write access. Please, register to participate in the forum.
Raúl
Moderator

Moderator
Posts: 444
graph
Karma: 6  
Re:Creación de laberinto - 2008/03/12 22:09 Hola,

Puedes echar un vistazo al código del servicio Maze Simulator para ver como crea las paredes a partir de un bmp. El método que añade los muros es este:

Code:

         // Adds a simple cube at a specified location in the maze grid         void AddWall(int rowint colfloat heightBasicColor color)         {             // TT Oct-2006 - Add an option to use a sphere instead of a cube             if (_UseSphere[(byte)color])             {                 SphereShapeProperties cSphereShape null;                 SingleShapeEntity sphere null;                 float radius;                 radius _state.SphereScale *  height 2.0f;                 // create simple entity, with a single shape                 cSphereShape = new SphereShapeProperties(                     // TT -- Change to infinite mass so that the walls                     // do not "blow apart" if you bump them!                     // TT Oct 2006 -- Allow user to specify this                         _WallMasses[(byte)color], // mass in kilograms.                         new Pose(),     // relative pose                         radius);    // radius                 cSphereShape.Material = new MaterialProperties("gsphere"1.0f0.01f0.01f);                 // Set the color of the sphere according to the bitmap image                 // or the specified color if no bitmap                 if (_WallTextures[(byte)color] == "")                 {                     // TT - Changed for October CTP because DiffuseColor                     // is a Vector4, but my WallColors are Vector3                     //cBoxShape.DiffuseColor = _WallColors[(byte)color];                     cSphereShape.DiffuseColor.= (float)(_WallColors[(byte)color].255.0);                     cSphereShape.DiffuseColor.= (float)(_WallColors[(byte)color].255.0);                     cSphereShape.DiffuseColor.= (float)(_WallColors[(byte)color].255.0);                     cSphereShape.DiffuseColor.1.0f;                 }                 else                     cSphereShape.TextureFileName _WallTextures[(byte)color];                 sphere = new SingleShapeEntity(new SphereShape(cSphereShape),                     new Vector3((col * -_state.GridSpacing),                             radius,                             -(row _state.GridSpacing)));                 // Name the entity. All entities must have unique names                 sphere.State.Name "ball_" row "_" col;                 // Insert entity in simulation.                   _simEnginePort.Insert(sphere);             }             else             {                 // Dimensions are in meters                 Vector3 dimensions =                     new Vector3(_state.WallBoxSize _state.GridSpacing,                             height _state.HeightScale,                             _state.WallBoxSize _state.GridSpacing);                 BoxShapeProperties cBoxShape null;                 SingleShapeEntity box null;                 // create simple immovable entity, with a single shape                 cBoxShape = new BoxShapeProperties(                     // TT -- Change to infinite mass so that the walls                     // do not "blow apart" if you bump them!                     // TT Oct 2006 -- Allow user to specify this                         _WallMasses[(byte)color], // mass in kilograms.                         new Pose(),     // relative pose                         dimensions);    // dimensions                 cBoxShape.Material = new MaterialProperties("gbox"1.0f0.4f0.5f);                 // Set the color of the box according to the bitmap image                 // or the specified color if no bitmap                 if (_WallTextures[(byte)color] == "")                 {                     // TT - Changed for October CTP because DiffuseColor                     // is a Vector4, but my WallColors are Vector3                     //cBoxShape.DiffuseColor = _WallColors[(byte)color];                     cBoxShape.DiffuseColor.= (float)(_WallColors[(byte)color].255.0);                     cBoxShape.DiffuseColor.= (float)(_WallColors[(byte)color].255.0);                     cBoxShape.DiffuseColor.= (float)(_WallColors[(byte)color].255.0);                     cBoxShape.DiffuseColor.0.5f;                 }                 else                     cBoxShape.TextureFileName _WallTextures[(byte)color];                 box = new SingleShapeEntity(new BoxShape(cBoxShape),                     new Vector3(col * -_state.GridSpacing,                             height _state.HeightScale 2,                             -(row _state.GridSpacing)));                 // Name the entity. All entities must have unique names                 box.State.Name "wall_" row "_" col;                 // Insert entity in simulation.                   _simEnginePort.Insert(box);             }             BlockCounter++;         }



Como ves usa la entidad box para crear las pareces. Una esquina se forma por dos 'boxes' pegados.

También puedes coger un entorno ya creado y editarlo directamente usando el modo de edición del simulador.

Echa un vistazo a este mensaje:

-> Crear una simulación
Raúl Arrabales Moreno. conscious-robots.com/raul
  The administrator has disabled public write access. Please, register to participate in the forum.
Raúl
Moderator

Moderator
Posts: 444
graph
Karma: 6  
Re:Creación de laberinto - 2008/04/11 12:29 Ahora que acaban de liberar la CTP de Abril del Robotics Developer Studio 2008 es mucho más fácil crear un laberinto. El RDS 08 trae un editor de planos (floorplan entity) que permite definir facilmente paredes, puertas, ventanas, etc.:



Tienes más información en:

-> Disponible Microsoft Robotics Developer Studio 2008 CTP Abril
Raúl Arrabales Moreno. conscious-robots.com/raul
  The administrator has disabled public write access. Please, register to participate in the forum.
Syndicate
 Conscious Robots RSS FeedConscious Robots RSS Feed





Lost Password?
No account yet? Register
Last Posts in Forum
 
Top! Top!