ARCOS based robots (like the Pioneer P3-DX) can integrate up to four SONAR rings, each with eight transducers. These sensors provide object detection and distance information. I am currently using the inbuilt frontal SONAR array for navigation with MSRS.
The Robotics Studio platform doesn’t include a specific SONAR service for ARCOS robots. However, there exists a generic contract for SONAR that I wanted to implement for the specific case of my P3-DX frontal SONAR array.
I asked Microsoft (see forum) and I got the following answer:
If you subscribe to the ArcosCore service you will receive Replace notifications. This contains the complete state of the ArcosCore service everytime that it changes. Included in that state is a member Information which in turn contains a List of sonar readings in the member Sonar.
Alternatively a specific ArcosSonar service could easily be written to simplify access to this data.
Following these instructions I wrote a service called ArcosSonar – Source code is available in the download section. You can subscribe to this ArcosSonar service from your application and easily get SONAR readings in your MSRS code (obviously, this is only valid for Arcos based robots).
Installation instructions (for source code zip archive):
ArcosSonar is a small Robotics Studio Service (DSS Service) that allows you to access the Pioneer 3 DX Robot frontal SONAR array readings. The zip file contains the source code and Visual Studio project.
Decompress the contents of the file under MSRS home directory. Note that the service source code is located under Apps directory. Build it using Visual Studio.
See the readme.txt file included in the distribution package for detailed instructions and version history. It is important that you install the service in a machine with the same version of MSRS that is indicated in the readme.txt file. I always try to update the distribution file with the latest available version of MSRS, please check regularly for updates.
Service Details:
Service Contract Identifier: http://www.conscious-robots.com/2007/07/sonar.html
Service partners: Microsoft.Robotics.Services.MobileRobots.Arcos
Allow Susbscriptions: Yes.
Service State: Microsoft.Robotics.Services.Sonar.Proxy.SonarState
SONAR Ring Scheme
Hardware Description:
Pioneer 3 DX frontal SONAR ring is composed of eight transducers arranged at angles -90, -50, -30, -10, 10, 30, 50, and 90 degrees. They are polled sequentially at a configurable rate (usually 25 Hz – 50 ms per transducer per array).
The ArcosSonar service subscribes to ArcosCore service in order to get any replace message indicating a state change. Whenever a substantial change occurs in the SONAR reading members of the ArcosCore, the ArcosSonar service will in turn issue a replace message to all its subscribers notifying a state change.
Within the SonarState object, an eight position array of double values is created. This array (called DistanceMeasurements[]) contains the distance readings corresponding to the SONAR transducers.