赞
踩
版本要求:
CARLA Simulator 0.9.15 release
Autoware Universe (Release 2023.10)!!!!必须
Python 3.10
ROS2 Humble
OpenPlanner.Universe
Linux 22.04
#下载安装carla 0.9.13或者0.9.15
https://github.com/carla-simulator/carla/releases
#下载linux系统下,对应python版本的egg文件
https://github.com/gezp/carla_ros/releases/
#将 egg 文件添加到对应文件夹:../CARLA_0.9.15/PythonAPI/carla/dist下
#注意本内容分支过新可能会随时间变化,关注git作者获取最新链接
cd ~/autoware
mkdir op_carla && cd op_carla/
git clone https://github.com/hatem-darweesh/op_bridge.git -b ros2-humble
git clone https://github.com/hatem-darweesh/op_agent.git -b ros2-humble
git clone https://github.com/hatem-darweesh/scenario_runner.git
chmod -R a+x ~/autoware/op_carla
pip install py_trees
pip install networkx
pip install tabulate
pip install transforms3d
cd ~/autoware/src/param/autoware_individual_params/individual_params/config/default
mkdir carla_sensor_kit
把~/autoware/src/universe/external/open_planner/op_carla_bridge/carla_sensor_kit_launch/carla_sensor_kit_description/config
下的所有文件copy到下面目录
~/autoware/src/param/autoware_individual_params/individual_params/config/default/carla_sensor_kit
打开 op_carla/op_agent/start_ros2.sh
#16行替换成下面,主要是修改地图位置路径
ros2 launch ${OP_AGENT_ROOT}/autoware_carla_launch/carla_simulator.launch.xml map_path:=$HOME/autoware/map_data/$map_name vehicle_model:=sample_vehicle sensor_model:=carla_sensor_kit
打开op_carla/op_bridge/op_scripts/run_exploration_mode_ros2.sh
#修改33、34行,改成zsh的脚本
#打开zshrc,根据实际位置调节
export AUTOWARE_ROOT=/home/user/carla/autoware
export CARLA_ROOT=/home/user/carla/CARLA_0.9.15
export SCENARIO_RUNNER_ROOT=/home/user/carla/scenario_runner
export OP_BRIDGE_ROOT=/home/user/carla/op_bridge
export OP_AGENT_ROOT=/home/user/carla/op_agent
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/util
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/agents
export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.15-py3.10-linux-x86_64.egg
#我的配置,仅供参考
alias carlaEnv='export AUTOWARE_ROOT=~/autoware && export CARLA_ROOT=/mnt/d/CARLA_0.9.13/WindowsNoEditor && export SCENARIO_RUNNER_ROOT=~/autoware/op_carla/scenario_runner && export OP_BRIDGE_ROOT=~/autoware/op_carla/op_bridge && export OP_AGENT_ROOT=~/autoware/op_carla/op_agent && export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI && export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/util && export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla && export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/agents && export PYTHONPATH=$PYTHONPATH:${CARLA_ROOT}/PythonAPI/carla/dist/carla-0.9.13-py3.10-linux-x86_64.egg'
# 首先windows系统打开carla
#source刷新autoware资源
. ~/autoware/op_carla/op_bridge/op_scripts/run_exploration_mode_ros2.sh
bug1
[10] 543589 segmentation fault python3 ${OP_BRIDGE_ROOT}/op_bridge/op_bridge_ros2.py
解决方案
python -X faulthandler op_bridge_ros2.py
#检查错误
pip install py_trees
pip install networkx
pip install tabulate
pip install transforms3d
#[INFO] [1703646661.523387867] [rviz2]: Stereo is NOT SUPPORTED
#更新OpenGL 其实也可以忽略,不好处理
sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt update && sudo apt upgrade
bug2
./run_exploration_mode_ros2.sh: 31: gnome-terminal: not found
解决方法
sudo apt install gnome-terminal
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。