IEEERobotics / high-level

CV, localization, mapping, planning, and generally anything that will run on the PandaBoard
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Entry point for planner process spawn #3

Closed dfarrell07 closed 11 years ago

dfarrell07 commented 11 years ago

The Planer.py module currently creates a Planner object when it is run as the main script, then calls start() on that object. A new function should be added that does this without the need to run as the main program or create a Planner object. This new function should accept shared values as an argument (currently a dict of lists and dicts).

dfarrell07 commented 11 years ago

I created one called run() in Planner.py. It's meant to be a stub, just to have something to target for the process spawn. Other package owners can look at it as an example of what's needed.

def run(bot_loc, blocks, zones, corners, waypoints):
  # TODO Handle shared data, start your process from here
  plan = Planner()
  plan.start()
dfarrell07 commented 11 years ago

Controller now starts planner correctly. Planner may need to modify the arguments it expects, in light of today's high-level group modifications of the shared data passed to each process by controller, but that's trivial and out of the scope of this issue.