pyrobosim.core.locations.Location

class pyrobosim.core.locations.Location(*, name: str, category: str, parent: ~pyrobosim.core.types.Entity, pose: ~pyrobosim.utils.pose.Pose = Pose: [x=0.00, y=0.00, z=0.00, qw=1.000, qx=0.000, qy=-0.000, qz=0.000], color: ~typing.Sequence[float] | str | None = None, is_open: bool = True, is_locked: bool = False, is_charger: bool = False)

Representation of a location in the world.

Methods

__init__(*, name, category, parent, pose[, ...])

Creates a location instance.

add_graph_nodes()

Creates graph nodes for searching.

add_metadata(filename)

Add location metadata from a new file to existing metadata.

clear_metadata()

Clear out old location metadata.

create_polygons([inflation_radius])

Creates collision and visualization polygons for the location.

create_spawn_locations()

Creates the object spawn locations at this location.

print_details()

Prints string with details.

set_pose(pose)

Sets the pose of a location, accounting for its navigation poses and object spawns.

to_dict()

Serializes the location to a dictionary.

update_collision_polygon([inflation_radius])

Updates the collision polygon using the specified inflation radius.

update_visualization_polygon()

Updates the visualization polygon for the location.

Attributes

height

Vertical height of location.

metadata

Metadata for location categories.

viz_color

Visualization color (RGB tuple).