autoware.auto中ros2编译官方examples包(autoware.auto lesson02 demo)

环境

Ubuntu20.04 ros2 foxy (Autoware.auto容器中)

        注:如果你是其他版本的ros2,下面的命令中就将foxy修改为对应的版本(如dashing)

安装ros2相关功能包
ade start
ade enter
source /opt/ros/foxy/setup.bash
sudo apt update
sudo apt install ros-foxy-turtlesim
sudo apt install ros-foxy-rqt-*
sudo apt-install byobu
下载官方的examples并进行编译
source /opt/ros/foxy/setup.bash
mkdir -p ~/ros2_example_ws/src
cd ~/ros2_example_ws
git clone https://github.com/ros2/examples src/examples -b foxy
cd ~/ros2_example_ws/src/examples/
cd ~/ros2_example_ws
colcon build --symlink-install

        然后你会发现编译失败:project has asked CMake to find a package configuration file provided by "example_interfaces", but CMake did not find one,找不到example_interfaces包

        需要去下载该功能包:

cd ~/adehome/AutowareAuto/
ade enter
cd ros2_example_ws/src/
git clone https://github.com/ros2/example_interfaces.git

         注意:要将该功能包放在src目录下(与examples同级)

        然后再次进行编译即可

然后autoware.auto官网上的lesson02上的demo就都可以跑了,注意得先source ~/ros2_example_ws/install/setup.bash

     
  • 12
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值