Documentation for Agents¤
Agent
¤
Abstract Agent class that define the minimum of a ROAR agent.
Inherited agent can perform different duties.
__init__(self, vehicle, agent_settings, imu=None)
special
¤
Initialize cameras, output folder, and logging utilities
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vehicle |
Vehicle |
Vehicle instance |
required |
agent_settings |
AgentConfig |
User specified settings for Agent |
required |
imu |
Optional[ROAR_simulation.roar_autonomous_system.utilities_module.data_structures_models.IMUData] |
IMU data (will be deprecated to be passed in like this) |
None |
Source code in ROAR_simulation/roar_autonomous_system/agent_module/agent.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
init_cam(self)
¤
Initialize the cameras by calculating the camera intrinsics and ensuring that the output folder path exists
Returns:
Type | Description |
---|---|
None |
None |
Source code in ROAR_simulation/roar_autonomous_system/agent_module/agent.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|
run_step(self, sensors_data, vehicle)
¤
Receive Sensor Data and vehicle state information on every step and return a control
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sensors_data |
SensorsData |
sensor data on this frame |
required |
vehicle |
Vehicle |
vehicle state on this frame |
required |
Returns:
Type | Description |
---|---|
VehicleControl |
Vehicle Control |
Source code in ROAR_simulation/roar_autonomous_system/agent_module/agent.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
save_sensor_data(self)
¤
Failure-safe saving function that saves all the sensor data of the current frame
Returns:
Type | Description |
---|---|
None |
None |
Source code in ROAR_simulation/roar_autonomous_system/agent_module/agent.py
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
|
sync_data(self, sensors_data, vehicle)
¤
Sync agent's state by updating Sensor Data and vehicle information
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sensors_data |
SensorsData |
the new frame's sensor data |
required |
vehicle |
Vehicle |
the new frame's vehicle state |
required |
Returns:
Type | Description |
---|---|
None |
None |
Source code in ROAR_simulation/roar_autonomous_system/agent_module/agent.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|