Attempt to control and manipulate a simulated NXT on one host from another one

I couldn't find a solution to move a simulated NXT Robot on my desktop computer from my notebook. I use source code from robots tutorial 4 and try to use the GUI from there to manipulate the NXT in the simulation on another host.
[237 byte] By [kren2s] at [2008-1-8]
# 1
Other Question: Can I control my simulated NXT by means of a Dashboard, that runs on other host? Thank you
kren2s at 2007-10-2 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Simulation...
# 2

Yes, it is possible to control robots in the simulation environment from services running on another node or another system.

In the case of the Dashboard, all you have to do is to run your services on one machine and to run the Dashboard on another machine. When the Dashboard comes up, you type localhost in the Machine text box and the appropriate TCP port into the port: textbox. The TCP port is the port you specified with the -t parameter when you started the node with your services on the first machine.

All of the differentialdrive and lrf services should now be displayed and you can double click on them to drive the robot around.

If the services don't show up, you need to verify that you have connectivity between the two machines and that the firewall or other security is not preventing communication between the machines.

-Kyle

KyleJ-MSFT at 2007-10-2 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Simulation...
# 3
Thank you,
in case with Dashboard it runs very good. Now I'm trying the whole day to make it running by means of the UI from the robotics tutorial 4 in the simulation tool on the other computer. How is it possible? Where must I put the IP of remote host? How must I change the source code and manifests? I am at my wit's end. Thank you
kren2s at 2007-10-2 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Simulation...
# 4

We provide the source code for the dashboard service so you can see exactly how it is done. Look in samples\misc\simpledashboard\simpledashboard.cs.

It is fairly easy to make Robotics Tutorial 4 work across two nodes. The first part of Service Tutorial 7 tells you how to do it. Modify the Robotics Tutorial 4 manifest as follows:

Code Snippet

<?xml version="1.0" encoding="utf-8"?>
<Manifest
xmlns="http://schemas.microsoft.com/xw/2004/10/manifest.html"
xmlns:dssp="http://schemas.microsoft.com/xw/2004/10/dssp.html"
xmlns:rt4="http://schemas.tempuri.org/2006/06/roboticstutorial4.html"
>
<!-- Robotics Tutorial 4 manifest requires a hardware manifest. -->
<!-- When you start this manifest, also include one of the following: -->
<!-- -->
<!-- -m:"samples\config\LEGO.NXT.TriBot.manifest.xml" -->
<!-- -m:"samples\config\LEGO.RCX.Vehicle.manifest.xml" -->
<!-- -m:"samples\config\FischerTechnik.ROBOMobile.manifest.xml" -->
<!-- -m:"samples\config\Parallax.BoeBot.manifest.xml" -->
<!-- -->
<CreateServiceList>

<!--Start tutorial 4-->
<ServiceRecordType>
<dssp:Contract>http://schemas.tempuri.org/2006/06/roboticstutorial4.html</dssp:Contract>
<dssp:PartnerList>
<dssp:Partner>
<dssp:Service>http://localhost:40000/differentialdrive</dssp:Service>
<dssp:Name>rt4:Drive</dssp:Name>
</dssp:Partner>
</dssp:PartnerList>
</ServiceRecordType>
</CreateServiceList>
</Manifest>

I have added a partner to the RoboticsTutorial4 service which specifies the service instance URI of the service you want to talk to. In this case, I have specified the same machine but port 40000 instead of port 50000. You can specify a different machine if you like. Add the machine to your hosts file so that it has a name associated with the IP address and then use that name in your manifest.

You need to modify the manifest you are running on the remote machine to give the differential drive service the same instance URI that we specified in the local manifest:

Code Snippet

<!-- Start simulated motor service -->
<ServiceRecordType>
<dssp:Contract>http://schemas.microsoft.com/robotics/simulation/services/2006/05/simulateddifferentialdrive.html</dssp:Contract>
<dssp:Service>http://localhost/differentialdrive</dssp:Service>
<dssp:PartnerList>
<dssp:Partner>
<!--The partner name must match the entity name-->
<dssp:Service>http://localhost/P3DXMotorBase</dssp:Service>
<dssp:Name>simcommon:Entity</dssp:Name>
</dssp:Partner>
</dssp:PartnerList>
</ServiceRecordType>

Make sure that ports 40000 and 40001 have been reserved on both machines using httpreserve.exe. Also, make sure that the firewall does not block access to these ports by specifying them as exceptions in the firewall configuration on both machines (or disable the firewall).

Now you should be able to run MobileRobots.p3dx.simulation.manifest.xml on one machine and roboticstutorial4.manifest.xml on another machine and control the simulated robot across machines.

-Kyle

KyleJ-MSFT at 2007-10-2 > top of Msdn Tech,Microsoft Robotics Studio,Microsoft Robotics - Simulation...

Microsoft Robotics Studio

Site Classified