Skip to content

Commit

Permalink
Formatting clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
khughes-bdai committed Feb 16, 2024
1 parent 861a23f commit f8f886b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
13 changes: 9 additions & 4 deletions spot_wrapper/spot_world_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
import logging
import typing

from bosdyn.api.world_object_pb2 import ListWorldObjectResponse, WorldObjectType, MutateWorldObjectRequest, MutateWorldObjectResponse
from bosdyn.api.world_object_pb2 import (
ListWorldObjectResponse,
MutateWorldObjectRequest,
MutateWorldObjectResponse,
WorldObjectType,
)
from bosdyn.client.async_tasks import AsyncPeriodicQuery
from bosdyn.client.common import FutureWrapper
from bosdyn.client.world_object import WorldObjectClient, send_add_mutation_requests
from bosdyn.client.world_object import WorldObjectClient


class AsyncWorldObjects(AsyncPeriodicQuery):
Expand Down Expand Up @@ -92,6 +97,6 @@ def list_world_objects(
"""
return self._world_objects_client.list_world_objects(object_types, time_start_point)
def client_mutate_world_object(self, request: MutateWorldObjectRequest) -> MutateWorldObjectResponse:

def mutate_world_object(self, request: MutateWorldObjectRequest) -> MutateWorldObjectResponse:
return self._world_objects_client.mutate_world_objects(request)
9 changes: 5 additions & 4 deletions spot_wrapper/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,10 +784,6 @@ def spot_docking(self) -> SpotDocking:
def world_objects(self) -> world_object_pb2.ListWorldObjectResponse:
"""Return most recent proto from _world_objects_task"""
return self.spot_world_objects.async_task.proto

# @property
def mutate_world_object(self, mutate_request: world_object_pb2.MutateWorldObjectRequest) -> world_object_pb2.MutateWorldObjectResponse:
return self._spot_world_objects.client_mutate_world_object(mutate_request)

@property
def point_clouds(self) -> typing.List[point_cloud_pb2.PointCloudResponse]:
Expand Down Expand Up @@ -1481,3 +1477,8 @@ def choreography_log_to_animation_file(
return self._spot_dance.choreography_log_to_animation_file(name, fpath, has_arm, **kwargs)
else:
return False, "Spot is not licensed for choreography", ""

def mutate_world_object(
self, mutate_request: world_object_pb2.MutateWorldObjectRequest
) -> world_object_pb2.MutateWorldObjectResponse:
return self._spot_world_objects.mutate_world_object(mutate_request)

0 comments on commit f8f886b

Please sign in to comment.