當(dāng)前位置:首頁(yè) > IT技術(shù) > 其他 > 正文

ROS2Swarm群機(jī)器人案例(Dashing+Foxy)
2022-05-11 10:58:54


ROS2Swarm群機(jī)器人案例(Dashing+Foxy)_啟動(dòng)腳本


REFERENCES

[1] H. Hamann, Swarm Robotics: A Formal Approach. Cham: Springer International Publishing, 2018.

[2] I. A. D. Nesnas, R. Simmons, D. Gaines, C. Kunz, A. Diaz-Calderon, T. Estlin, R. Madison, J. Guineau, M. McHenry, I.-H. Shu, and D. Apfelbaum, “CLARAty: Challenges and steps toward reusable robotic software,” International Journal of Advanced Robotic Systems, vol. 3, no. 1, p. 5, 2006.

[3] C. Pinciroli and G. Beltrame, “Buzz: a programming language for robot swarms,” IEEE Software, vol. 33, no. 4, pp. 97–100, 2016.

[4] M. Quigley, J. Faust, T. Foote, and J. Leibs, “ROS: an open-source Robot Operating System,” in ICRA workshop on open source software, vol. 3, no. 3.2. Kobe, Japan, 2009, p. 5.

[5] M. Dorigo, G. Theraulaz, and V. Trianni, “Swarm robotics: Past, present, and future [point of view],” Proceedings of the IEEE, vol. 109, no. 7, pp. 1152–1165, 2021.

[6] Y. Maruyama, S. Kato, and T. Azumi, “Exploring the performance of ROS2,” in 2016 International Conference on Embedded Software (EMSOFT), 2016, pp. 1–10.

[7] A. Barcis, M. Barci ′ s, and C. Bettstetter, “Robots that Sync and Swarm: ′ A proof of concept in ROS 2,” in 2019 International Symposium on Multi-Robot and Multi-Agent Systems (MRS), 2019, pp. 98–104.

[8] A. Barcis and C. Bettstetter, “Sandsbots: Robots that sync and swarm,” ′ IEEE Access, vol. 8, pp. 218 752–218 764, 2020.

[9] A. Testa, A. Camisa, and G. Notarstefano, “ChoiRbot: A ROS 2 toolbox for cooperative robotics,” IEEE Robotics and Automation Letters, vol. 6, no. 2, pp. 2714–2720, 2021.

[10] J. P. Queralta, Y. Xianjia, L. Qingqing, and T. Westerlund, “Towards large-scale scalable MAV swarms with ROS2 and UWB-based situated communication.”

[11] T. De Wolf and T. Holvoet, “Design patterns for decentralised coordination in self-organising emergent systems,” in Proceedings of the 4th International Conference on Engineering Self-Organising Systems, ser. ESOA’06. Berlin, Heidelberg: Springer-Verlag, 2006, p. 28–49.

[12] J. L. Fernandez-Marquez, G. Di Marzo Serugendo, S. Montagna, M. Viroli, and J. L. Arcos, “Description and composition of bioinspired design patterns: a complete overview,” Natural Computing, vol. 12, no. 1, pp. 43–67, Mar. 2013.

[13] L. Pitonakova, R. Crowder, and S. Bullock, “Information exchange design patterns for robot swarm foraging and their application in robot control algorithms,” Frontiers in Robotics and AI, vol. 5, p. 47, 2018.

[14] D. St-Onge, V. S. Varadharajan, I. Svogor, and G. Beltrame, “From ˇ design to deployment: Decentralized coordination of heterogeneous robotic teams,” Frontiers in Robotics and AI, vol. 7, p. 51, 2020.

[15] C. Xuefeng, C. Zhongxuan, W. Yanzhen, and Y. Xiaodong, “micros swarm framework - ROS Wiki,” 2019. [Online]. Available: https://wiki.ros.org/micros swarm framework

[16] K. Morris, G. Arpino, S. Nagavalli, and K. Sycara, “Full stack swarm architecture,” RISS Working Papers Journal, 2018.

[17] C.-E. Hrabia, T. K. Kaiser, and S. Albayrak, “Combining selforganisation with decision-making and planning,” in Multi-Agent Systems and Agreement Technologies, F. Belardinelli and E. Argente, Eds. Cham: Springer International Publishing, 2018, pp. 385–399.

[18] V. C. Kalempa, M. A. S. Teixeira, A. S. de Oliveira, and J. A. Fabro, “Intelligent dynamic formation of the multi-robot systems to cleaning tasks in unstructured environments and with a single perception system,” in 2018 Latin American Robotic Symposium, 2018 Brazilian Symposium on Robotics (SBR) and 2018 Workshop on Robotics in Education (WRE), Nov 2018, pp. 71–76.

[19] Y. Liu, A. Ali, and G. Dare, “swarm robot ros sim,” 2020. [Online]. Available: https://github.com/yangliu28/swarm robot ros sim

[20] Gazebo, “Gazebo,” 2020. [Online]. Available: http://gazebosim.org/

[21] C. Moeslinger, T. Schmickl, and K. Crailsheim, “A minimalist flocking algorithm for swarm robots,” in Advances in Artificial Life. Darwin Meets von Neumann, G. Kampis, I. Karsai, and E. Szathmary, Eds. ′ Berlin, Heidelberg: Springer Berlin Heidelberg, 2011, pp. 375–382.

[22] G. Valentini, E. Ferrante, H. Hamann, and M. Dorigo, “Collective decision with 100 Kilobots: Speed vs accuracy in binary discrimination problems,” Journal of Autonomous Agents and Multi-Agent Systems, vol. 30, no. 3, pp. 553–580, 2016.

[23] G. Valentini, E. Ferrante, and M. Dorigo, “The best-of-n problem in robot swarms: Formalization, state of the art, and novel perspectives,” Frontiers in Robotics and AI, vol. 4, p. 9, 2017.

[24] D. Thomas, E. Fernandez, and W. Woodall, “State of ROS 2 - demos and the technology behind,” in ROSCon Hamburg 2015. Open Robotics, September 2015. [Online]. Available: https://doi.org/10.36288/ROSCon2015-900743

[25] F. Arvin, K. Samsudin, and A. R. Ramli, “A short-range infrared communication for swarm mobile robots,” in 2009 International Conference on Signal Processing Systems, 2009, pp. 454–458.

[26] L. Wang, A. D. Ames, and M. Egerstedt, “Safety barrier certificates for collisions-free multirobot systems,” IEEE Transactions on Robotics, vol. 33, no. 3, pp. 661–674, 2017.

[27] C. Steup, S. Parlow, S. Mai, and S. Mostaghim, “Generic componentbased mission-centric energy model for micro-scale unmanned aerial vehicles,” Drones, vol. 4, no. 4, p. 63, 2020.


摘要:為移動(dòng)機(jī)器人開(kāi)發(fā)可重復(fù)使用的軟件仍然具有挑戰(zhàn)性。盡管機(jī)器人控制器具有理想的簡(jiǎn)單性,但對(duì)于群機(jī)器人來(lái)說(shuō)更是如此。由于多機(jī)器人設(shè)置,原型設(shè)計(jì)和實(shí)驗(yàn)很困難,并且通常需要機(jī)器人與機(jī)器人之間的通信。此外,群機(jī)器人硬件平臺(tái)的多樣性增加了對(duì)獨(dú)立于硬件的軟件概念的需求。常用的機(jī)器人軟件架構(gòu) ROS 2 的主要優(yōu)點(diǎn)是模塊化和平臺(tái)獨(dú)立性。文章提出了一個(gè)新的 ROS 2 包 ROS2SWARM,用于群機(jī)器人的應(yīng)用,它提供了一個(gè)現(xiàn)成的群行為原語(yǔ)庫(kù)。我們展示了我們的方法在三個(gè)不同平臺(tái)上的成功應(yīng)用,即 TurtleBot3 Burger、TurtleBot3 Waffle Pi 和 Jackal UGV,以及一組不同的行為原語(yǔ),例如聚合、分散和集體決策。所提出的方法易于維護(hù)、可擴(kuò)展,并且在未來(lái)應(yīng)用中具有簡(jiǎn)化群體機(jī)器人實(shí)驗(yàn)的良好潛力。?

ROS2Swarm群機(jī)器人案例(Dashing+Foxy)_ROS2_02



gitlab.iti.uni-luebeck.de/ROS2/ros2swarm



ROS2swarm手冊(cè) 版本 1.1.0

ROS2swarm 是一個(gè) ROS 2 (Dashing, Foxy) 包,提供了群行為模式。它由計(jì)算機(jī)工程研究所在德國(guó)呂貝克大學(xué)機(jī)器人研究所和醫(yī)學(xué)電氣工程研究所的支持下開(kāi)發(fā)。

項(xiàng)目貢獻(xiàn)者:Tanja Katharina Kaiser、Marian Johannes Begemann、Tavia Plattenteich、Lars Schilling、Georg Schildbach、Heiko Hamann、Vincent Jansen、Daniel Tidde、Steffen Fleischmann

當(dāng)前的 ROS2swarm 版本是 1.1.0(Foxy)。

ICRA 2022 論文“ROS2swarm - A ROS 2 Package for Swarm Robot Behaviors”指的是版本 1.0.0 (Dashing),也可在此處找到。

ROS2Swarm群機(jī)器人案例(Dashing+Foxy)_git_03


關(guān)于 ROS2swarm

  • 安裝指南
  • 如何使用 ROS2swarm
  • 支持的機(jī)器人平臺(tái)
  • 現(xiàn)有模式
  • 整體架構(gòu)
  • 模式的組成部分
  • 啟動(dòng)腳本概述
  • 仿真
  • 機(jī)器人
  • 封裝結(jié)構(gòu)


所需軟件

使用修改后的 TurtleBot3 模型

ROS2swarm 可用于 ROS 2 版本

Dashing (dashing-dev)和Foxy (foxy-dev)。

群體行為模式由基于運(yùn)動(dòng)和投票的模式組成。組合模式可以使用基本模式從基本組件中創(chuàng)建更復(fù)雜的行為。這些行為可用于模擬,并且適用于多個(gè)受支持的機(jī)器人平臺(tái)。提供啟動(dòng)腳本和 shell腳本來(lái)啟動(dòng)ROS2swarm。

安裝指南

要查看 ROS2swarm 軟件包的完整安裝指南,請(qǐng)參閱安裝指南。

如何使用 ROS2swarm

ROS2swarm 提供啟動(dòng)腳本以在模擬或真實(shí)機(jī)器人上啟動(dòng)模式。啟動(dòng)腳本的參數(shù),例如機(jī)器人類(lèi)型,可以通過(guò)編輯以下腳本的參數(shù)部分來(lái)設(shè)置。

腳本

功能

start_simulation.sh

使用所需數(shù)量的指定機(jī)器人啟動(dòng) Gazebo 模擬。要開(kāi)始行為執(zhí)行,請(qǐng)運(yùn)行 start_command.sh 腳本。

start_robot.sh

啟動(dòng)一個(gè)物理機(jī)器人。要開(kāi)始執(zhí)行行為,請(qǐng)運(yùn)行 start_command.sh 腳本。

start_command.sh

在網(wǎng)絡(luò)中的所有機(jī)器人上開(kāi)始執(zhí)行行為。

ros2 主題 pub --once /swarm_command communication_interfaces/msg/Int8Message "{data: 1}"

腳本/add_robots_to_simulation.sh

將額外的機(jī)器人添加到正在運(yùn)行的 Gazebo 模擬中。這些可以是不同的機(jī)器人類(lèi)型,提供了一種模擬異構(gòu)群的簡(jiǎn)單方法。


支持的機(jī)器人平臺(tái)

ROS2swarm 目前支持以下開(kāi)箱即用的機(jī)器人平臺(tái):

  • TurtleBot3 Waffle Pi
  • TurtleBot3 Burger
  • Jackal? UGV


現(xiàn)有模式

下表概述了當(dāng)前實(shí)現(xiàn)的模式。這些模式分為運(yùn)動(dòng)模式和投票模式。每個(gè)模式可以是基本模式,也可以是組合模式,它們利用一個(gè)或多個(gè)其他模式來(lái)創(chuàng)建更復(fù)雜的行為。

圖案

領(lǐng)域

類(lèi)型

模擬

機(jī)器人

駕駛

移動(dòng)

基本的

?

?

分散

移動(dòng)

基本的

?

?

吸引力

移動(dòng)

基本的

?

?

磁力計(jì)

移動(dòng)

基本的

?

?

極簡(jiǎn)植絨

移動(dòng)

基本的

?

?

隨機(jī)游走

移動(dòng)

基本的

?

?

討論色散模式

移動(dòng)

結(jié)合

?

?

投票模式

表決

基本的

?

?

多數(shù)規(guī)則

表決

基本的

?

?

此外,還啟動(dòng)了硬件保護(hù)層來(lái)防止沖突。


系統(tǒng)架構(gòu)

我們簡(jiǎn)要概述了模式組件、啟動(dòng)腳本和 ROS2swarm 的包。


模式的組成部分

模式由行為實(shí)現(xiàn)本身以及配置和啟動(dòng)文件組成。

文件

功能

ros2swarm/pattern_domain/pattern_type/pattern_name.py

模式的行為邏輯。

config/robot_type/pattern_domain/pattern_type/pattern_name.yaml

模式的參數(shù)配置。每種機(jī)器人類(lèi)型都有一個(gè)文件。

啟動(dòng)/pattern_domain/pattern_type/pattern_name.launch.py

使用 pattern_name.yaml 中指定的參數(shù)啟動(dòng) ROS 節(jié)點(diǎn)的啟動(dòng)文件。

要添加新模式,請(qǐng)從任何現(xiàn)有模式(例如驅(qū)動(dòng)模式)復(fù)制文件,并實(shí)現(xiàn)所需的行為。還要記住將新模式的文件添加到 setup.py 并在那里注冊(cè)新模式的主要功能。新模式可以通過(guò) start_*.sh 腳本啟動(dòng),其名稱(chēng)在 setup.py 中定義。


啟動(dòng)腳本概述

提供的啟動(dòng)腳本幫助用戶啟動(dòng) ROS2swarm 并執(zhí)行所需的行為。有幾個(gè)鏈接的腳本。在本節(jié)中,我們將解釋它們的目的和內(nèi)部調(diào)用順序。我們提供腳本,用于在模擬和真實(shí)機(jī)器人上啟動(dòng)所需的群體行為。


仿真

對(duì)于機(jī)器人類(lèi)型 TurtleBot3 Waffle Pi 和 TurtleBot3 Burger:

  • start_simulation.sh - 啟動(dòng) Gazebo 模擬器和 ROS2swarm 的 shell 腳本
  • launch_turtlebot_gazebo/launch/create_environment.launch.py?? - 中央模擬啟動(dòng)腳本,它調(diào)用其他啟動(dòng)腳本
  • launch_turtlebot_gazebo/launch/start_gazebo.launch.py?? - 啟動(dòng) Gazebo 模擬器
  • launch_turtlebot_gazebo/launch_turtlebot_gazebo/add_bot_node.py - 為每個(gè)機(jī)器人添加一個(gè) Gazebo 機(jī)器人節(jié)點(diǎn)
  • ros2swarm/launch/bringup_patterns.launch.py?? - 使用自己的命名空間管理每個(gè)機(jī)器人的模式開(kāi)始
  • ros2swarm/hardware_protection_layer.py - 硬件保護(hù)層節(jié)點(diǎn)
  • ros2swarm/pattern_domain/pattern_type/pattern_name.launch.py?? - 模式節(jié)點(diǎn)的啟動(dòng)腳本
  • robots_state_publisher 包 - robots_state_publisher 節(jié)點(diǎn)
  • scripts/add_robots_to_simulation.sh - 將更多機(jī)器人添加到仿真的 shell 腳本
  • launch_turtlebot_gazebo/launch/add_turtlebot.launch.py?? - 允許將其他機(jī)器人添加到由創(chuàng)建環(huán)境腳本啟動(dòng)的模擬中(見(jiàn)上文)
  • launch_turtlebot_gazebo/launch_turtlebot_gazebo/add_bot_node.py - 為每個(gè)機(jī)器人添加一個(gè) Gazebo 機(jī)器人節(jié)點(diǎn)
  • ros2swarm/launch/bringup_patterns.launch.py?? - 使用自己的命名空間管理每個(gè)機(jī)器人的模式開(kāi)始
  • 等如上

對(duì)于機(jī)器人類(lèi)型 Jackal UGV:

開(kāi)始一個(gè) roscore

運(yùn)行 rosbridge:https ://github.com/ros2/ros1_bridge

開(kāi)始豺狼模擬:https ://gitlab.iti.uni-luebeck.de/plattenteich/jackal-swarm-addition

start_simulation.sh - 使用機(jī)器人:=jackal

真正的機(jī)器人

對(duì)于機(jī)器人類(lèi)型 TurtleBot3 Waffle Pi 和 TurtleBot3 Burger:

start_robot.sh - 在單個(gè)機(jī)器人上啟動(dòng) ROS2swarm 的 shell 腳本

ros2swarm/bringup_robot.launch.py - 中央機(jī)器人啟動(dòng)腳本,將其他啟動(dòng)腳本添加到啟動(dòng)描述中

ros2swarm/turtlebot3_bringup.launch.py - 啟動(dòng) TurtleBot3 機(jī)器人節(jié)點(diǎn)并啟動(dòng)文件

對(duì)于機(jī)器人類(lèi)型 Jackal:

start_robot.sh - 使用robot:=jackal 在單個(gè)機(jī)器人上啟動(dòng)ROS2swarm 的shell 腳本

不啟動(dòng)jackal對(duì)應(yīng),只提供行為模式的訂閱者和發(fā)布者

封裝結(jié)構(gòu)

ROS2swarm 由三個(gè) ROS 包組成:

ros2swarm

包含行為模式及其配置和啟動(dòng)文件的主包。

launch_turtlebot_gazebo

啟動(dòng) Gazebo 模擬的腳本

通信接口

模式使用的特殊 ROS 消息的接口

所需軟件

Dashing

Ubuntu 18.04 LTS

ROS 2 Dashing Diademata

ROS 2 TurtleBot3 軟件包

Python 3.6

用于仿真的 Gazebo 9

Foxy

Ubuntu 20.04 LTS

ROS 2 Foxy

ROS 2 TurtleBot3 軟件包

Python 3.8.10

用于仿真的 Gazebo 11

使用修改后的 TurtleBot3 模型

ROS2swarm 為修改后的 Turtlebot3 模型提供網(wǎng)格。要使用它們,必須將它們復(fù)制到 turtlebot3 包的工作區(qū),如下所述。要選擇標(biāo)準(zhǔn) Turtlebot3 Waffle Pi 機(jī)器人,請(qǐng)?jiān)趩?dòng)腳本中使用“waffle_pi”。要選擇修改后的 Turtlebot3 Waffle Pi 版本,請(qǐng)?jiān)趩?dòng)腳本中使用“waffle_pi_name_of_modification”。然后在使用提供的啟動(dòng)腳本時(shí)自動(dòng)選擇 Gazebo 的網(wǎng)格。TurtleBot3“漢堡”模型也是如此。下面描述了使用修改后的模型的步驟。

Gazebo 中沒(méi)有傳感器可視化的 TurtleBot3

要使用 TurtleBot3 Burger,請(qǐng)將下面的“waffle_pi”替換為“burger”。

  1. 復(fù)制
WaffelPi_Model_Extension/turtlebot3_waffle_pi_invisible_sensors

turtlebot3_ws/src/turtlebot3_simulations/turtlebot3_gazebo/models
  1. 復(fù)制
WaffelPi_Model_Extension/turtlebot3_waffle_pi_invisible_sensors.urdf

turtlebot3_ws/src/turtlebot3/turtlebot3_description
  1. 構(gòu)建turtlebot3_ws
cd ~/turtlebot3_ws && colcon build --symlink-install
  1. 在 start_*.sh 中使用機(jī)器人選擇參數(shù)
number_robots:=waffle_pi_invisible_sensors
source ~/turtlebot3_ws/install/setup.bash

安裝指南

本指南是在 Ubuntu 20.04 操作系統(tǒng)上安裝 ROS2swarm 包以與 TurtleBot3 一起使用的詳細(xì)分步說(shuō)明。它是根據(jù)指南建立一個(gè)turtlebot3開(kāi)發(fā)環(huán)境并使用手動(dòng)安裝的

https://emanual.robotis.com/docs/en/platform/turtlebot3/quick-start/

https://emanual.robotis.com/docs/en/platform/turtlebot3/simulation/

先決條件

本指南要求已安裝 OS Ubuntu Bionic 20.04。

安裝 ROS 2 Foxy

安裝 ROS 2 桌面版如下:

https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html

設(shè)置語(yǔ)言環(huán)境

locale  # check for UTF-8

sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8

locale # verify settings

設(shè)置源

sudo apt update && sudo apt install curl gnupg2 lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

安裝 ROS 2 包

sudo apt update
sudo apt install ros-foxy-desktop
echo 'source /opt/ros/foxy/setup.bash' >> ~/.bashrc

安裝 argcomplete(可選)

sudo apt install -y python3-pip
pip3 install -U argcomplete

測(cè)試是否安裝成功新終端

ros2 run demo_nodes_cpp talker
ros2 run demo_nodes_py listener

安裝依賴(lài)的 ROS 2 包,包括Gazebo

安裝 colcon

sudo apt install python3-colcon-common-extensions

安裝Gazebo

sudo apt install ros-foxy-gazebo-ros-pkgs

安裝cartographer

sudo apt install ros-foxy-cartographer
sudo apt install ros-foxy-cartographer-ros

安裝Nav2

sudo apt install ros-foxy-navigation2
sudo apt install ros-foxy-nav2-bringup

安裝turtlebot3

安裝 TurtleBOt3 軟件包

TurtleBot3 包和源代碼:

mkdir -p ~/turtlebot3_ws/src
cd ~/turtlebot3_ws/src/
git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3.git
sudo apt install ros-dashing-dynamixel-sdk
cd ~/turtlebot3_ws && colcon build --symlink-install

環(huán)境配置

echo 'source ~/turtlebot3_ws/install/setup.bash' >> ~/.bashrc
echo 'export ROS_DOMAIN_ID=30 #TURTLEBOT3' >> ~/.bashrc

安裝turtlebot3_simulation包

cd ~/turtlebot3_ws/src/
git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git

切換到支持的版本

ROS2swarm 包僅支持 turtlebot3 包的以下提交。

turtlebot3:

cd  ~/turtlebot3_ws/src/turtlebot3
git checkout 8237b796ea1571033bf3230fbc78d1143968ddd1

turtlebot3_msgs:

cd ~/turtlebot3_ws/src/turtlebot3_msgs
git checkout cf5c56be94b335b1d2c9817bd2dcaceec21ccc68

turtlebot3_simulations:

cd ~/turtlebot3_ws/src/turtlebot3_simulations
git checkout f5d86bbeb614f46a176f47b3697c85a8a9b989f9

設(shè)置Gazebo模型路徑

echo 'export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/turtlebot3_ws/src/turtlebot3_simulations/turtlebot3_gazebo/models' >> ~/.bashrc

構(gòu)建turtlebot3包

cd ~/turtlebot3_ws && colcon build --symlink-install
echo 'export TURTLEBOT3_MODEL=waffle_pi' >> ~/.bashrc
source ~/.bashrc

測(cè)試示例仿真是否有效

ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py

安裝 ROS2swarm 包

將項(xiàng)目文件夾放在您的主目錄中(也是使用腳本所必需的)

git clone git@gitlab.iti.uni-luebeck.de:ROS2/ros2swarm.git
cd ~/ROS2swarm
colcon build --symlink-install
echo 'source ~/ROS2swarm/install/setup.bash' >> ~/.bashrc

測(cè)試 ROS2swarm 包是否啟動(dòng)模擬

source ~/.bashrc
bash ~/ROS2swarm/restart.sh

基于模板的附加安裝

將 PyCharm 安裝為 IDE

sudo snap install pycharm-educational --classic

將 ROS 引入 PyCharm

sudo nano /var/lib/snapd/desktop/applications/pycharm-educational_pycharm-educational.desktop

用 Exec 行中的命令替換 /snap/bin/pycharm-educational

或者如果結(jié)果不起作用,則恢復(fù)更改并使用源 ROS2 從控制臺(tái)啟動(dòng) IDE

snap run pycharm-educational

選擇 python3.7 作為默認(rèn)值(僅在需要舊模板中)

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 3

安裝pip

sudo apt install python-pip

安裝升級(jí)點(diǎn)

pip install --upgrade pip

安裝 open_cv

pip install opencv-python

本文摘自 :https://blog.51cto.com/u

開(kāi)通會(huì)員,享受整站包年服務(wù)立即開(kāi)通 >