You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #717 - Update G1/Go2 skills to work in blueprint and remove some Robot interfaces
Update G1/Go2 skills and remove some Robot interfaces
* Convert `UnitreeSkillContainer` to work with `autoconnect`. I removed the dynamic skills because they don't work across RPC. So I converted to using a single skill called `execute_sport_command`.
* Also updated `UnitreeG1SkillContainer`.
* Replaced the tests for the above skill.
* Remove `UnitreeRobot` and `GpsRobot`.
* Convert `SkillContainer` classes to `Module`: `GpsNavSkillContainer`, `GoogleMapsSkillContainer`. Also add demos for them.
* Add some missing types for some previous code I wrote.
* Added support for declaring RPC connections like this:
```python
# new
rpc_calls: list[str] = [
"SpatialMemory.tag_location",
"SpatialMemory.query_tagged_location",
...
]
```
instead of this:
```python
# old
@rpc
def set_SpatialMemory_tag_location(self, callable: RpcCall) -> None:
self._tag_location = callable
self._tag_location.set_rpc(self.rpc)
@rpc
def set_SpatialMemory_query_tagged_location(self, callable: RpcCall) -> None:
self._query_tagged_location = callable
self._query_tagged_location.set_rpc(self.rpc)
```
* I've also changed the code to support connecting to different Module classes based on the interfaces they implement rather than just the concrete classes.
* For example, `NavigationSkillContainer` needs to talk to a navigation class to tell it to move to a specific point. Previously it only supported linking to `BehaviorTreeNavigator.set_goal`. But now both `BehaviorTreeNavigator` and `ROSNav` implement the `NavigationInterface` ABC. So you can say `rpc_calls = ["NavigationInterface.set_goal"]` and you get back either `BehaviorTreeNavigator.set_goal` or `ROSNav.set_goal`, based on which is deployed in the blueprint. If, by chance, both are deployed, then it triggers an error because it's ambiguous, and we can't know which one it's supposed to connect to.
Former-commit-id: 8d41052
0 commit comments