Pioneer 3 DX - ARCOS SONAR Service?

Hi, I have a couple of Pioneer 3 DX robot bases, but I don't have any LRF. I would like to use the inbuilt frontal SONAR Array for navigation using MSRS, but I don't see any SONAR Service for ARCOS in the current MSRS CTP.

Do Microsoft provide such a service? Or it is planned to be delivered in next releases? I am very interested in this service, as I don't seem to be able to get any Laser range finder..

Thanks!

[444 byte] By [array2001] at [2008-3-5]
# 1

Coincidentally, I've been looking around the Pioneer and ARCOS examples all morning. I have the same set up as you, so I'm very curious about how to get the sonar readings into MSRS code. I know MSRS has access to them because you can view the readings through the web interface; I just don't know exactly how to get them into code so I can actually do anything useful based on the readings.

Just out of curiosity, do you, or anyone else out there, have a Pioneer with a gripper attachment? That's the next piece I'm going to try to get working by using MSRS code, and if anybody already has it working, any help would be greatly appreciated!

Kexyn at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 2

I think an ARCOS SONAR Service would be required in order to use the Sonar readings into MSRS code, but I haven't seen such a service in the current CTP.

Unfortunately I don't have a gripper.. But I'm also interested in seeing it working with MSRS.

array2001 at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 3

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.

Gripper functionality is not explicity implemented in the ArcosCore service, but that service does expose the ability to send any command to the ARCOS board on the Pioneer, so writing a simple Gripper service would be an interesting exercise.

Hope this Helps

Paul

PaulCRoberts at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 4

Thanks! I'll try to write a specific ArcosSonar service as you suggest..

array2001 at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 5

Thanks alot for the help! I successfully got the Sonar readings into my code using the Replace notifications. Awesome. Next step is to get the gripper working by sending actual commands to the ARCOS board like you said. Any advice as to where to start?

array2001, how goes the service writing? If you're hitting any speed bumps, I can probably help you along. I have some code working now, and it shouldn't be too hard to put it into its own service. Let me know!

Thanks again!

Kexyn at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 6

Thanks Kexyn. I've been busy with other stuff, but I'd like to start today with the SONAR service writting. It would be nice if you share your code!

Cheers.

array2001 at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 7

Hi, I made the exercise of writting an ARCOS SONAR service. Source code and Visual Studio project can be downloaded from:

http://www.conscious-robots.com/en/download/software-components-for-robotics/index.php

Take into account that it can be dramatically improved and it hasn't been fully tested. I just modified the explorer to subscribe to the Sonar Service and it seems to work fine (it just log the sonar reading so far, I don't use it to navigate, but I plan to replace the LRF with the Sonar data in the code - as I don't have a LRF).

As suggested in this thread, the Arcos Sonar service simply subscribes to Arcos Core service and retrieve the data from Information.Sonar member. I am sure the code can be greatly improved, so suggestions are welcome!

Cheers.

array2001 at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 8

I also wrote a little Sonar Service. I did much the same thing you did, but if you want to check out my code email me at kaworkma@marauder.millersville.edu and I'll be more than happy to attach my code for you.

I am also without a LRF, so I'm hoping to use the sonar for navigation and other things instead. I'm working on a program now to try and map out the obstacles in a room and display it on a GUI. I've never worked with C# GUI before, so I'm spending too much time trying to get my frame to look nice instead of the fun programming part. Oh well.

Anyway, let me know if you want me to email you my sonar service. I've tested it a little bit and it seems to work how I want it to, but some feedback is always a good thing. Keep me posted on your progress, and I'll do the same, hopefully we can do some pretty cool stuff with these Pioneers.

Kexyn at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 9

Thanks for the feedback! I just realized that I am not following the generic contract for sonar, i.e. Microsoft.Robotics.Services.Sonar.Proxy , so I am rewritting the code of the Sonar service and also a new Explorer based on a generic sonar. Then, I'll try to test them both with the Arcos Sonar instantiation...

array2001 at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 10

I seem to be unable to implement any generic contract for Sonar, as it is not exponed in Arcos.Y2006.M06.dll. I tried this:

C:\Microsoft Robotics Studio 1.5 (CTP May 2007)>bin\DssNewService.exe /namespace:Robotics /service:ArcosSonar /implement:"bin\Arcos.Y2006.M06.dll"

But I only get stubs for drive and bumper, not for sonar… Does anyone know how could I implement the generic contract for sonar?

I would like to use the sonar service as follows:

Code Snippet

using bumper = Microsoft.Robotics.Services.ContactSensor.Proxy;

using drive = Microsoft.Robotics.Services.Drive.Proxy;

using sonar = Microsoft.Robotics.Services.Sonar.Proxy;

Code Snippet

#region sonar partner

Partner("Sonar", Contract = sonar.Contract.Identifier,

CreationPolicy = PartnerCreationPolicy.UseExistingOrCreate)]

sonar.SonarOperations _sonarPort = new sonar.SonarOperations();

sonar.SonarOperations _sonarNotify = new sonar.SonarOperations();

#endregion

But I guess I need to implement the contract defined in Microsoft.Robotics.Services.Sonar.Proxy. The problem is that I can't find that contract in the refered dll.

array2001 at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 11

That's weird. I use my sonar service exactly like that. All I had to do was run the sonar service once, and then I could add Sonar.Y2007.M07.Proxy.dll as a reference to my other project. Then I do exactly what you did in your code snippet.

I'll send you an email with both my Sonar service and the other service that I'm using it with.

Your project should show up as a reference after you run it at least once; are the .dll files in the bin directory? You should have a few of them in there, maybe try to add them as references from the browse tab?

Anyway, check your email and see if my service works as expected. If not, it could have something to do with the way you have your directories set up or something?

Kexyn at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 12

Thanks Kexyn, I can use my sonar service from the explorer service. I can subscribe to it, get sonar reading, etc. The problem is that I wanted my Sonar service to implement the generic contract for sonar, i.e. a generic sonar. That way the explorer service code wouldn't need to be specific for Pioneer 3 DX robot.

The Explorer code suplied with MSRS uses generic contracts for Drive and Bumper. And I wanted to do the same with Sonar. But I don't seem to be able to implement the generic contract for Sonar. Actually, I didn't find it...

array2001 at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 13
Ooooh I understand what you're saying now. Sorry, I've never seen a generic sonar contract either, does anybody else know if it exists?
Kexyn at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...
# 14

I just realized that my SONAR service is sending notifications everytime Arcos Core service is changed, and that doesn't necessarily means that there is new Sonar data available. So I'll modify the code to take that into account (I will upload the new version to the same link provided above).

Additionally, I've seen that my Explorer service (which subscribes to Arcos Sonar Service) get a lot of notifications where the Sonar readings have changed very little. Maybe it worth having some measurement of the change in the Arcos Sonar service, and notify changes only when a certain threshold is reached...

array2001 at 2007-9-28 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Hardware Configuration and Troubleshooting...

Microsoft Robotics Studio

Site Classified