personalrobotics / ada_meal_scenario

A set of scripts for a meal serving scenario using Ada.
1 stars 4 forks source link

Use actions instead of homebrew state machine #12

Closed siddhss5 closed 9 years ago

siddhss5 commented 9 years ago

I suggest using action and the action library instead of the homebrew state machine. Please work with @jeking04 and @mkoval and look at the Toyota demo for an excellent example.

mkoval commented 9 years ago

I'm not sure if it makes sense to use the Action machinery here. That is mostly designed to skip ahead in a multi-stage plan and start execution. There are only really two states in this demo, so it seems like overkill. I think we're better off making some more straightforward optimizations, e.g. #13, first.

Did you have something in particular in mind?

siddhss5 commented 9 years ago

I see this current version of two states as really a first pass at something that is far more capable and actually has more complicated logic for feeding [e.g. if the person is talking/wants to eat, what food item there is and how to pick each different item, if they want water, if we need to regrasp utensils or clear the table].

Doesn't it seem like switching to Actions now will allow us to both generalize better and grow easier?

mkoval commented 9 years ago

I agree, in theory.

We're still working out the kinks of Action in the Librarian demo. We now have the capability of bypassing steps that we don't want to execute (via BypassableAction), but do not have a convenient way of parallelizing planning and execution. I think we should finish working out the details in that demo---and maybe move the base classes to PrPy---before porting the code over here, too.

@jeking04 What do you think?

Stefanos19 commented 9 years ago

I believe this has been solved with the merging of Jen's branch: https://github.com/personalrobotics/ada_meal_scenario/commit/1a8a4cc50fefd9d0d93ccfabdca9e77fc9607282