Skip to content

Problem: Carla vehicle does not spawn via carla-ros-bridge #755

Open
@edfafde2

Description

@edfafde2

Environment:

Ubuntu 22.04

ROS 2 Humble

Carla 0.9.x (specify your exact version if known)

colcon build completes without any issues

Running Town05 map in Carla

I’m using Ubuntu 22.04 and ROS 2 Humble, and there were no issues during colcon build. I launched Carla and successfully connected carla-ros-bridge, but no vehicle is spawning. I used the standalone Carla simulator to find spawn coordinates in Town05 (at the red circle), then closed it and tried to spawn the vehicle through carla-ros-bridge, but nothing happened. In terminal #3, after [INFO] [carla_spawn_objects-1]: process started with pid [2471782], nothing else appears. Also, when I run ros2 run carla_manual_control carla_manual_control, only a black screen shows with no visuals, even though pygame starts correctly. What could be the issue and how can I fix it? Thank you.

term#1
imlab105@imlab105-TRX40-AORUS-PRO-WIFI:~/carla_simulator$ ./CarlaUE4.sh -prefernvidia
4.26.2-0+++UE4+Release-4.26 522 0
Disabling core dumps.

term#2
`mlab105@imlab105-TRX40-AORUS-PRO-WIFI:~/carla-ros-bridge/colcon_ws$ ros2 launch carla_ros_bridge carla_ros_bridge.launch.py

[INFO] [launch]: All log files can be found below /home/imlab105/.ros/log/2025-04-09-17-14-06-783974-imlab105-TRX40-AORUS-PRO-WIFI-2471259

[INFO] [launch]: Default logging verbosity is set to INFO

[INFO] [bridge-1]: process started with pid [2471260]

[bridge-1] [INFO] [1744186448.227847907] [carla_ros_bridge]: Trying to connect to localhost:2000

[bridge-1] [INFO] [1744186448.474041075] [carla_ros_bridge]: Loading town 'Town05' (previous: 'Carla/Maps/Town05').

[bridge-1] [INFO] [1744186450.905015279] [carla_ros_bridge]: synchronous_mode: True

[bridge-1] [INFO] [1744186450.905528447] [carla_ros_bridge]: fixed_delta_seconds: 0.05

[bridge-1] [INFO] [1744186450.973341276] [carla_ros_bridge]: Parameters:

[bridge-1] [INFO] [1744186450.973945639] [carla_ros_bridge]: host: localhost

[bridge-1] [INFO] [1744186450.974500968] [carla_ros_bridge]: port: 2000

[bridge-1] [INFO] [1744186450.975043512] [carla_ros_bridge]: timeout: 2

[bridge-1] [INFO] [1744186450.975599050] [carla_ros_bridge]: passive: False

[bridge-1] [INFO] [1744186450.976139730] [carla_ros_bridge]: synchronous_mode: True

[bridge-1] [INFO] [1744186450.976690740] [carla_ros_bridge]: synchronous_mode_wait_for_vehicle_control_command: False

[bridge-1] [INFO] [1744186450.977252441] [carla_ros_bridge]: fixed_delta_seconds: 0.05

[bridge-1] [INFO] [1744186450.977796658] [carla_ros_bridge]: register_all_sensors: True

[bridge-1] [INFO] [1744186450.978343160] [carla_ros_bridge]: town: Town05

[bridge-1] [INFO] [1744186450.978925240] [carla_ros_bridge]: ego_vehicle: {'role_name':
'heroego_vehiclehero0hero1hero2hero3hero4hero5hero6hero7hero8hero9'}

[bridge-1] [INFO] [1744186451.127942514] [carla_ros_bridge]: Created Traffic(id=256)`

term3#
`imlab105@imlab105-TRX40-AORUS-PRO-WIFI:~/carla-ros-bridge/colcon_ws$ ros2 launch carla_spawn_objects carla_spawn_objects.launch.py objects_definition_file:=/home/imlab105/carla-ros-bridge/colcon_ws/src/carla_ros/carla_spawn_objects/config/objects.json

[INFO] [launch]: All log files can be found below /home/imlab105/.ros/log/2025-04-09-17-15-20-523912-imlab105-TRX40-AORUS-PRO-WIFI-2471771

[INFO] [launch]: Default logging verbosity is set to INFO

[INFO] [carla_spawn_objects-1]: process started with pid [2471782]
`
objects.json

{ "objects": [ { "type": "sensor.pseudo.traffic_lights", "id": "traffic_lights" }, { "type": "sensor.pseudo.objects", "id": "objects" }, { "type": "sensor.pseudo.actor_list", "id": "actor_list" }, { "type": "sensor.pseudo.markers", "id": "markers" }, { "type": "sensor.pseudo.opendrive_map", "id": "map" }, { "type": "vehicle.tesla.model3", "id": "ego_vehicle", "role_name":"hero", "spawn_point": { "x": 85.0, "y": -4.0, "z": 0.3, "roll": 0.0, "pitch": 0.0, "yaw": 0.0 }, "sensors": [ { "type": "sensor.camera.rgb", "id": "rgb_front", "spawn_point": {"x": 2.0, "y": 0.0, "z": 2.0, "roll": 0.0, "pitch": 0.0, "yaw": 0.0}, "image_size_x": 800, "image_size_y": 600, "fov": 90.0 }, { "type": "sensor.camera.rgb", "id": "rgb_view", "spawn_point": {"x": -4.5, "y": 0.0, "z": 2.8, "roll": 0.0, "pitch": 20.0, "yaw": 0.0}, "image_size_x": 800, "image_size_y": 600, "fov": 90.0, "attached_objects": [ { "type": "actor.pseudo.control", "id": "control" } ] }, { "type": "sensor.lidar.ray_cast", "id": "lidar", "spawn_point": {"x": 0.0, "y": 0.0, "z": 2.4, "roll": 0.0, "pitch": 0.0, "yaw": 0.0}, "range": 50, "channels": 32, "points_per_second": 320000, "upper_fov": 2.0, "lower_fov": -26.8, "rotation_frequency": 20, "noise_stddev": 0.0 }, { "type": "sensor.lidar.ray_cast_semantic", "id": "semantic_lidar", "spawn_point": {"x": 0.0, "y": 0.0, "z": 2.4, "roll": 0.0, "pitch": 0.0, "yaw": 0.0}, "range": 50, "channels": 32, "points_per_second": 320000, "upper_fov": 2.0, "lower_fov": -26.8, "rotation_frequency": 20 }, { "type": "sensor.other.radar", "id": "radar_front", "spawn_point": {"x": 2.0, "y": 0.0, "z": 2.0, "roll": 0.0, "pitch": 0.0, "yaw": 0.0}, "horizontal_fov": 30.0, "vertical_fov": 10.0, "points_per_second": 1500, "range": 100.0 }, { "type": "sensor.camera.semantic_segmentation", "id": "semantic_segmentation_front", "spawn_point": {"x": 2.0, "y": 0.0, "z": 2.0, "roll": 0.0, "pitch": 0.0, "yaw": 0.0}, "fov": 90.0, "image_size_x": 400, "image_size_y": 70 }, { "type": "sensor.camera.depth", "id": "depth_front", "spawn_point": {"x": 2.0, "y": 0.0, "z": 2.0, "roll": 0.0, "pitch": 0.0, "yaw": 0.0}, "fov": 90.0, "image_size_x": 400, "image_size_y": 70 }, { "type": "sensor.camera.dvs", "id": "dvs_front", "spawn_point": {"x": 2.0, "y": 0.0, "z": 2.0, "roll": 0.0, "pitch": 0.0, "yaw": 0.0}, "fov": 90.0, "image_size_x": 400, "image_size_y": 70, "positive_threshold": 0.3, "negative_threshold": 0.3, "sigma_positive_threshold": 0.0, "sigma_negative_threshold": 0.0, "use_log": true, "log_eps": 0.001 }, { "type": "sensor.other.gnss", "id": "gnss", "spawn_point": {"x": 1.0, "y": 0.0, "z": 2.0}, "noise_alt_stddev": 0.0, "noise_lat_stddev": 0.0, "noise_lon_stddev": 0.0, "noise_alt_bias": 0.0, "noise_lat_bias": 0.0, "noise_lon_bias": 0.0 }, { "type": "sensor.other.imu", "id": "imu", "spawn_point": {"x": 2.0, "y": 0.0, "z": 2.0, "roll": 0.0, "pitch": 0.0, "yaw": 0.0}, "noise_accel_stddev_x": 0.0, "noise_accel_stddev_y": 0.0, "noise_accel_stddev_z": 0.0, "noise_gyro_stddev_x": 0.0, "noise_gyro_stddev_y": 0.0, "noise_gyro_stddev_z": 0.0, "noise_gyro_bias_x": 0.0, "noise_gyro_bias_y": 0.0, "noise_gyro_bias_z": 0.0 }, { "type": "sensor.other.collision", "id": "collision", "spawn_point": {"x": 0.0, "y": 0.0, "z": 0.0} }, { "type": "sensor.other.lane_invasion", "id": "lane_invasion", "spawn_point": {"x": 0.0, "y": 0.0, "z": 0.0} }, { "type": "sensor.pseudo.tf", "id": "tf" }, { "type": "sensor.pseudo.objects", "id": "objects" }, { "type": "sensor.pseudo.odom", "id": "odometry" }, { "type": "sensor.pseudo.speedometer", "id": "speedometer" }, { "type": "actor.pseudo.control", "id": "control" } ] } ] }

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions