-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Robot Program / Controller Abstractions: Should airo-mono offer high-level abstractions for robot programs? #140
Comments
Some considerations for each paradigm:
|
For our demo, we had a different vision with controllers that are more low level, but I see merit in both of our proposals (mine below). Main issues with our old architecture
Proposed solutions
I saw controllers as stateless functions, operating on a Considerations
ConclusionI think there are several levels of abstraction and we need to decide which we want to address, and how. Code example
|
I feel like your proposal is close to what I had in mind for an 🕹️ station = Station() # contains the hardware
observer = Observer(station) # also contains Yolo or SAM?
while not result == done:
observation = observer.get_observation() # joint configs, images, point cloud, YOLO detections?
result = grab_capsule(station.arm, observation)
while not result == done:
observation = observer.get_observation()
result = move_to_coffee_maker(station.arm, observation)
... The |
Yes, this is very similar to what I had in mind. The
Here, I'm copying an issue from the barista repository to have all thoughts in one place: Problems with current code
For example, the LeverOpenerController is a monster of a class that violates, a.o., the single responsibility principle. It maintains its own planner, performs perception and computes bounding boxes, moves based on motion planning, with servoing and also simply with regular Proposed code architectureI think the following code architecture would be more maintainable, but it could also be too restrictive. General idea
|
For the centrifuge demo we used a In case a controller did not need to sense, think, or act, we simply left the specific method empty. There were some cases where, due to working against a deadline, we started to interleave sensing, thinking, and acting, but this can easily be avoided by being more strict (and code review). I enjoyed the separation of sense, think, and act, because especially during development, we could check trajectories and poses in simulation (especially with airo-drake) before running. However, I'm not sure if we should really supply such interfaces. I think it would be better to document different controller styles somewhere in a "recommended practices" document. |
Describe the feature you'd like
Airo-mono has enabled code sharing for many low and mid-level tasks (e.g. hardware access and basic operations). Should airo-mono also offer standard high-level abstractions for common robot program paradigms:
SensePlanActController
: fits Victor’s use cases very well.BehaviorTreeController
: maybe relevant for mobile robotAgentController
: RL-like controller with env/obs/reward -> actionDesign goals 📝
StereoRGBDCamera
and anUR5e
and a crumpled cloth on the table) This fosters reusability across different setups.Possible implementation
Abstract base classes that define the methods that their children must implement. For example:
🧠
SensePlanActController
:sense()
: collect an observation and save it in self._observationplan(observation)
: attempt to find a feasible plan and save in self._plan (uses self._observation if no observation was given)act(plan)
execute a plancan_act()
loop()
startsense()
->plan()
->act()
loop until a feasible plan is found or controller wants to terminate.visualize_observation()
visualize_plan()
execute(autonomous: bool = False)
This kind of structure maps very naturally to all the controllers I've written for the cloth-competition.
The text was updated successfully, but these errors were encountered: