-
Notifications
You must be signed in to change notification settings - Fork 505
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
HITL - Add object state manipulation utility. #2042
Conversation
True: OraclePowerOnInPlaceSkill, | ||
False: OraclePowerOffInPlaceSkill, | ||
}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you happen to know whether we already have this information? It would be great to have a single source of truth and avoid drift here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you would reverse engineer the ObjectStateMachine instance by checking each active ObjectStateSpec for it's name:
self.name = "is_clean" |
Could be a helper function to do this in that class if it would be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like what we want. That may require some habitat_llm
changes for skill auto-discovery.
I'll refactor this in a later pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Confusing maps and variable-types can use some rewording/documentation
self, state_name: str, target_value: bool | ||
) -> Optional[OracleObjectStateInPlaceSkill]: | ||
""" | ||
Return a boolean action that allows for changing 'state_name' to 'target_value'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actions are not boolean, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah you mean BooleanAction
type. Got it. Reword the comment?
actions.append( | ||
BooleanAction( | ||
state_spec=spec, | ||
current_value=state.value, | ||
target_value=target_value, | ||
available=action_available, | ||
enabled=action_enabled, | ||
error=error, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you cache the actions available in the world for all objects and then pass these to the UI to populate with based on user's clicks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct!
Motivation and Context
This changeset introduces an utility to manipulate object states.
How Has This Been Tested
Tested with
habitat-llm
.Types of changes
Checklist