Skip to content

customized scripts of carla-autoware for my experiment

License

Notifications You must be signed in to change notification settings

kuriatsu/carla-autoware

Repository files navigation

ROS2/Autoware.universe bridge for CARLA simulator

This ros package enables autonomous driving using Autoware in addition to the basic function of the official ros-bridge package (communication between ros and carla)

control_carla_universe

Environment

ubuntu ros carla autoware
22.04 humble 0.9.13 universe/master

example

  • 11th Gen Intel® Core™ i7-11700F @ 2.50GHz × 16
  • GeForce RTX3070
  • 32GB mem

Setup

install

  • Autoware.Universe

  • CARLA Installation

  • carla-ros-bridge (this repo)

    mkdir -p colcon_ws/src
    cd colcon_ws/src
    git clone git@github.com:kuriatsu/carla-autoware.git --recursive
    rosdep install -i --from-paths src
  • autoware containts

    1. Download maps (y-axis inverted version) to arbitaly location
    2. Change names. (point_cloud/Town01.pcd -> Town01/pointcloud_map.pcd, vector_maps/lanelet2/Town01.osm -> Town01/lanelet2_map.osm)
  • Change file path at ros-bridge/carla_spawn_objects/carla_spawn_objects.py L49 as shown in first paragraph of Fix Log.

build

cd colcon_ws
colcon build --symlink-install

Run

  1. Run carla, change map, spawn object if you need
/opt/carla/CarlaUE4.sh
python3 /opt/carla/PythonAPI/util/config.py -m Town10
# optional
python3 /opt/carla/PythonAPI/examples/generate_traffic.py -n 10 -w 20
  1. Run ros nodes
ros2 launch carla_ros_bridge carla_ros_bridge_with_example_ego_vehicle.launch.py
ros2 launch carla_autoware carla_autoware.xml 
ros2 launch autoware_bridge autoware_launch.xml map_path:=<path-to-map-dir>/Town10 vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit
  1. Set initial pose
  2. Set goal position
  3. Wait for planning
  4. Engage (use web interface or Rviz plugin (AutowareStatePanel))

TODO

About

customized scripts of carla-autoware for my experiment

Resources

License

Stars

Watchers

Forks

Packages

No packages published