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
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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 10th, 2011, 04:55 PM
Registered User
 
Join Date: Feb 2010
Location: Austin, TX
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Getting Corobot-type (Ch. 6 example) Config.xml Changed

Hello,

I'm posting this here instead of the MS Robotics forums, because my project was based on the ProMRDS Chapter 6 example project Corobot and drawing from the Chapter 3 ServiceA->ServiceB SetInterval() ProMRDS example. I'll apologize in advance for the long post, but I've been reading, recoding and pulling my hair out for weeks now trying to figure out why this doesn't work.

I created a "master" project in MS Visual Studio 2008 that is based on ProMRDS's Corobot project (called SimTest). It opens the simulation engine and populates it with the very simple two-box, four-wheeled robot like in the example. I created a second project based on ProMRDS's SimulatedQuadDifferentialDrive project that creates the entity (called SimEntity).

I then created a WinForm GUI for my own custom move command buttons, because that's the interface that I need to emulate in MRDS (called SimPanel). I need to pass the movement command from my GUI's button presses and make the robot move in the simulation.

I added the "Command" parameter, based on the ServiceA->ServiceB example (which my projects worked great), to the SimEntity (Corobot-style) project and was able to push the SimPanel GUI buttons and change the state in SimTest and save it into SimTest's config.xml file - no problem.

I then tried passing the Command parameter from SimTest to the SimEntity (SimulatedQuadDifferentialDrive-style) project.

Command string passed: SimPanel->SimTest->SimEntity

It compiled ok, no run-time DSSP errors shown in the console and it seemed to run through the functions (if stepped into each line), but it never actually changed the Command parameter in the SimEntity.Config.xml file/state (it does change it in the SimTest.Config.xml ok).

Stepping through I noticed that it went through the SimTest.Proxy functions and it would stop in the SimTest::SetCommandHandler(SetCommand request) if I put a breakpoint there (wouldn't see it if just stepping through). Stepping through the SimEntity.Proxy functions, it looked exactly identical, but if I put a breakpoint in SimEntity::SetCommandHandler(SetCommand request) it never gets there. It's just not calling SimEntity's SetCommandHandler() at all.

I thought maybe it was a problem with my partner lists and SimTest doing both input and output of Command, so I eliminated SimTest and just did

Command string passed: SimPanel->SimEntity

with the same exact code that worked with SimPanel->SimTest. Same exact bad results as with SimPanel->SimTest->SimEntity, so I figure it's got to be a specific difference between SimTest and SimEntity.

Comparing SimTest and SimEntity, the only significant difference I can see is that SimEntity (and the ProMRDS examples I based it on) has a different State function in it's Types file/class:

Code:
[DataContract]
public class SimEntityState : pxdrive.DriveDifferentialTwoWheelState {
//...<the stuff in the SimulatedQuadDifferentialDrive project>...
    public string _command;
    [DataMember]
    public string Command
    {
        get { return _command; }
        set { _command = value; }
    }
}
Also I had these in the SimEntityTypes class:

Code:
/// <summary>
    /// Set Command state Operation
    /// </summary>
    public class SetCommand : Update<SetCommandRequest, PortSet<DefaultUpdateResponseType, Fault>>
    {
        public SetCommand()
        {
        }
    }

    /// <summary>
    /// Set Command Request
    /// </summary>
    [DataContract]
    [DataMemberConstructor]
    public class SetCommandRequest
    {
        [DataMember, DataMemberConstructor]
        public string Command;
    }
Does the pxdrive inheritance prevent me from updating the Command parameter that I added? I just can't find any other difference or reason why it doesn't work. No errors or exceptions - it looks like it's stepping through but never actually calls SetCommandHandler() and update the config file or state.
Reply With Quote
Reply


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
Can't Get Ch 3 Example to Create ServiceB.Config.xml GeorgeMo BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 4 December 13th, 2010 02:12 AM
Ch 9-Sending Email-Encrytping web.config btcomp BOOK: Beginning ASP.NET 4 : in C# and VB 3 August 28th, 2010 05:37 PM
Why has the encoding for xml suddenly changed in chp 9 chucknb28409 BOOK: Professional Joomla! ISBN: 978-0-470-13394-1 0 May 19th, 2009 03:13 PM
web config file format changed sarah lee ASP.NET 1.0 and 1.1 Basics 0 September 29th, 2006 02:31 PM
$type determination (CH 7) drichard BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 28th, 2005 08:52 PM



All times are GMT -4. The time now is 05:55 PM.


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