locked
basic orchestration advice RRS feed

  • Question

  • I have a line follower service, which uses a light sensor service and a tribot service to follow a line (using the simulator)

     

    I am having trouble getting the algorithm to work and would appreciate a little advice.

     

    I have states (following line, looking for line, and stop) and a light sensor handler which gets the latest light value every second through subscription.

     

    Where do I put the algorithm?  I tried an ienumerable handler call from a GUI and I could not figure out how to read state from the Types.cs and I can't store the state in the main class for some reason.  I tried putting it in the light sensor handler and it starts to work then goes nuts - I think because it's multithreaded.  I tried putting it at the end of start() but for some reason I can't command the drive motors.

     

    What is the correct way to do this?

     

    thanks in advance!

    Friday, April 13, 2007 12:32 AM

Answers

  • The very best example of an orchestrator, tha has a complex state machine, is the Explorer service, also explained in detail in RoboticsTutorial5. Its a good start.
    Friday, April 13, 2007 5:26 AM