World Object

For clients to use the world object service

class bosdyn.client.world_object.WorldObjectClient[source]

Bases: bosdyn.client.common.BaseClient

Client for World Object service.

default_service_name = 'world-objects'
service_type = 'bosdyn.api.WorldObjectService'
update_from(other)[source]

Adopt key objects like processors, logger, and wallet from other.

property timesync_endpoint

Accessor for timesync-endpoint that is grabbed via ‘update_from()’.

Raises

bosdyn.client.robot_command.NoTimeSyncError – Could not find the timesync endpoint for the robot.

list_world_objects(object_type=None, time_start_point=None, **kwargs)[source]

Get a list of World Objects.

Parameters
  • object_type (list of bosdyn.api.WorldObjectType) – Specific types to include in the response, all other types will be filtered out.

  • time_start_point (float) – A client timestamp to filter objects in the response. All objects will have a timestamp after this time.

Returns

The response message, which includes the filtered list of all world objects.

Raises
list_world_objects_async(object_type=None, time_start_point=None, **kwargs)[source]

Async version of list_world_objects().

mutate_world_objects(mutation_req, **kwargs)[source]

Mutate (add, change, delete) world objects.

Parameters

mutation_req (world_object_pb2.MutateWorldObjectRequest) – The request including the object to be mutated and the type of mutation.

Returns

The response, which includes the id of the mutated object.

Raises
mutate_world_objects_async(mutation_req, **kwargs)[source]

Async version of mutate_world_objects().

bosdyn.client.world_object.make_add_world_object_req(world_obj)[source]

Add a world object to the scene.

Parameters

world_obj (WorldObject) – The world object to be added into the robot’s perception scene.

Returns

A MutateWorldObjectRequest where the action is to “add” the object to the scene.

bosdyn.client.world_object.make_delete_world_object_req(world_obj)[source]

Delete a world object from the scene.

Parameters

world_obj (WorldObject) – The world object to be delete in the robot’s perception scene. The object must be a client-added object and have the correct world object id returned by the service after adding the object.

Returns

A MutateWorldObjectRequest where the action is to “delete” the object to the scene.

bosdyn.client.world_object.make_change_world_object_req(world_obj)[source]

Change/update an existing world object in the scene.

Parameters

world_obj (WorldObject) – The world object to be changed/updated in the robot’s perception scene. The object must be a client-added object and have the correct world object id returned by the service after adding the object.

Returns

A MutateWorldObjectRequest where the action is to “change” the object to the scene.