pyrobosim.core.world.World

class pyrobosim.core.world.World(name='world', inflation_radius=0.0, object_radius=0.0375, wall_height=2.0)

Core world modeling class.

Methods

__init__([name, inflation_radius, ...])

Creates a new world model instance.

add_hallway(**hallway_config)

Adds a hallway from with specified parameters related to the pyrobosim.core.hallway.Hallway class.

add_location(**location_config)

Adds a location at the specified parent entity, usually a room.

add_object(**object_config)

Adds an object to a specific location.

add_robot(robot[, loc, pose])

Adds a robot to the world given either a world entity and/or pose.

add_room(**room_config)

Adds a room to the world.

check_occupancy(pose)

Check if a pose in the world is occupied.

collides_with_robots(pose[, robot])

Checks if a pose collides with robots in the world.

get_entity_by_name(name)

Gets any world entity by its name.

get_hallways_from_rooms(room1, room2)

Returns a list of hallways between two rooms.

get_location_by_name(name)

Gets a location object by its name.

get_location_from_pose(pose)

Gets the name of a location given a pose.

get_location_names([category_list])

Gets all location names, optionally filtered by category.

get_locations([category_list])

Gets all locations, optionally filtered by category.

get_object_by_name(name)

Gets an object by its name.

get_object_names([category_list])

Gets all object names in the world, optionally filtered by category.

get_object_spawn_names([category_list])

Gets all object spawn location names, optionally filtered by category.

get_object_spawns([category_list])

Gets all object spawn locations, optionally filtered by category.

get_objects([category_list])

Gets all objects in the world, optionally filtered by category.

get_robot_by_name(name)

Gets a robot by its name.

get_robot_names()

Gets all robot names in the world.

get_room_by_name(name)

Gets a room object by its name.

get_room_names()

Gets all room names in the world.

graph_node_from_entity(entity_query[, ...])

Gets a graph node from an entity query, which could be any combination of room, hallway, location, object spawn, or object in the world, as well as their respective categories.

is_connectable(start, goal[, step_dist, ...])

Checks connectivity between two poses start and goal in the world by sampling points spaced by the self.collision_check_dist parameter and verifying that every point is in the free configuration space.

remove_all_objects([restart_numbering])

Cleanly removes all objects from the world.

remove_hallway(hallway)

Removes a hallway between two rooms.

remove_location(loc)

Cleanly removes a location from the world.

remove_object(obj)

Cleanly removes an object from the world.

remove_robot(robot_name)

Removes a robot from the world.

remove_room(room_name)

Removes a room from the world by name.

sample_free_robot_pose_uniform([robot, ...])

Sample an unoccupied robot pose in the world.

set_inflation_radius([inflation_radius])

Sets world inflation radius.

set_metadata([locations, objects])

Sets location and object metadata from the specified files.

update_bounds(entity[, remove])

Updates the X and Y bounds of the world.

update_location(loc, pose[, room])

Updates an existing location in the world.

update_object(obj[, loc, pose])

Updates an existing object in the world.