Skip to content

Commit a86f256

Browse files
committed
Add default continuous action spaces and update docs
1 parent 22b6b6a commit a86f256

6 files changed

Lines changed: 20 additions & 10 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ The following table shows the overall performance metrics over different CarDrea
107107

108108
CarDreamer enables the customization of different levels of observability. The table below highlights performance metrics under different observability settings, including full observability, field-of-view (FOV), and recursive field-of-view (SFOV). These settings allow agents to operate with varying degrees of environmental awareness, impacting their ability to plan and execute maneuvers effectively.
109109

110+
Check out [common.yaml](https://github.com/ucd-dare/CarDreamer/blob/master/car_dreamer/configs/common.yaml) for different birdeye observability and entity settings. The entity settings allow users to determine whether to render, for example, background vehicle intentions (planned trajectories), ego vechile intentions (planned trajectories), and transmission errors for intention sharing.
111+
110112
| Observability Performance Metrics |
111113
| :-------------------------------: |
112114
| ![Observability Performance](https://ucd-dare.github.io/cardreamer.github.io/static/images/tables/observability_performance.png) |

car_dreamer/configs/common.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ env:
33

44
world:
55
carla_port: 2000
6-
town: "Town04" # which town to simulate
6+
town: "Town04" # which town map to use
77
actor_active_distance: 100
88
fixed_delta_seconds: 0.1
99
auto_lane_change: True
@@ -161,7 +161,10 @@ env:
161161
image_size: 512
162162

163163
action:
164-
discrete: True # whether to use discrete control space
164+
discrete: False
165+
# Discrete control space. Use continuos_acc and continuous_steer if discrete is False
165166
discrete_acc: [-2.0, 0.0, 2.0] # discrete value of accelerations
166167
discrete_steer: [-0.6, -0.2, 0.0, 0.2, 0.6] # discrete value of steering angles
167-
n_commands: 3 # number of text commands
168+
continuous_acc: [-3.0, 3.0] # continuous value of accelerations
169+
continuous_steer: [-1.0, 1.0] # continuous value of steering angles
170+
n_commands: 3 # number of text commands for message handler

car_dreamer/configs/tasks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ carla_stop_sign:
379379
decoder.cnn_keys: "birdeye_with_traffic_lights"
380380
decoder.cnn_kernels: [5, 5, 5, 6, 6]
381381
train.log_keys_video: [camera, birdeye_with_traffic_lights]
382+
382383
carla_follow:
383384
env:
384385
world:
@@ -403,7 +404,6 @@ carla_follow:
403404
distance: 2.0
404405
}
405406

406-
407407
terminal:
408408
time_limit: 500 # maximum timesteps per episode
409409
out_lane_thres: 5 # threshold for out of lane

car_dreamer/toolkit/observer/handlers/renderer/constants.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ class Color:
7474

7575

7676
class BirdeyeEntity(Enum):
77-
ROADMAP = "roadmap"
77+
ROADMAP = "roadmap" # Roadmap obtained from CARLA map topology
7878
EGO_VEHICLE = "ego_vehicle"
7979
BACKGROUND_VEHICLES = "background_vehicles"
80-
FOV_LINES = "fov_lines"
81-
WAYPOINTS = "waypoints"
82-
BACKGROUND_WAYPOINTS = "background_waypoints"
80+
FOV_LINES = "fov_lines" # Field of view lines that indicate the visibility of the ego vehicle
81+
WAYPOINTS = "waypoints" # Waypoints that indicate the path of the ego vehicle
82+
BACKGROUND_WAYPOINTS = "background_waypoints" # Waypoints (intentions) of the background vehicles
8383
TRAFFIC_LIGHTS = "traffic_lights"
8484
STOP_SIGNS = "stop_signs"
8585
MESSAGES = "messages"
86-
ERROR_BACKGROUND_WAYPOINTS = "error_background_waypoints"
86+
ERROR_BACKGROUND_WAYPOINTS = "error_background_waypoints" # Waypoints that may have transmission errors

docs/source/tasks.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ Here is the descriptions of some common configurations in ``car_dreamer/configs/
101101
If ``True``, ``len(discrete_acc) * len(discrete_steer)`` is the size of the action space.
102102
* ``discrete_acc`` (default: ``[-2.0, 0.0, 2.0]``): the discrete values for acceleration.
103103
* ``discrete_steer`` (default: ``[-0.6, -0.2, 0.0, 0.2, 0.6]``): the discrete values for steering.
104+
* ``continuous_acc`` (default: ``[-3.0, 3.0]``): the continuous value range for acceleration.
105+
* ``continuous_steer`` (default: ``[-1.0, 1.0]``): the continuous value range for steering.
104106

105107
Tasks and Environments
106108
--------------------------
@@ -147,5 +149,8 @@ Here is a list of available environments and their supported tasks and configura
147149
.. autoclass:: car_dreamer.CarlaTrafficLightsEnv
148150
:show-inheritance:
149151

152+
.. autoclass:: car_dreamer.CarlaFollowEnv
153+
:show-inheritance:
154+
150155
.. note::
151156
All configurations mentioned here can also be changed by command line arguments. For example, to change the port number of the CARLA server, you can pass ``--env.world.carla_port <number>``. See :py:func:`car_dreamer.create_task` for more details.

dreamerv3/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ matplotlib==3.8.4
2222
tabulate==0.9.0
2323
msgpack
2424
zmq
25-
einops
25+
einops

0 commit comments

Comments
 (0)