chengkaiqiang 6213262140 v-0.1.1-1:20240806 | 3 maanden geleden | |
---|---|---|
.. | ||
carla_autoware_bridge | 3 maanden geleden | |
docs | 3 maanden geleden | |
README.md | 3 maanden geleden |
Integration of the CARLA simulator
System requirements for running CARLA.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 304F9BC29914A77D &&
sudo add-apt-repository "deb [arch=amd64 trusted=yes] http://dist.carla.org/carla-0.9.8/ all main"
sudo apt install carla-simulator
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA0F9B7406F60E23
sudo add-apt-repository "deb [arch=amd64 trusted=yes] http://dist.carla.org/carla-hdmaps/ bionic main"
sudo apt install carla-hdmaps
The CARLA ROS bridge package aims at providing a simple ROS bridge for CARLA simulator.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 81061A1A042F527D &&
sudo add-apt-repository "deb [arch=amd64 trusted=yes] http://dist.carla.org/carla-ros-bridge-melodic/ bionic main"
sudo apt install carla-ros-bridge-melodic
To run Autoware within CARLA please use the following execution order:
You need two terminals:
#Terminal 1
cd /opt/carla/bin
./CarlaUE4.sh
For details, please refer to the CARLA documentation.
#Terminal 2
export CARLA_MAPS_PATH=/opt/carla/HDMaps/
source /opt/carla-ros-bridge/$ROS_DISTRO/setup.bash
source ~/autoware.ai/install/setup.bash
roslaunch carla_autoware_bridge carla_autoware_bridge_with_manual_control.launch
You can run Autoware and CARLA on different machines. To let the CARLA Autoware bridge connect to a remote CARLA Server, execute roslaunch with the following parameters
roslaunch host:=<hostname> port:=<port number> carla_autoware_bridge carla_autoware_bridge_with_manual_control.launch
The setup of the sensors is defined within sensors.json.
carla_ego_vehicle reads the file and spawn the ego vehicle and the sensors. The spawn point can be specified by a launch file argument, otherwise a random one is used.
The ROS node carla_manual_control is used to visualize the simulation (from an ego perspective). It is completely optional.
By pressing B
it is possible to override the steering that is received by Autoware.
Routes are provided by carla_waypoint_publisher. It is possible to specify a goal with RVIZ or by publishing to a topic.
You can skip the Autoware perception by using the ground truth objects from CARLA. Therefore disable all relevant Autware perception nodes and execute:
rosrun carla_autoware_bridge carla_to_autoware_detected_objects
The objects get then published to /tracked_objects
.
There are additional nodes available in the CARLA ROS bridge repo. Please have a look here.
Beside several ROS-only nodes, the bridge contains three CARLA Clients.
It is possible to use CARLA scenario runner in conjunction with Autoware: Documentation.