logo logo
Home arrow Forums...
Saturday, 11 February 2012
 
 
Main Menu
Home
Conscious Machines...
AI Techniques...
Neuroscience...
Researchers...
Publications...
Reviews...
MC Bibliography
Robotics Studio...
Forums...
Blog...
Frontpage
Upcoming Events
22.Feb. 2012

CogSys 2012
Vienna, Austria
04.Apr. 2012

TSC 2012
Tucson, Arizona
17.May. 2012

EAIS 2012
Madrid, Spain
05.Jun. 2012

Cognition & Consciousness
Menorca. Spain
02.Jul. 2012

ASSC 16
Brighton, UK
02.Jul. 2012

Revisiting Turing and his Test
Birmingham, UK
31.Oct. 2012

BICA 2012
Palermo. Italy
Tag Cloud
Associations Books Conferences Conscious Conscious Machines Consciousness Developer Documentación Documentation Español Machine Machine Consciousness Machines Neuroscience Positions Publications Research Researchers Reviews Robotics Robots Spanish Studio VPL
Spotlight
More
Reader's Preferred
MCexperts List
FAQs
Glossary
Site Map
 
Conscious-Robots.com Forum  


Kalos
User

Fresh Boarder
Posts: 2
graphgraph
Karma: 0  
Maze solver - 2010/02/02 00:18 Ok I am a newbie in VPL and in C# , What I am trying to do is to create a maze with the p3DX which can find the exit out of the maze using the lazer range service. To create the maze I used a bitmap image and I used the images path in mazesimulator.config.xml.
So far so good.. When I open and run VPL with only MazeSimulator service, the programm creates the maze and adds the robot.
Now how can I use it? It seems that when I choose a generic differential Drive and I add a value in left and right motors the robot does nothing.
From my understanding I have to link the services together but I dont know how..
is it possiple to help me with these steps?
after that I simply add the Lazerfinder service?
  The administrator has disabled public write access. Please, register to participate in the forum.
Raúl
Moderator

Moderator
Posts: 590
graph
Karma: 10  
Re:Maze solver - 2010/02/04 12:09 Basically, I think you are choosing the wrong contract.

To put it short, when controlling a differential drive there are two main services involved:

- A. The actual differential drive of the robot.
- B. The control service where the control code is.

In order to have the two services communicating with each other you need to establish a partnership between them.

In your case, A would probably be the Simulated Differential Drive, which is a special case of Differential Drive, i.e. it implements the Generic Differential Drive contract.

And now, you have to distinguish between these two cases:

- At compilation time you will be referring to the Generic Differential Drive service, because you want your control service to be able to control whatever particular Differential Drive that could exist at run time (be it the simulated one or for instance a real Pioneer robot differential drive).

- At execution time, there will be a proper implementation of the Differential Drive, for instance the SimulatedDifferentialDrive. Is in your manifest where you indicate what particular service will be the specific partner.

So just try using the simulated differential drive as the partner defined in the manifest. As this service implements all functions of the Generic contract version, your code will have no problems dealing with it.. That's the theory
Raúl Arrabales Moreno. conscious-robots.com/raul
  The administrator has disabled public write access. Please, register to participate in the forum.
Kalos
User

Fresh Boarder
Posts: 2
graphgraph
Karma: 0  
Re:Maze solver - 2010/02/09 03:50 ok the problem is how do I establish a partnership between the services.. I tried DSS manifest Editor.. But when I add Mazesimulator in only has Engine and Entity.. The only think I can put in Engine is The Simulation Engine Service.. I think It should have a drive service a Lazer and an Bumber..
  The administrator has disabled public write access. Please, register to participate in the forum.
Raúl
Moderator

Moderator
Posts: 590
graph
Karma: 10  
Re:Maze solver - 2010/02/10 14:39 In the case of the Maze Simulator, the simulated robot is created programatically, and so are created the associated simulated sensors as well. This means that there is no need to specify these services in the manifest: when you create the MazeSimulator service, the robot-related services are created as a consequence.

Note there is a method called AddPioneer3DXRobot in the MazeSimulatorRA service. This code creates the simulated sensors. For instance, the Laser Range Finder (LRF) is created using a call to CreateLaserRangeFinder:

Code:

 private LaserRangeFinderEntity CreateLaserRangeFinder() {    // Create a Laser Range Finder Entity.    // Place it 30cm above base CenterofMass.     LaserRangeFinderEntity laser = new LaserRangeFinderEntity(       new Pose(new Vector3(00.30f0)));    laser.State.Name "SimulatedLRF";    laser.LaserBox.State.DiffuseColor =           new Vector4(0.25f0.25f0.8f1.0f);    // Create LaserRangeFinder simulation service and specify    // which entity it talks to    CreateService(        lrf.Contract.Identifier,        Microsoft.Robotics.Simulation.Partners.CreateEntityPartner(          "http://localhost/" laser.State.Name)    );    return laser; }



In short, as you are using this code, the service is created programatically, and therefore you don't need to add the sensor services to the manifest.

Now, you probably want to subscribe to these sensor services from another service, say a Control Service.

This Control Service has to establish a partnership with the sensor services. The way I do this is as follows:

For instance, for the bumper sensor, in your Control Service you will specify a partnership with the generic bumper contract:

Code:

 [Partner("Bumper",           Contract bumper.Contract.Identifier,           CreationPolicy PartnerCreationPolicy.UseExisting)] bumper.ContactSensorArrayOperations _bumperPort =      new bumper.ContactSensorArrayOperations(); bumper.ContactSensorArrayOperations _bumperNotify =      new bumper.ContactSensorArrayOperations();



Note here that I use "UseExisting" as Creation Policy, given the specific simulated bumper service already exists (it was created during MazeSimulationRA service startup).

For other services that you specify in the manifest, you wouls use the option UsePartnerListEntry.

Hope this helps..
Raúl Arrabales Moreno. conscious-robots.com/raul
  The administrator has disabled public write access. Please, register to participate in the forum.





Lost Password?
No account yet? Register
 Conscious Robots RSS FeedConscious Robots RSS Feed

Find us on Facebook

Follow us on TwitterFollow us on twitter
Spotlight

Machine Consciousness Bibliography Database

 

ConsScale
The Cognitive Machine Consciousness Scale

 
Last Posts in Forum
 
CR
miel continental