栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

ubuntu18.04 安装 ros2 foxy

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ubuntu18.04 安装 ros2 foxy

安装 colcon and vcs

sudo apt update && sudo apt install -y  build-essential

sudo apt install -y git cmake python3-pip

pip install -U colcon-common-extensions vcstool

添加环境变量,让终端可以直接执行colcon和vcs

vi ~/.bashrc

添加到末尾

export PATH=$PATH:~/.local/bin/
source ~/.bashrc

Get ros2 foxy repo

下载源码

mkdir -p ~/ros2_foxy/src
cd ~/ros2_foxy
wget https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos
vcs import src < ros2.repos
Download OGRE

下载rviz依赖

https://github.com/OGRECave/ogre/archive/v1.12.1.zip

unzip to ~/ros2_foxy

On linux you additionally need the following system headers to build the GL & GLES2 RenderSystems (command for Ubuntu):

sudo apt-get install libgles2-mesa-dev

furthermore we recommend installing the following optional packages

sudo apt-get install libsdl2-dev libxt-dev libxaw7-dev doxygen
Build ros2

安装编译依赖

pip3 install lark numpy

sudo apt-get install python3-pyqt5 pyqt5-dev-tools qttools5-dev-tools

sudo apt-get install python3-sip-dev

编译

cd ~/ros2_foxy/
colcon build --symlink-install
环境激活
. ~/ros2_foxy/install/local_setup.bash
测试

启动 C++ talker:

. ~/ros2_foxy/install/local_setup.bash
ros2 run demo_nodes_cpp talker

启动 Python listener:

. ~/ros2_foxy/install/local_setup.bash
ros2 run demo_nodes_py listener

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/307333.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号