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.Hallwayclass.add_location(**location_config)Adds a location at the specified parent entity, usually a room.
add_metadata([locations, objects])Add location and object metadata from the specified files, allowing additional metadata to be incrementally merged with the existing data.
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.
close_location(location[, ignore_robots])Close a storage location or hallway.
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_hallway_by_name(name)Gets a hallway object by its name.
Gets all hallway names.
Returns a list of hallways attached to a specific room.
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[, prev_location])Gets the name of a location given a pose.
get_location_in_hallway(pose, hallway)Gets a location in a hallway given an input pose.
get_location_in_room(pose, room)Gets a location in a room given an input pose.
Returns the location metadata associated with this world.
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.
Returns the object metadata associated with this world.
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_pose_relative_to(pose, entity)Given a relative pose to an entity, and the entity itself, gets the absolute pose.
get_robot_by_name(name)Gets a robot by its name.
Gets all robot names in the world.
get_room_by_name(name)Gets a room object by its name.
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.
lock_location(location)Locks a storage location or hallway.
open_location(location)Opens a storage location or hallway between two rooms..
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.
sample_object_spawn_pose(obj, obj_spawn, ...)Samples an object pose in a specific object spawn.
set_inflation_radius([inflation_radius])Sets world inflation radius.
set_metadata([locations, objects])Sets location and object metadata from the specified files.
unlock_location(location)Unlocks a storage location or hallway.
update_bounds(entity[, remove])Updates the X and Y bounds of the world.
update_location(loc, pose[, room, is_open, ...])Updates an existing location in the world.
update_object(obj[, loc, pose])Updates an existing object in the world.