1、下载carla_ros_bridge并配置环境
bash
mkdir -p ~/carla-ros-bridge/catkin_ws/src
cd ~/carla-ros-bridge
git clone --recurse-submodules https://github.com/carla-simulator/ros-bridge.git catkin_ws/src/ros-bridge
source /opt/ros/noetic/setup.bash
cd catkin_ws
2、安装ros依赖项目
bash
rosdep update
rosdep install --from-paths src --ignore-src -r
3、激活anaconda环境
bash
conda activate carla37
4、安装conda依赖项目
bash
conda install-c conda-forge empy
5、安装python依赖项目
bash
pip install pyyaml
pip install opencv-python
pip install catkin_pkg
pip install rospkg -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pygame (0.9.10的carla版本建议装pygame的1.9.6版本)
6、编译ros包
bash
catkin build