Raúl
Moderator
 Moderator
| Posts: 591 |  | 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 |