美文网首页
三、安装ROS2 via Debian Packages

三、安装ROS2 via Debian Packages

作者: wolegeyun | 来源:发表于2017-12-18 16:37 被阅读39次

1,

sudo apt update && sudo apt install curl

curl http://repo.ros2.org/repos.key | sudo apt-key add -

sudo sh -c 'echo "deb [arch=amd64,arm64] http://repo.ros2.org/ubuntu/main xenial main" > /etc/apt/sources.list.d/ros2-latest.list'

2,

sudo apt update

sudo apt install `apt list ros-ardent-* 2> /dev/null | grep "/" | awk -F/ '{print $1}' | grep -v -e ros-ardent-ros1-bridge -e ros-ardent-turtlebot2- | tr "\n" " "`

3,

source /opt/ros/ardent/setup.bash

4,测试

In one terminal, start a node (written in C++) that will publish messages on a topic.

ros2 run demo_nodes_cpp talker

In another terminal, start a second node (written in Python) that will subscribe to messages on the same topic.

ros2 run demo_nodes_py listener

You should see that these nodes discover each other automatically, and begin to exchange messages.

相关文章

网友评论

      本文标题:三、安装ROS2 via Debian Packages

      本文链接:https://www.haomeiwen.com/subject/yksdwxtx.html