logo logo
Inicio arrow Foros...
Tuesday, 02 de December de 2008
 
 
English English  Español Español  
Próximos Eventos
10.Jun. 2009

IWANN 2009
Salamanca, Spain
International Work-Conference on Artificial Neural Networks
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
Work-Conference in the Interplay between Natural and Artificial Computation
Etiquetas
Análisis Artificial Associations Científicos Conciencia Consciencia Consciencia Artificial Conscientes Consciousness Developer Documentación Documentation Español Investigación Publicaciones Reviews Robotics Robots Robótica Servicios Spanish Studio VPL artificial
Destacados
Titulares RSS
 Conscious Robots RSS FeedFuente RSS de Conscious Robots
Conscious-Robots.com Forum  


Raúl
Moderador

Moderador
Mensajes: 432
graph
Karma: 6  
How do I use the simulated sonar? - 2008/08/12 16:43 Admin: question posted as comment in MSRS pages:

Written by carlcs, on 10-08-2008 16:30
I'm entirely new to MSRS 1.5 so i don't know how to do this but how do i add this to my simulated robot? I'm trying to add it to the Pioneer3DX robot in the 2nd tutorial but i don't know how.

Thanks
Raúl Arrabales Moreno. conscious-robots.com/raul
  El administrador ha deshabilitado la escritura de mensajes a los usuarios no registrados.
Raúl
Moderador

Moderador
Mensajes: 432
graph
Karma: 6  
Re:How do I use the simulated sonar? - 2008/08/12 16:53 Hi, in case you want to use the simulated sonar in your own robot the first thing you need to do is to add the corresponding simulated sonar entity as a child of the robot simulated entity.
You can have a look to how this is done in the ExplorerSimSonar Application:

-> ExplorerSimSonarApplication.

In this example, the service MazeSimulatorRA creates a simulated world, including a Pioneer 3DX robot. The simulated sonar is added to the robot as follows:

Code:

         void AddPioneer3DXRobot(Vector3 position)         {             // TT Dec-2006 - Make the position a parameter             // TT Jun-2007 - Changes to the Simulated Differential Drive             // required a new version of the Pioneer3DX. This is annoying             // because it was only a change of class name but it had some             // flow-on effects. The problem arises because you can't just             // replace an entity that is in built into the Simulator.             TTPioneer3DX robotBaseEntity CreateMotorBase(ref position);             // Raul - Create the sensor entities according to settings.             if (_state.UseLRF)             {                 // Create Laser entity and start simulated laser service                 LaserRangeFinderEntity laser CreateLaserRangeFinder();                 // Add laser as child to motor base                 robotBaseEntity.InsertEntity(laser);             }             if (_state.UseSonar)             {                 // Raul - Replace LRF with SONAR:                 SonarEntity sonar1 CreateSonar(0.0f);                 // Raul - Insert Sonar                 robotBaseEntity.InsertEntity(sonar1);             }                                      // Create bumper array entity and start simulated bumper service             BumperArrayEntity bumperArray CreateBumperArray();             // Insert as child of motor base             robotBaseEntity.InsertEntity(bumperArray);             // TT - Copied from Oct CTP Simulation Tutorial 2             // Create Camera Entity and start SimulatedWebcam service             CameraEntity camera CreateCamera();             // insert as child of motor base             robotBaseEntity.InsertEntity(camera);             // Reverse the orientation of the robot so that it will             // drive "forwards" from the user's perspective (it is             // actually driving in the Z direction)             robotBaseEntity.State.Pose.Orientation Quaternion.FromAxisAngle(010, (float)(Math.PI));             // Finaly insert the motor base and its two children              // to the simulation             //_simEnginePort.Insert(robotBaseEntity);             SimulationEngine.GlobalInstancePort.Insert(robotBaseEntity);         }



Note that I use a flag to insert either a laser or a sonar depending on my current configuration...

And the createSonar method is as follows:

Code:

         /// <summary>         /// Creates a frontal SONAR array entity for the Pioneer 3 DX robot.          /// </summary>         /// <param name="dx">X position of sonar source "rays"</param>         /// <returns></returns>         private SonarEntity CreateSonar(float dx)         {             // Create a Sonar Entity.             // Place it 30cm above base CenterofMass.              SonarEntity sonar = new SonarEntity( new Pose(new Vector3(dx0.30f0)) );             sonar.State.Name "SimulatedSonar";             // TT - From Oct CTP             sonar.SonarBox.BoxState.DiffuseColor = new Vector4(0.25f0.25f0.8f1.0f);             // Create Sonar simulation service and specify             // which entity it talks to             CreateService(                 pxsonar.Contract.Identifier,                 Microsoft.Robotics.Simulation.Partners.CreateEntityPartner(                 "http://localhost/" sonar.State.Name));             return sonar;         }



Hope this helps...
Cheers,
Raúl.
Raúl Arrabales Moreno. conscious-robots.com/raul
  El administrador ha deshabilitado la escritura de mensajes a los usuarios no registrados.
carlcs
Usuarios

Expert Boarder
Mensajes: 20
graphgraph
Karma: 1  
Re:How do I use the simulated sonar? - 2008/08/23 08:50 thanks thanks. good job. on the simulated sonar service.it's cool.
  El administrador ha deshabilitado la escritura de mensajes a los usuarios no registrados.
Raúl
Moderador

Moderador
Mensajes: 432
graph
Karma: 6  
Re:How do I use the simulated sonar? - 2008/08/25 09:53 I am glad it is useful for you It could be cooler actually if I had implemented a 3D cone raytracing for the simulation, but current 2D approximation I think is fairly valid for most of the simulated environments that I have seen.

Another point to take into account is that this simulated sonar is not simulating any noise... And when you deal with real sonar transducers noise is something you definitely have to deal with...
Raúl Arrabales Moreno. conscious-robots.com/raul
  El administrador ha deshabilitado la escritura de mensajes a los usuarios no registrados.





¿Recuperar contraseña?
¿Quieres registrarte? Hazlo aquí
Mensajes en el Foro
 
Top! Top!