locked
Can't start Generic differential drive RRS feed

  • Question

  • Hello,
    I´m trying to develop an application using different services I have already developed(Some of them in VPL and the others with Visual Studio). I have a service created with VPL that uses a desktop joystick and irobot create/roomba services. It does not give me any error when I execute it from VPL.

    The problem comes when I try to start this service(compiled as a service) programatically from other one written in Visual Studio. The reported error is this:

    *** Partner enumeration during service startup failed. Partner Name:http://schemas.microsoft.com/robotics/2006/05/drive.html:LeftMotor

    Partner Contract:

    Partners specified statically in service implementation class:

    PartnerAttribute Name:SubMgr,Contract:http://schemas.microsoft.com/xw/2005/01/subscriptionmanager.html,CreationPolicy:CreateAlways

    PartnerAttribute Name:LeftMotor,Contract:http://schemas.microsoft.com/robotics/2006/05/motor.html,CreationPolicy:UsePartnerListEntry

    PartnerAttribute Name:RightMotor,Contract:http://schemas.microsoft.com/robotics/2006/05/motor.html,CreationPolicy:UsePartnerListEntry

    PartnerAttribute Name:LeftEncoder,Contract:http://schemas.microsoft.com/robotics/2006/05/encoder.html,CreationPolicy:UsePartnerListEntry

    PartnerAttribute Name:RightEncoder,Contract:http://schemas.microsoft.com/robotics/2006/05/encoder.html,CreationPolicy:UsePartnerListEntry

    Partners specified at runtime, in CreateRequest:

    Name: http://schemas.microsoft.com/xw/2004/10/dssp.html:CreatorService, Contract: http://etic.security.org/2009/05/roboticsecurity.html, Service: dssp.tcp://markel-pc:50001/roboticsecurity/dbb54ba2-a75e-4d19-a114-f5b6e3d2028e

    Name: http://schemas.microsoft.com/xw/2004/10/dssp.html:ConstructorService, Contract: http://schemas.microsoft.com/xw/2004/10/constructor.html, Service: dssp.tcp://markel-pc:50001/constructor

    Name: http://schemas.microsoft.com/xw/2004/10/dssp.html:PartnerListService, Contract: http://schemas.microsoft.com/xw/2004/10/partnerlist.html, Service: dssp.tcp://markel-pc:50001/drivedifferentialtwowheel/65041da3-b0a6-45b5-9e98-661aa6e7a332/dss/partnermanager



    I guess I must start left and right motor services but I don´t know how to do it.
    I would apreciate some help, thanks.

    Monday, May 4, 2009 10:20 AM

Answers

  • Ok, I have started to implement all my services in VPL using Visual Studio and C#. It gives more options in order to develop those services and my problems are gone. This way I understand better the manifests and I can modify them more easily using the DSS Manifest Editor as Trevor said.

    Thanks a lot Trevor and Vicent
    Friday, May 8, 2009 9:03 AM

All replies

  • I have a possible solution to my problem. Now I can start my VPL application after compliling it, but now I need to start it from my main service. My problem is that I can't start the service specifying a manifest programatically.
    I have tried this:

    Microsoft.Dss.Services.ManifestLoaderClient.Insert insert = new Microsoft.Dss.Services.ManifestLoaderClient.Insert();
    insert.Body = new Microsoft.Dss.Services.ManifestLoaderClient.InsertRequestType();
    insert.Body.Manifest = ServicePaths.MountPoint + "/samples/Config/ControlRoombaByHand.manifest.xml";
    _manifestLoader.Post(insert);
    When the code is executed nothing happens and Visual Studio reports the next message:

    ### DsspForwarder:InboundFailureHandler. Exception:Body type not expected:Microsoft.Dss.Services.ManifestLoaderClient.Proxy.InsertRequest
        Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:InsertRequest
        Body Type:Microsoft.Dss.Services.ManifestLoaderClient.Proxy.InsertRequest
        Target Service:dssp.tcp://markel-pc:50001/manifestloader/7f619007-4bc5-447f-92f9-489398a533f3
        Source Service:dssp.tcp://markel-pc:50001/roboticsecurity/731ff11c-0716-4db4-88d6-7c5b48b4393a

    I have not found nothing about this error. Any idea?

    Thanks
    Tuesday, May 5, 2009 10:38 AM
  • I think you send your message to the wrong service "/manifestloader/xxxx". You should send this request to "/manifestloaderclient". Check the declaration of "_manifestLoader"

    Regards,
    Vincent
    http://www.simplysim.net/
    Wednesday, May 6, 2009 6:38 AM

  • I had the next declaration for _manifestLoader:

    [Partner("ManifestLoaderService", Contract = "http://schemas.microsoft.com/xw/2004/10/manifestloader.html", CreationPolicy = PartnerCreationPolicy.UseExistingOrCreate)]
    Microsoft.Dss.Services.ManifestLoaderClient.ManifestLoaderClientPort _manifestLoader = new Microsoft.Dss.Services.ManifestLoaderClient.ManifestLoaderClientPort();

    It may be that the wrong thing there was the contract so I changed the declaration to that one:

    [Partner("ManifestLoaderService", Contract = Microsoft.Dss.Services.ManifestLoaderClient.Contract.Identifier, CreationPolicy = PartnerCreationPolicy.UseExistingOrCreate)]
    Microsoft.Dss.Services.ManifestLoaderClient.ManifestLoaderClientPort _manifestLoader = new Microsoft.Dss.Services.ManifestLoaderClient.ManifestLoaderClientPort();


    Now the error is different but I don´t know if I am getting closer to the solution or not:

    *   Manifest load complete [05/06/2009 08:57:06][http://markel-pc:50000/manifestloaderclient]
    *   Starting manifest load: dssp.tcp://markel-pc:50001/manifestloaderclient [05/06/2009 08:57:18][http://markel-pc:50000/manifestloaderclient]
    *** System.NotSupportedException: The URI prefix is not recognized.
       at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
       at System.Net.WebRequest.Create(Uri requestUri)
       at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials)
       at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials)
       at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
       at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext)
       at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings)
       at Microsoft.Dss.Services.ManifestLoaderClient.ManifestLoaderClientService.<DoDeserializeManifest>d__21.MoveNext() [05/06/2009 08:57:18][http://markel-pc:50000/manifestloaderclient]

     Thanks for help

    Wednesday, May 6, 2009 7:06 AM
  • I think you should give an absolute URI for the manifest, i.e http://localhost:50000/mountpoint/samples/Config/ControlRoombaByHand.manifest.xml.
    http://www.simplysim.net/
    Wednesday, May 6, 2009 7:42 AM
  • I think I'm doing it properly:

    insert.Body.Manifest = ServicePaths.MountPoint + "/Projects/ControlRoombaByHand/ControlRoombaByHand.manifest.xml";
    However I have tested it with the entire path like you said but tha same happens. Can be that I have the manifest in the incorrect directory? I have copied it to to samples/Config but the problem does not dissapear.

    Thanks again.
    Wednesday, May 6, 2009 8:19 AM
  • Beware that "ServicePaths.MountPoint" is just "/mountpoint" not http://localhost:50000/mountpoint
    http://www.simplysim.net/
    Wednesday, May 6, 2009 2:46 PM
  • I didn't know that but as I said in the last post I have tried with the complete path, but the error still apears.

    Thanks again.
    Wednesday, May 6, 2009 2:52 PM
  • I'm not sure why you are trying to load a manifest explicitly in your code. Why don't you just edit the original manifest (you can use the DSS Manifest Editor) and add the missing partner services?

    Trevor

    P.S. I just noticed that you are talking about starting the Generic Differential Drive. This is a strange service. Normally the generic contracts do NOT have an actual service implementation. However, the GDD is used for the Fischer Technik robot which only implements motor services. What you probably want to do is start a differential drive for a specific robot. It will implement the GDD contract, so you can talk to it as though it is a GDD, but it is actually NOT the GDD service that ships in the product.
    Wednesday, May 6, 2009 8:29 PM
  • Ok, I have started to implement all my services in VPL using Visual Studio and C#. It gives more options in order to develop those services and my problems are gone. This way I understand better the manifests and I can modify them more easily using the DSS Manifest Editor as Trevor said.

    Thanks a lot Trevor and Vicent
    Friday, May 8, 2009 9:03 AM