shasta.map#

Module Contents#

Classes#

Map

Attributes#

directories[source]#
assets_root[source]#
class Map[source]#
_affine_transformation_and_graph()[source]#

Performs initial conversion of the lat lon to cartesian

_setup_building_info()[source]#
setup(experiment_config)[source]#

Perform the initial experiment setup e.g., loading the map

Parameters:

experiment_config (yaml) – A yaml file providing the map configuration

Return type:

None

Raises:

FileNotFoundError – If the experiment config is none, raises a file not found error

get_affine_transformation_and_graph()[source]#

Get the transformation matrix and the node graph of the map

Returns:

The transformation matrix and the node graph

Return type:

array, node graph

get_node_graph()[source]#

Get the node graph of the world

Returns:

A node graph of the world map

Return type:

networkx graph

get_node_info(node_index)[source]#

Get the information about a node.

Parameters:

id (int) – Node ID

Returns:

A dictionary containing all the information about the node.

Return type:

dict

convert_to_lat_lon(point)[source]#

Convert a given point to lat lon co-ordinates

Parameters:

point (array) – A numpy array in pybullet cartesian co-ordinates

Returns:

lat_lon – The lat lon co-ordinates

Return type:

array

convert_to_cartesian(point)[source]#

Convert a lat lon co-ordinates to cartesian coordinates

Parameters:

point (array) – A numpy array in lat lon co-ordinates co-ordinates

Returns:

lat_lon – The cartesian coordinates

Return type:

array

get_building_info(building_index)[source]#

Get the information about a building such as perimeter, position, number of floors.

Parameters:

id (int) – Building ID

Returns:

A dictionary containing all the information about the building.

Return type:

dict

get_lat_lon_spawn_points(n_points=5)[source]#

Get the latitude and longitude spawn points

Parameters:

n_points (int, optional) – Number of points to random latitude and longitude points, by default 5

Returns:

An array of cartesian spawn points

Return type:

array

get_cartesian_node_position(node_index)[source]#

Get the cartesian co-ordinates given the node index

Parameters:

node_index (int) – The node index in the map

Returns:

The cartesian co-ordinates

Return type:

array

get_lat_lon_node_position(node_index)[source]#

Get the lat and lon given the node index

Parameters:

node_index (int) – The node index in the map

Returns:

The cartesian co-ordinates

Return type:

array

get_cartesian_spawn_points(n_points=5)[source]#

Get the cartesian spawn points

Parameters:

n_points (int, optional) – Number of points to random cartesian co-ordinates, by default 5

Returns:

An array of cartesian spawn points

Return type:

array

get_all_buildings()[source]#

Get all the buildings

Returns:

A dataframe with all the building information

Return type:

dataframe

get_transformation_matrix()[source]#

Get the transformation matrix to convert lat lon to cartesian

Returns:

The transformation matrix

Return type:

array