Skip to content

Commit dbfb784

Browse files
committed
added additional readme and fixed objects.json
1 parent a7c442a commit dbfb784

File tree

5 files changed

+16
-27
lines changed

5 files changed

+16
-27
lines changed

simulator/carla_autoware/README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Thanks to <https://github.com/gezp> for ROS2 Humble support for CARLA Communication.
66
This ros package enables communication between Autoware and CARLA for autonomous driving simulation.
77

8-
# Environment
8+
# Supported Environment
99

1010
| ubuntu | ros | carla | autoware |
1111
| :----: | :----: | :----: | :------: |
@@ -26,7 +26,7 @@ This ros package enables communication between Autoware and CARLA for autonomous
2626
2. Change names and create the map folder (example: Town01) inside `autoware_map`. (`point_cloud/Town01.pcd` -> `autoware_map/Town01/pointcloud_map.pcd`, `vector_maps/lanelet2/Town01.osm`-> `autoware_map/Town01/lanelet2_map.osm`)
2727
3. Create `map_projector_info.yaml` and add `projector_type: local` on the first line.
2828

29-
## build
29+
## Build
3030

3131
```bash
3232
cd colcon_ws
@@ -45,7 +45,7 @@ cd CARLA
4545
2. Run ros nodes
4646

4747
```bash
48-
ros2 launch autoware_launch e2e_simulator.launch.xml map_path:=$HOME/autoware_map/Town01 vehicle_model:=sample_vehicle sensor_model:=awsim_sensor_kit simulator_type:=carla
48+
ros2 launch autoware_launch e2e_simulator.launch.xml map_path:=$HOME/autoware_map/Town01 vehicle_model:=sample_vehicle sensor_model:=awsim_sensor_kit simulator_type:=carla carla_map:=Town01
4949
```
5050

5151
3. Set initial pose (Init by GNSS)
@@ -57,3 +57,11 @@ ros2 launch autoware_launch e2e_simulator.launch.xml map_path:=$HOME/autoware_ma
5757

5858
- If you want to edit the sensors configuration used in CARLA, edit `objects.json` located in `carla_autoware/config`. Make sure the sensor configuration is the same as the `sensor_kit` description used in Autoware.
5959
- Misalignment might occurs during initialization, pressing `init by gnss` button should fix it.
60+
- Sensor frequency can be changed on `carla_ros.py` Line 67.
61+
- Changing the `fixed_delta_seconds` can increase the simulation tick (clock), some sensors params in `objects.json` need to be adjusted when it is changed (example: LIDAR rotation frequency have to match the FPS).
62+
63+
# Known Issues and Future Works
64+
65+
- Testing on procedural map (Adv Digital Twin).
66+
- Automatic sensor configuration of the CARLA sensors from the Autoware sensor kit.
67+
- Traffic light recognition.

simulator/carla_autoware/config/objects.json

-19
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,6 @@
1515
"image_size_y": 360,
1616
"fov": 90.0
1717
},
18-
{
19-
"type": "sensor.lidar.ray_cast",
20-
"id": "left",
21-
"spawn_point": {
22-
"x": 0.0,
23-
"y": 0.0,
24-
"z": 4.6,
25-
"roll": 0.0,
26-
"pitch": 0.0,
27-
"yaw": 0.0
28-
},
29-
"range": 50,
30-
"channels": 32,
31-
"points_per_second": 100000,
32-
"upper_fov": 3.0,
33-
"lower_fov": -27.0,
34-
"rotation_frequency": 20,
35-
"noise_stddev": 0.0
36-
},
3718
{
3819
"type": "sensor.lidar.ray_cast",
3920
"id": "top",

simulator/carla_autoware/launch/carla_autoware.launch.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<arg name="ego_vehicle_role_name" default="ego_vehicle"/>
66
<arg name="vehicle_type" default="vehicle.toyota.prius"/>
77
<arg name="spawn_point" default="None"/>
8-
<arg name="carla_map_name" default="Town01"/>
8+
<arg name="carla_map" default="Town01"/>
99
<arg name="passive" default="False"/>
1010
<arg name="sync_mode" default="True"/>
1111
<arg name="fixed_delta_seconds" default="0.05" description="Timestep for CARLA, FPS=1/value"/>
@@ -20,7 +20,7 @@
2020
<param name="timeout" value="$(var timeout)"/>
2121
<param name="sync_mode" value="$(var sync_mode)"/>
2222
<param name="fixed_delta_seconds" value="$(var fixed_delta_seconds)"/>
23-
<param name="carla_map_name" value="$(var carla_map_name)"/>
23+
<param name="carla_map" value="$(var carla_map)"/>
2424
<param name="ego_vehicle_role_name" value="$(var ego_vehicle_role_name)"/>
2525
<param name="spawn_point" value="$(var spawn_point)"/>
2626
<param name="vehicle_type" value="$(var vehicle_type)"/>

simulator/carla_autoware/src/carla_autoware/carla_autoware.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def __init__(self):
6666
self.timeout = self.param_["timeout"]
6767
self.sync_mode = self.param_["sync_mode"]
6868
self.fixed_delta_seconds = self.param_["fixed_delta_seconds"]
69-
self.map_name = self.param_["carla_map_name"]
69+
self.map_name = self.param_["carla_map"]
7070
self.agent_role_name = self.param_["ego_vehicle_role_name"]
7171
self.vehicle_type = self.param_["vehicle_type"]
7272
self.spawn_point = self.param_["spawn_point"]

simulator/carla_autoware/src/carla_autoware/carla_ros.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def setup(self):
8888
"sync_mode": rclpy.Parameter.Type.BOOL,
8989
"timeout": rclpy.Parameter.Type.INTEGER,
9090
"fixed_delta_seconds": rclpy.Parameter.Type.DOUBLE,
91-
"carla_map_name": rclpy.Parameter.Type.STRING,
91+
"carla_map": rclpy.Parameter.Type.STRING,
9292
"ego_vehicle_role_name": rclpy.Parameter.Type.STRING,
9393
"spawn_point": rclpy.Parameter.Type.STRING,
9494
"vehicle_type": rclpy.Parameter.Type.STRING,
@@ -144,7 +144,7 @@ def setup(self):
144144
self.id_to_sensor_type_map[sensor["id"]] = sensor["type"]
145145
if sensor["type"] == "sensor.camera.rgb":
146146
self.pub_camera = self.ros2_node.create_publisher(
147-
Image, "/perception/traffic_light_recognition/traffic_light/debug/rois", 1
147+
Image, "/sensing/camera/traffic_light/image_raw", 1
148148
)
149149
self.pub_camera_info = self.ros2_node.create_publisher(
150150
CameraInfo, "/sensing/camera/traffic_light/camera_info", 1

0 commit comments

Comments
 (0)