Open
Description
We should use proper typing for the user-facing API commands, like this:
def command_actuators(self, commands: List[Dict[str, Any]]) -> List[common_pb2.ActionResult]: ...
Instead of having Any
type (which makes it hard to remember what commands to provide) we should use a TypedDict
from typing import TypedDict, NotRequired
class ActuatorCommand(TypedDict):
actuator_id: int
position: NotRequired[float]
velocity: NotRequired[float]
torque: NotRequired[float]
...
def command_actuators(self, commands: List[ActuatorCommand]) -> List[common_pb2.ActionResult]: ...
We need to do this for the entire API.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Locked