Skip to content

Commit

Permalink
Add default continuous action spaces and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gaodechen committed Mar 5, 2025
1 parent 22b6b6a commit a86f256
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ The following table shows the overall performance metrics over different CarDrea

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.

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.

| Observability Performance Metrics |
| :-------------------------------: |
| ![Observability Performance](https://ucd-dare.github.io/cardreamer.github.io/static/images/tables/observability_performance.png) |
Expand Down
9 changes: 6 additions & 3 deletions car_dreamer/configs/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ env:

world:
carla_port: 2000
town: "Town04" # which town to simulate
town: "Town04" # which town map to use
actor_active_distance: 100
fixed_delta_seconds: 0.1
auto_lane_change: True
Expand Down Expand Up @@ -161,7 +161,10 @@ env:
image_size: 512

action:
discrete: True # whether to use discrete control space
discrete: False
# Discrete control space. Use continuos_acc and continuous_steer if discrete is False
discrete_acc: [-2.0, 0.0, 2.0] # discrete value of accelerations
discrete_steer: [-0.6, -0.2, 0.0, 0.2, 0.6] # discrete value of steering angles
n_commands: 3 # number of text commands
continuous_acc: [-3.0, 3.0] # continuous value of accelerations
continuous_steer: [-1.0, 1.0] # continuous value of steering angles
n_commands: 3 # number of text commands for message handler
2 changes: 1 addition & 1 deletion car_dreamer/configs/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ carla_stop_sign:
decoder.cnn_keys: "birdeye_with_traffic_lights"
decoder.cnn_kernels: [5, 5, 5, 6, 6]
train.log_keys_video: [camera, birdeye_with_traffic_lights]

carla_follow:
env:
world:
Expand All @@ -403,7 +404,6 @@ carla_follow:
distance: 2.0
}


terminal:
time_limit: 500 # maximum timesteps per episode
out_lane_thres: 5 # threshold for out of lane
Expand Down
10 changes: 5 additions & 5 deletions car_dreamer/toolkit/observer/handlers/renderer/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ class Color:


class BirdeyeEntity(Enum):
ROADMAP = "roadmap"
ROADMAP = "roadmap" # Roadmap obtained from CARLA map topology
EGO_VEHICLE = "ego_vehicle"
BACKGROUND_VEHICLES = "background_vehicles"
FOV_LINES = "fov_lines"
WAYPOINTS = "waypoints"
BACKGROUND_WAYPOINTS = "background_waypoints"
FOV_LINES = "fov_lines" # Field of view lines that indicate the visibility of the ego vehicle
WAYPOINTS = "waypoints" # Waypoints that indicate the path of the ego vehicle
BACKGROUND_WAYPOINTS = "background_waypoints" # Waypoints (intentions) of the background vehicles
TRAFFIC_LIGHTS = "traffic_lights"
STOP_SIGNS = "stop_signs"
MESSAGES = "messages"
ERROR_BACKGROUND_WAYPOINTS = "error_background_waypoints"
ERROR_BACKGROUND_WAYPOINTS = "error_background_waypoints" # Waypoints that may have transmission errors
5 changes: 5 additions & 0 deletions docs/source/tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ Here is the descriptions of some common configurations in ``car_dreamer/configs/
If ``True``, ``len(discrete_acc) * len(discrete_steer)`` is the size of the action space.
* ``discrete_acc`` (default: ``[-2.0, 0.0, 2.0]``): the discrete values for acceleration.
* ``discrete_steer`` (default: ``[-0.6, -0.2, 0.0, 0.2, 0.6]``): the discrete values for steering.
* ``continuous_acc`` (default: ``[-3.0, 3.0]``): the continuous value range for acceleration.
* ``continuous_steer`` (default: ``[-1.0, 1.0]``): the continuous value range for steering.

Tasks and Environments
--------------------------
Expand Down Expand Up @@ -147,5 +149,8 @@ Here is a list of available environments and their supported tasks and configura
.. autoclass:: car_dreamer.CarlaTrafficLightsEnv
:show-inheritance:

.. autoclass:: car_dreamer.CarlaFollowEnv
:show-inheritance:

.. note::
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.
2 changes: 1 addition & 1 deletion dreamerv3/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ matplotlib==3.8.4
tabulate==0.9.0
msgpack
zmq
einops
einops

0 comments on commit a86f256

Please sign in to comment.