shasta.core#

Module Contents#

Classes#

ShastaCore

Class responsible of handling all the different CARLA functionalities,

Functions#

kill_all_servers()

Kill all PIDs that start with Carla

kill_all_servers()[source]#

Kill all PIDs that start with Carla

class ShastaCore(config, actor_groups: dict = None)[source]#

Class responsible of handling all the different CARLA functionalities, such as server-client connecting, actor spawning, and getting the sensors data.

_setup_physics_client()[source]#

Setup the physics client

Return type:

None

get_physics_client()[source]#

Ge the physics client

Returns:

The bullet physics client

Return type:

object

init_server()[source]#

Start a server on a random port

setup_experiment(experiment_config)[source]#

Initialize the hero and sensors

get_world()[source]#

Get the World object from the simulation

Returns:

The world object

Return type:

object

get_map()[source]#

Get the Map object from the simulation

Returns:

The map object

Return type:

object

reset()[source]#

This function resets / spawns the hero vehicle and its sensors

spawn_actors()[source]#

Spawns vehicles and walkers, also setting up the Traffic Manager and its parameters

get_actor_groups()[source]#

Get the actor groups

Returns:

The actor groups as a dict with group id as the key list of actors as the value

Return type:

dict

get_actors_by_group_id(group_id)[source]#

Get a list of actor given by group id

Parameters:

group_id (int) – Group id to be returned

Returns:

A list of actor given the group id

Return type:

list

tick()[source]#

Performs one tick of the simulation, moving all actors, and getting the sensor data

close_simulation()[source]#

Close the simulation