robokudo.world¶
General methods to access the current World. Reasoning about alternate world states is done in the corresponding Annotators.
Attributes¶
Lock for safe creation of the central SemDT World and entity tracker. |
Functions¶
Get the entity tracker instance of for the current world. |
|
Initialize the world and entity tracker and return the entity tracker. |
|
Initialize the entity tracker from the given world and return the entity tracker. |
|
|
Return the world state for the currently running perception pipeline. |
|
Clear the world state safely by overwriting it with the given instance. |
|
Unsafely set the world state without acquiring the lock. |
|
Clear the world state by instantiating a new World. |
|
Unsafely clear the world state without acquiring the lock. |
|
Check whether a body with a given name exists in the given world. |
|
Set up the world and camera frames if they do not exist yet. |
Module Contents¶
- robokudo.world.this¶
- robokudo.world._rk_world_lock¶
-
Lock for safe creation of the central SemDT World and entity tracker.
- robokudo.world.get_world_entity_tracker() semantic_digital_twin.adapters.world_entity_kwargs_tracker.WorldEntityWithIDKwargsTracker¶
-
Get the entity tracker instance of for the current world.
- Returns:
-
The current entity tracker instance.
- robokudo.world.init_world_with_entity_tracker() semantic_digital_twin.adapters.world_entity_kwargs_tracker.WorldEntityWithIDKwargsTracker¶
-
Initialize the world and entity tracker and return the entity tracker.
- Returns:
-
The newly created entity tracker instance.
- robokudo.world.init_world_entity_tracker_from_world(world: semantic_digital_twin.world.World) semantic_digital_twin.adapters.world_entity_kwargs_tracker.WorldEntityWithIDKwargsTracker¶
-
Initialize the entity tracker from the given world and return the entity tracker.
- Returns:
-
The newly created entity tracker instance.
- robokudo.world.world_instance() semantic_digital_twin.world.World¶
-
Return the world state for the currently running perception pipeline.
This is NOT necessarily the belief state World based on the previous analysis results.
- Returns:
-
A singleton-like World instance.
- robokudo.world.set_world(world: semantic_digital_twin.world.World) None¶
-
Clear the world state safely by overwriting it with the given instance.
- Parameters:
-
world – The new world state.
- robokudo.world.unsafe_set_world(world: semantic_digital_twin.world.World) None¶
-
Unsafely set the world state without acquiring the lock.
Warning
Always acquire the lock manually before calling this method. Take a look at this.set_world() or this.init_world_with_entity_tracker() for example.
- Parameters:
-
world – The new world state to set.
- robokudo.world.clear_world() None¶
-
Clear the world state by instantiating a new World.
- robokudo.world.unsafe_clear_world() None¶
-
Unsafely clear the world state without acquiring the lock.
Warning
Always acquire the lock manually before calling this method. Take a look at this.clear_world() or this.world_instance() for examples.
- robokudo.world.world_has_body_by_name(world: semantic_digital_twin.world.World, body_name: str) bool¶
-
Check whether a body with a given name exists in the given world.
- Parameters:
-
world – The world to check in.
body_name – The body name to search for.
- Returns:
-
True if the body exists, False otherwise.
- robokudo.world.setup_world_for_camera_frame(world_frame: str, camera_frame: str) None¶
-
Set up the world and camera frames if they do not exist yet.
- Parameters:
-
world_frame – The name of the world frame.
camera_frame – The name of the camera frame.