logo logo
Home arrow Forums...
Monday, 21 May 2012
 
 
 
Conscious-Robots.com Forum  


Raúl
Moderator

Moderator
Posts: 591
graph
Karma: 10  
Re:MSRS could not load SimulatedSonar service - 2010/10/02 11:24 Hi,

Please, use the last version of the simulated sonar, which is included as part of CRUBOTS download at:

--> MRDS 2008 R2 Services

Also, if you look at the other services in this package, you'll see that in order to get the simulated sonar service working you need to create the sonar entity associated to your robot. For instance, you could look at the MAzeSimulatorRA.cs file (the maze simulator service), where the simulated sonar is used:

First, we need a reference to the service proxy:

Code:

 using pxsonar Cranium.Simulation.Sensors.Proxy;



Then, when we create the robot, we can add the simulated sonar entity, and specify its position (relative the robot chassis):

Code:

 SonarEntity sonar1 CreateSonar(0.0f); robotBaseEntity.InsertEntity(sonar1);



And here is the create sonar function:

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..
Raúl Arrabales Moreno. conscious-robots.com/raul
  The administrator has disabled public write access. Please, register to participate in the forum.

      Topics Author Date
    emo
MSRS could not load SimulatedSonar service
Didro 2010/10/01 11:00
    thread link
thread linkthread link Re:MSRS could not load SimulatedSonar service
Raúl 2010/10/02 11:24





Lost Password?
No account yet? Register
 Conscious Robots RSS FeedConscious Robots RSS Feed

Find us on Facebook

Follow us on TwitterFollow us on twitter
Spotlight

Machine Consciousness Bibliography Database

 

ConsScale
The Cognitive Machine Consciousness Scale

 
Last Posts in Forum
 
CR
miel continental