Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Other Programming > BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6
This is the forum to discuss the Wrox book Professional Microsoft Robotics Developer Studio by Kyle Johns, Trevor Taylor; ISBN: 9780470141076
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old July 9th, 2011, 09:02 AM
Registered User
Join Date: Jul 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help needed subscribing to simulated compass


I'm working on a project that involves using machine learning on the Lego Mindstorm NXT robot. Basically, I need to use the simulator in order to obtain the learning data by "letting the robot loose" through a few hundred episodes.

For the time being the robot can receive inputs solely from a color sensor. This works fine both in and out of the simulator. Now, I want to add a compass sensor to the robot. I'm having problems doing that. On the robot side (not simulation) of the code, I have the following:

using compassVirtual = Microsoft.Robotics.Services.Simulation.Sensors.Compass.Proxy;
Then I try to create the partnership with the compass, but it does not have CompassSensorOperations, like the physical compass available, so I used:

            Contract = compassVirtual.Contract.Identifier,
            CreationPolicy = PartnerCreationPolicy.UseExisting,
            Optional = false)]
        compassVirtual.CombinedOperationsPort _compassSensorPort = new compassVirtual.CombinedOperationsPort();
        compassVirtual.CombinedOperationsPort _compassSensorNotify = new compassVirtual.CombinedOperationsPort();
Apparently this is wrong as I can't subscribe to the service. Also, if i ignore the subscription, and just run the code it just connects to the color sensor as it used to, and then it just waits.

Note that I added references to SimulatedCompass.Y2008.M11 and SimulatedCompass.Y2008.M11.Proxy.

Basically what I want to do, is to subscribe to the compass to use in the simulator and get frequently readings from it.

Can I please get some help with this?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 4 compass stanlick BOOK: Professional Android 2 Application Development 0 March 18th, 2011 03:23 PM
Chapter 4 Compass Cmdr BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 0 July 11th, 2010 07:05 PM
Function Minimisation using Simulated Annealing Al starxxx Apache Tomcat 1 February 24th, 2008 07:04 AM
file uploader with simulated progressbar kunchala_rakesh Ajax 1 September 13th, 2007 10:11 PM

All times are GMT -4. The time now is 12:16 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.