Comments (3)
Here was my general line of thinking, which may or may not be correct.
If an action fails for an expected reason, i.e. the planner fails, then we raise an ActionException. Our main script then only catches these ActionExceptions. Inside the exception is the name of the action that failed. this would allow us to easily log what failed in a particular trial.
If there is an unexpected failure, i.e. we mispell a function name, then the exception will just fail through and be spit to the command line. The idea here is that we want catestrophic failure in these cases because its something we need to fix.
Now, we leave it up to the actions themselves to define "expected" vs. "unexpected." For now, mostly expected failures are PlanningErrors. I am also raising ActionExceptions when a data file (i.e. saved trajectory) isn't found. This might be the wrong thing to do, as we probably want a complete failure there.
In general, I think a nice rule of thumb might be that if something fails that could possibly succeed by just running again, then we want to catch the failure and raise an ActionException. Planning failure is often a nice example of this. Basically, the ActionException signals that this trial is busted, but we should be able to just reset and run again and expect some chance of success. If there is a failure that will be persistent, i.e. we can't succeed without making a code change to fix it, then this should just be left to drop through and kill the demo.
The lack of ability to verify that we are catching all possible exceptions seems like a python limitation. But maybe there is something clever we can do. I'll leave those suggestions to the python masters.
from ada_meal_scenario.
Thanks, that makes a lot of sense. It'd be nice to start doing that in the demo. Right now we're just failing right?
Also, I imagine an action could raise several ActionException
s, each of which might require a different intervention. How do we propose to deal with that?
from ada_meal_scenario.
I think we are already doing this in the demo. Here we catch the ActionException, log it and just allow the user to continue to another trial:
I think I am catching all known exceptions and reraising an ActionException. But there could be some places I missed. Let me know if you see anything specific.
As for the different interventions, one idea is to subclass ActionException and raise different exceptions based on the intervention we want. We should come up with some examples of interventions we are interested in to see if we can use this idea or if we need something different.
from ada_meal_scenario.
Related Issues (20)
- Active manipulator HOT 1
- Clean up unused imports HOT 1
- Extrinsic calibration of Structure IO sensor HOT 2
- Fix loose camera mount HOT 1
- OpenNI StructureIO IR image speckled HOT 8
- Replacement usb cable of StructureIO sensor HOT 9
- Slow performance with prpy 0.4.0 HOT 41
- Demo logic for faster plans HOT 7
- Morsel Detection using Plate HOT 3
- Tag demo and move to Jen's branch HOT 1
- feature/action_framework: Morsel detection callback continues after morsel is grabbed HOT 2
- feature/action_framework: What is the best way to execute task repeatedly? HOT 3
- feature/action_framework: keep-alive motion HOT 2
- feature/action_framework: manip.PlanToConfiguration results in program to freeze HOT 1
- Morsel detector sometimes does not see bites HOT 1
- Get Shorter Forks HOT 3
- Fork part occludes field of view of the camera
- What arguments should I pass to the biteserver to visualize the output? HOT 2
- Use Kinova's fork holder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ada_meal_scenario.