RobotDashboard Drive enabled at start failed - Eddie Robot RRS feed

  • Question

  • Hi,

    unfortunately I can't get the goal to have the "Enable Drive" enabled at start (eddie.cmd).
    Normaly when the robotdashboard had started, you can press the button "Enable Drive" and then you can drive the robot. This works fine :).
    But I have replaced the notebook with an embedded pc and its all covered. So the user can't see the surface of the laptop and must press a button on the xbox controller. This is not very comfortable/logical.
    Therefore I tried to set the connection to the motor at start via Software, so that you only have to move the "joystick" to drive.  

    Thats what I did:
    When you start the eddie.cmd, it starts the EddieObstacleAvoid.manifest.xml.
    So I opened the eddieobstacleavoid.manifest with the dss manifest editor. There, in the eddie.markrobot.config.xml, you can set the drive to enabled, but nothing happend.
    And I also tried to change the C# files in the samples/platform/referenceplattform2011/robotdashboard/robotdashboard.sln via Visual Studio Express. At this place I set the drive to enabled at default via properties.
    Nothing happend...

    I really don't know where and what to program/register to have this default state setting.
    Perhaps anybody could help me please?

    • Edited by lemon42 Wednesday, December 5, 2012 8:59 PM
    Wednesday, December 5, 2012 5:11 PM


  • You are not using the user version of the manifest, so you are using the old services.

    You should run the user version, note the user between EddieObstacleAvoid. and .manifest.xml

    "C:\Users\Eddie\Microsoft Robotics
    Dev Studio 4\bin\\dsshost32" /p:50000 /t:50001 /m:"C:\Users\Eddie\Microsoft Robot
    ics Dev Studio 4\bin\..\Samples\Config\EddieObstacleAvoid.user.manifest.xml"

    Wednesday, December 19, 2012 7:16 PM

All replies

  • I don't know why setting enabled in the manifest did not work.

    If you modify the C# service code you are modifying the "User" version of the service.  To see the changes you must run the "User" version of the manifest.

    • Proposed as answer by Gershon Parent Thursday, December 6, 2012 4:29 AM
    Thursday, December 6, 2012 4:28 AM
  • thank you for the answer, so I'm on the right way?

    I figured out, when I set the check mark at "drive enabled" in the dss editor (markrobot partner), the setting is not really saved.
    To save this, I klicked on the save-icon in the editor, close the dss-editor, start the eddie.cmd, nothing happend, no drive enabled at the robotdashboard.
    And when I then go back to the dss-editor and look into the markrobot partner, the check mark is not set again...

    Perhaps any software overwrite this check mark again or I haven't saved it it the right way?

    Another weird thing is, when I set the mark in the drive enabled field into the dss-editor and then run the manifest via run/run manifest (F5) nothing happend too (no drive enabled in the robotdashboard), but the check mark is set.  
    Thursday, December 6, 2012 11:27 AM
  • OK, perhaps I found the solution but I can't interprete.

    As you can see in the picture, when I run the manifest, everything works fine, but the drive is not enabled in the robotdashboard.

    Although there is a check mark in the markrobot service at drive enabled.

    But there are several ping errors in the form.

    Perhaps that is the cause?

    Friday, December 7, 2012 4:11 PM
  • The PING errors are very likely unrelated.  the PING command is how the software gets the Sonar readings from the firmware.  They can fail sometimes for timing or communication issues, but it looks like you are getting sonar readings, so I would not worry about that.

    Services are supposed to load and save the values from the manifest, but some of the samples are incomplete.  You can run the "User" version of the manifest and step through the service initialization code to see if it is doing the right thing.  I should get a chance to investigate more later today.


    Monday, December 10, 2012 5:00 PM
  • OK.  I dug deeper, and here is the scoop.

    That button on the Robot Dashboard is not actually the same thing as "Enable" on the Differential Drive itself.  They are two separate things, and there is not config setting in the dashboard to enable that button from the config.

    The drive is enabled by default, but that button is another "enable/disable" mechanism separate from the drive. 

    You can easily override the button in the dashboard code.  Line 285 in DashboardForm.cs (in \Microsoft Robotics Dev Studio 4\samples\Platforms\ReferencePlatform2011\RobotDashboard) is where the check is done.  You could just ignore the checkbox (it is a checkbox even though it looks like a button), or you could add a configuration setting and some code to have the initial state of that button be settable from the config.


    • Proposed as answer by Gershon Parent Tuesday, December 11, 2012 4:38 AM
    Tuesday, December 11, 2012 4:38 AM
  • Thank you very much for the answer.

    I took a look at the code and tried to change some things. But I didn't have success.

    Perhaps I didn't get your answer right, but I want to have the Differential drive enabled when I start the manifest. Firstly it doesn't matter if the checkbox shows the enabled state. It is the second goal. 

    So, what I understand is you said the drive is enabled by default. But if this would be the case, in my understanding, the robot had to drive when I move the joystick after I started the manifest. And this is not the case. At the moment I have to press a button on the joystick or press the Drive Checkbox via mouse. When I do this, in my understanding, the checkbox changes the state of the differential drive, but how? Propably it is a solution to write some code like this: this.state.drive.enabled == true ? But where?

    • Marked as answer by Gershon Parent Tuesday, December 11, 2012 4:43 PM
    • Unmarked as answer by Gershon Parent Tuesday, December 11, 2012 4:44 PM
    Tuesday, December 11, 2012 1:32 PM
  • Line 285.

    Just remove that check and the robot will respond to the joystick without having to click that button.

    The checkbox/button does not change the differential drive state, it is just an setting internal to the dashboard.


    Tuesday, December 11, 2012 4:45 PM
  • OK, I grow desperate. 

    What do you mean with "Just remove this check"? I've tried a lot of things. 

    The best thing without an error message was to write "if (this.DriveCheckbox.Checked)". But with no effect.

    When I comment the if-line out, I get a lot of error messages (of course). When I comment the complete if-expression out, the programm tells me an error message with the variables left and right. And a lot of other things I've tried.

    I understand that this line (285) sets the xbox controller state of the DriveCheckbox to enabled. But I can't find a solution how to remove this check without error messages. Every time, I changed the values I saved all the files and rebuilded the project.

    Tuesday, December 11, 2012 11:51 PM
  • I'm sorry. Modifying C# services assumes some basic understanding of C#.

    The easiest fix (but not very elegant) is to change line 285 to this...

        if (true)

    That means do what is inside the clause always.


    • Proposed as answer by Gershon Parent Wednesday, December 12, 2012 7:02 PM
    Wednesday, December 12, 2012 7:02 PM
  • Thank you and sorry, that I could'nt answer earlier.

    When I do this I get an error: "Warning as error: Unreachable code detected"

    When I doublecklick on this it jumps to: left = right =0; (line 363).

    I searched a little bit in some forums, and the tip was to write a "break;" at the end before the if-brace. But this didn't work. Also not on other positions I've tried.

    Thursday, December 13, 2012 4:37 PM
  • That is because the code in the "else" clause cannot be reached if you set the condition for the if clause to "true".

    You can delete the else clause completely and that warning will go away.


    Friday, December 14, 2012 11:30 PM
  • Now the error message has gone, thank you :)

    But there is no effect anyway. The drive is still not enabled, when I start the manifest. I've saved (after the changes in dashboardform.cs) all files and rebuilded the project (F6). Or do I have to rebuild the service with msbuild?

    Saturday, December 15, 2012 9:36 AM
  • Hi,
    I have verified that with the above changes the robot can be driven around without needing to hit the enable drive button.
    However, you will need to
    1) Run BuildAllSamples.cmd and make sure it builds successfully.
    1a) If you get an error related to deprecated method in Kinect, you can open C:\MRDS4\samples\Sensors\Kinect\Kinect.csproj and go to Build tab and change "Treat warning as Errors" to None
    3) run the following command from dss command.
    dsshost32 /p:50000 /t:50001 /m:..\Samples\Config\ReferencePlatform2011.Simulation.user.manifest.xml
    Tuesday, December 18, 2012 9:16 PM
  • Hi Harshavardhana,

    thank you very much for testing (and Gershon for finding the right settings). When I do this everything works fine. The simulation starts and I can run the robot without pressing a button first. 

    But this works only in the simulation and that was not the goal of my first post. I doesn't work when I connect to the real robot. The dss command is this:"C:\Users\Eddie\Microsoft Robotics
    Dev Studio 4\bin\\dsshost32" /p:50000 /t:50001 /m:"C:\Users\Eddie\Microsoft Robot
    ics Dev Studio 4\bin\..\Samples\Config\EddieObstacleAvoid.manifest.xml"

    And this doesn't still work. You have to push the button A first before driving.

    Do you have any other idea or advice or perhaps I overlooked something?

    Wednesday, December 19, 2012 7:12 PM
  • You are not using the user version of the manifest, so you are using the old services.

    You should run the user version, note the user between EddieObstacleAvoid. and .manifest.xml

    "C:\Users\Eddie\Microsoft Robotics
    Dev Studio 4\bin\\dsshost32" /p:50000 /t:50001 /m:"C:\Users\Eddie\Microsoft Robot
    ics Dev Studio 4\bin\..\Samples\Config\EddieObstacleAvoid.user.manifest.xml"

    Wednesday, December 19, 2012 7:16 PM
  • It works :)

    With the user version everything is fine. For some reason I didn't had the user version in the folder, so I copied it from another computer. I worked at once. 

    Thanks again to Harshavarhana and Gershon!

    Thursday, December 20, 2012 10:56 AM
  • In my case, I didn't find EddieObstacleAvoid.user.manifest.xml in \Samples\Config\ folder. Although there is EddieObstacleAvoid.manifest.xml. How can I find this?
    Monday, November 25, 2013 10:12 AM