Merged
Conversation
spomichter
requested changes
Apr 9, 2025
Contributor
spomichter
left a comment
There was a problem hiding this comment.
Overall amazing super helpful and useful abstraction and the skill init is very clear. Added comments. Main things are just trivial semantic changes.
In the test file you dont have an example one-off skill creation example which would be helpful for developers.
so something like
class newSkill(AbstractRobotSkill):
def call():
print("do something")
self.skill_group.add(newSkill)
dimos/robot/unitree/unitree_go2.py
Outdated
| super().__init__(ros_control=ros_control, output_dir=output_dir, skills=skills) | ||
|
|
||
| # Unitree specific skill initialization | ||
| self.skills = skills |
Contributor
There was a problem hiding this comment.
But what if unitree go2 is initialized without skills?
spomichter
requested changes
Apr 9, 2025
…ter__ methods. Tested working.
spomichter
requested changes
Apr 11, 2025
spomichter
requested changes
Apr 11, 2025
…down a decorator section that's a todo; Adds clarity for skill calling in test file;
…'; Adds to test file with working tests; Throws error in the event a skill is called in a SkillLibrary that does not exist
… 'run.sh 0'; Reconfirmed tests are working
spomichter
previously approved these changes
Apr 15, 2025
Contributor
spomichter
left a comment
There was a problem hiding this comment.
Approved for merge into dev. Will test more.
spomichter
approved these changes
Apr 15, 2025
Contributor
spomichter
left a comment
There was a problem hiding this comment.
Approved for merge into dev. Will test more.
spomichter
added a commit
that referenced
this pull request
May 14, 2025
### Summary This PR allows the agent to accept the following types: - `Skill` - `SkillLibrary` It also includes a refactor to reduce the amount of code needed to create an abstract skill. ### Details - Private skill instantiation is still supported by inheriting `SkillLibrary` and calling: ```python [SkillLibraryClass].create_instance(...) ``` - If a skill does not require dependencies, it can be passed directly to the agent. - If a skill requires dependencies, a `SkillLibrary` should be used. - `SkillLibrary` manages underlying instance parameters. This is also why the agent accepts the `SkillLibrary` type directly. ### Testing To run the tests: ```bash python3 -m tests.test_skill_library ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR allows the agent to accept the following types:
SkillSkillLibraryIt also includes a refactor to reduce the amount of code needed to create an abstract skill.
Details
Private skill instantiation is still supported by inheriting
SkillLibraryand calling:If a skill does not require dependencies, it can be passed directly to the agent.
If a skill requires dependencies, a
SkillLibraryshould be used.SkillLibrarymanages underlying instance parameters. This is also why the agent accepts theSkillLibrarytype directly.Testing
To run the tests: