微软Windows操作系统全面兼容机器人操作系统ROS1和ROS2_ros2_java for windows-程序员宅基地

技术标签: ROS Melodic 迷失与救赎  ROS  ROS_melodic机器人操作系统  ROS2学习笔记与高校课程分享  windows  

微软Windows操作系统全面兼容机器人操作系统ROS1和ROS2

turtlebot2:https://github.com/bfjelds/turtlebot2-win10

文档:https://libraries.io/github/bfjelds/turtlebot2-win10

安装在/opt/ros/melodic/x64文件夹下,依据如下教程即可安装成功。

ROS官网链接:http://wiki.ros.org/Installation/Windows

----

Turtlebot 3

Getting Started with the Turtlebot 3 running Windows. The ROS for Ubuntu documentation is located at the Robotis website . The documentation on this page will describe the differences between Ubuntu and Windows.

Windows Requirements

Windows Software

The Turtlebot 3 uses a Lidar which requires the following driver.

Guide

General notes

The turtlebot documentation uses the unix command 'export' to set environment variables, instead use the following:

set TURTLEBOT3_MODEL=Waffle

Please use turtlebot3_bringup-win.launch which has Windows device bindings.

6. Setup

6.1 PC Setup

Please follow the instructions for setting up your computer with ROS on Windows.

6.2 SBC Setup

You can bypass this section

6.3 OpenCR Setup

Please follow the Windows instructions for the Robotis OpenCR board in the Robotis Manual .

Before proceeding, make sure the motors turn by pressing the motor test buttons near the USB connector.

BUG: We're working to identify a sync error coming from rosserial, which ultimately leads to a board reset.

6.4 Compatible devices

ROS on Windows requires a x64 bit Windows 10 Desktop or Windows 10 IoT Enterprise, and compatible hardware.

ROS on Windows was brought up using Up2  and an Intel Nuc.

11 Simulation

As of the September release, Gazebo has not been ported to Windows yet.

Create a new workspace

In a Command Window set up with the ROS environment, create a directory for your robot workspaces and a workspace for turtlebot.

mkdir c:\ws\turtlebot3\src
cd c:\ws\turtlebot3\src
catkin_init_workspace
git clone -b melodic-devel https://github.com/ROBOTIS-GIT/turtlebot3_msgs
git clone -b melodic-devel https://github.com/ms-iot/turtlebot3_simulations
git clone -b melodic-devel https://github.com/ms-iot/turtlebot3.git 
git clone -b melodic-devel https://github.com/ms-iot/hls_lfcd_lds_driver
cd c:\ws\turtlebot3
rosdep install --from-paths src --ignore-src -r -y

As of the September release of ros-melodic for Windows, Gazebo has not been ported. Please disable this portion of the build.

echo > turtlebot3_simulations\turtlebot3_gazebo\CATKIN_IGNORE

Customize Turtlebot Launch Files

Modify the ROS Launch files to map the devices to the correct COM port. To determine which COM ports you require, right click on the Windows Start Menu, Select Device Manager.

Under the Ports (COM & LPT) node:

  • USB Serial Debice (COMx) is the OpenCR board.
  • Silicon Labs CP210x USB to UART Bridge (COMy) is the Lidar

Enter the COM port in the correct fields in the launch files below:

turtlebot3_bringup/launch/turtlebot3_core-win.launch

<node pkg="rosserial_python" type="serial_node.py" name="turtlebot3_core" output="screen">
    <param name="port" value="COMx"/>

turtlebot3_bringup/launch/turtlebot3_lidar-win.launch

  <node pkg="hls_lfcd_lds_driver" type="hlds_laser_publisher" name="turtlebot3_lds" output="screen">
    <param name="port" value="COMy"/>

Build Nodes

To build the turtlebot packages, enter the turtlebot3 workspace and build using the catkin build system.

cd c:\ws\turtlebot3
catkin_make install -DCMAKE_BUILD_TYPE=RelWithDebInfo

Now inform ROS where to find your turtlebot code by merging the turtlebot install environment with the ROS environment. Please ensure you do this every time you open a command window.

c:\ws\turtlebot3\install\setup.bat

If you forget to merge the turtlebot environment by calling the setup batch file, you'll get an error such as this: RLException: [turtlebot3_robot.launch] is neither a launch file in package [turtlebot3_bringup] nor is [turtlebot3_bringup] a launch file name

Running Turtlebot

No Robot - No Problem!

rViz is tool which allows you to visualize a representation of a robot, and project fake data in order to exerise or develop logic. The turtlebot simulation is in the turtlebot3_simulations package.

In one command window, start roscore.

In another command window, start the simulation environment.

roslaunch turtlebot3_simulations turtlebot3_fake.launch

You can create your own logic which reads /odom or publish /cmd_vel to move the virtual robot.

Run Turtlebot3 with Sensors connected to your devlopment machine.

If you have Turtlebot3 hardware, you can plug the sensors directly into your development machine to iterate on fuctionality with your development machine. Perform the steps to set up the launch file for your development system.

In one command window, start roscore.

In another command window, launch the turtlebot robot code.

roslaunch turtlebot3_bringup turtlebot3_robot.launch

-----

ROS1链接:https://ros-win.visualstudio.com/ros-win

ROS for Windows

People have always been fascinated by robots. Today advanced robots are changing our lives, both at work and at home. Warehouse robots have enabled next-day deliveries to online shoppers, and many pet owners rely on robotic vacuums to keep their floors clean. Industries as diverse as manufacturing, transportation, healthcare, and real estate are seeing benefits from robots. As robots have advanced, so have the development tools. Many developers leverage the Robot Operating System (ROS) , a set of libraries and tools which help you build complex robots. ROS is used in many cutting-edge robotic projects around the world.

Microsoft is excited to announce an experimental release of ROS1 for Windows. This will bring the manageability and security of Windows 10 IoT Enterprise to the innovative ROS ecosystem.

Windows has been a trusted part of robotic and industrial systems for decades. With ROS for Windows, developers will be able to use the familiar Visual Studio toolset along with rich AI and cloud features. We're looking forward to bringing the intelligent edge to robotics by exposing advanced features like hardware accelerated Windows Machine Learning, computer vision, Azure Cognitive Services, Azure IoT cloud services, and other Microsoft technologies to home, education, commercial, and industrial robots. Manufacturers want to make robots more aware of their surroundings, easier to program and safer to be around. Governments, manufacturers, and academics around the world are investing in the next generation of manufacturing, sometimes referred to as “Industry 4.0”.

Microsoft is working with Open Robotics and the ROS Industrial Consortium to bring the Robot Operating System to Windows. Microsoft has joined the ROS Industrial Consortium whose mission is to extend the advanced capabilities of ROS to manufacturing and improve the productivity and return on investment of industrial robots . At ROSCon 2018 in Madrid, Spain, Microsoft demonstrated a Robotis Turtlebot 3 robot, running the ROS release known as Melodic Morenia, that recognized and steered toward the closest person to the robot. The robot runs Windows 10 IoT Enterprise on an Intel Coffee Lake NUC using a new ROS node which leverages hardware accelerated Windows Machine Learning. Microsoft also showcased a ROS simulation environment running in Azure.It demonstrated a swarm of robots running in a virtual world connected to an orchestration system and controlled via Azure IoT Hub. Microsoft will host the Windows builds for ROS1 and shortly ROS2, as well as provide documentation, development and deployment solutions for Windows.

ROS on Windows is experimental. For more details, visit us at ROSCon 2018 

Working with ROS on Windows

Using ROS with Azure

ROS2链接:https://github.com/ros2/ros2/wiki/Windows-Install-Binary

Windows Install Binary

Mikael Arguedas edited this page on 25 Aug · 64 revisions

Installing ROS 2 on Windows

This page explains how to install ROS 2 on Windows from a pre-built binary package.

System requirements

As of beta-2 only Windows 10 is supported.

Installing prerequisites

Install Chocolatey

Chocolatey is a package manager for Windows, install it by following their installation instructions:

https://chocolatey.org/

You'll use Chocolatey to install some other developer tools.

Install Python

Open a Command Prompt and type the following to install Python via Chocolatey:

> choco install -y python

Install OpenSSL

Download an OpenSSL installer from this page. Scroll to the bottom of the page and download Win64 OpenSSL v1.0.2. Don't download the Win32 or Light versions.

Run the installer with default parameters. Then, define environment variables (the following commands assume you used the default installation directory):

  • setx -m OPENSSL_CONF C:\OpenSSL-Win64\bin\openssl.cfg
  • Add C:\OpenSSL-Win64\bin\ to your PATH

Install Visual Studio

Install Visual Studio 2015 if using Ardent or earlier

Install Visual Studio 2017 if using Bouncy or a nightly

Install additional DDS implementations (optional)

ROS 2 builds on top of DDS. It is compatible with multiple DDS or RTPS (the DDS wire protocol) vendors.

The package you downloaded has been built with optional support for multiple vendors: eProsima FastRTPS, Adlink OpenSplice, and (as of ROS 2 Bouncy) RTI Connext as the middleware options. Run-time support for eProsima's Fast RTPS is included bundled by default. If you would like to use one of the other vendors you will need to install their software separately.

Adlink OpenSplice

If you want to use OpenSplice, you will need to download the latest version (for ROS 2 Bouncy we require at least version 6.7.180404OSS-HDE-x86_64.win-vs2017). For ROS 2 releases up to and including Ardent, extract it but do not do anything else at this point. For ROS 2 releases later than Ardent, set the OSPL_HOME environment variable to the unpacked directory that contains the release.bat script.

RTI Connext

To use RTI Connext (available as of ROS 2 Bouncy) you will need to have obtained a license from RTI.

You can install the Windows package of Connext version 5.3.1 provided by RTI from their downloads page.

After installing, run RTI launcher and point it to your license file.

Set the NDDSHOME environment variable:

set "NDDSHOME=C:\Program Files\rti_connext_dds-5.3.1"

If you want to install the Connext DDS-Security plugins please refer to this page

Install OpenCV

Some of the examples require OpenCV to be installed.

You can download a precompiled version of OpenCV 3.4.1 from https://github.com/ros2/ros2/releases/download/opencv-archives/opencv-3.4.1-vc15.VS2017.zip

Assuming you unpacked it to C:\opencv, type the following on a Command Prompt (requires Admin privileges):

setx -m OpenCV_DIR C:\opencv

Since you are using a precompiled ROS version, we have to tell it where to find the OpenCV libraries. You have to extend the PATH variable to c:\opencv\x64\vc15\bin

In ardent and earlier

These releases used OpenCV 2. You can download a precompiled version of OpenCV 2.4.13.2 from https://github.com/ros2/ros2/releases/download/release-beta2/opencv-2.4.13.2-vc14.VS2015.zip

Since you are using a precompiled ROS version, we have to tell it where to find the OpenCV libraries. Assuming you were extracting OpenCV to c:\ you have to extend the PATH variable to c:\opencv-2.4.13.2-vc14.VS2015\x64\vc14\bin

Install dependencies

There are a few dependencies not available in the Chocolatey package database. In order to ease the manual installation process, we provide the necessary Chocolatey packages.

As some chocolatey packages rely on it, we start by installing CMake

> choco install -y cmake

You will need to append the CMake bin folder C:\Program Files\CMake\bin to the PATH (you can do this by clicking the Windows icon, typing "Environment Variables", then clicking on "Edit the system environment variables". In the resulting dialog, click "Environment Variables", the click "Path" on the bottom pane, then click "Edit" and add the path).

Please download these packages from this GitHub repository.

  • asio.1.12.1.nupkg
  • eigen-3.3.4.nupkg
  • tinyxml-usestl.2.6.2.nupkg
  • tinyxml2.6.0.0.nupkg

Once these packages are downloaded, open an administrative shell and execute the following command:

> choco install -y -s <PATH\TO\DOWNLOADS\> asio eigen tinyxml-usestl tinyxml2

Please replace <PATH\TO\DOWNLOADS> with the folder you downloaded the packages to.

You must also install some python dependencies for command-line tools:

python -m pip install -U catkin_pkg empy pyparsing pyyaml setuptools

Downloading ROS 2

  • Go the releases page: https://github.com/ros2/ros2/releases
  • Download the latest package for Windows, e.g., ros2-package-windows-AMD64.zip.
    • Notes:
      • there may be more than one binary download option which might cause the file name to differ.
      • [ROS Bouncy only] To download the ROS 2 debug libraries you'll need to download ros2-bouncy-windows-Debug-AMD64.zip
  • Unpack the zip file somewhere (we'll assume C:\dev\ros2).
    • Note (Ardent and earlier): There seems to be an issue where extracting the zip file with 7zip causes RViz to crash on startup. Extract the zip file using the Windows explorer to prevent this.

Set up the ROS 2 environment

Start a command shell and source the ROS 2 setup file to set up the workspace:

> call C:\dev\ros2\local_setup.bat

For ROS 2 releases up to and including Ardent, if you downloaded a release with OpenSplice support you must additionally source the OpenSplice setup file manually (this is done automatically for ROS 2 releases later than Ardent; this step can be skipped). It is normal that the previous command, if nothing else went wrong, outputs "The system cannot find the path specified." exactly once. Only do this step after you have sourced the ROS 2 setup file:

> call "C:\opensplice67\HDE\x86_64.win64\release.bat"

Try some examples

In a command shell, set up the ROS 2 environment as described above and then run a talker:

> ros2 run demo_nodes_cpp talker

Start another command shell and run a listener:

> ros2 run demo_nodes_py listener

You should see the talker saying that it's Publishing messages and the listener saying I heard those messages. Hooray!

If you have installed support for an optional vendor, see this page for details on how to use that vendor.

Troubleshooting

  • If at one point your example would not start because of missing dll's, please verify that all libraries from external dependencies such as OpenCV are located inside your PATH variable.
  • If you forget to call the local_setup.bat file from your terminal, the demo programs will most likely crash immediately.
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/ZhangRelay/article/details/82892892

智能推荐

稀疏编码的数学基础与理论分析-程序员宅基地

文章浏览阅读290次,点赞8次,收藏10次。1.背景介绍稀疏编码是一种用于处理稀疏数据的编码技术,其主要应用于信息传输、存储和处理等领域。稀疏数据是指数据中大部分元素为零或近似于零的数据,例如文本、图像、音频、视频等。稀疏编码的核心思想是将稀疏数据表示为非零元素和它们对应的位置信息,从而减少存储空间和计算复杂度。稀疏编码的研究起源于1990年代,随着大数据时代的到来,稀疏编码技术的应用范围和影响力不断扩大。目前,稀疏编码已经成为计算...

EasyGBS国标流媒体服务器GB28181国标方案安装使用文档-程序员宅基地

文章浏览阅读217次。EasyGBS - GB28181 国标方案安装使用文档下载安装包下载,正式使用需商业授权, 功能一致在线演示在线API架构图EasySIPCMSSIP 中心信令服务, 单节点, 自带一个 Redis Server, 随 EasySIPCMS 自启动, 不需要手动运行EasySIPSMSSIP 流媒体服务, 根..._easygbs-windows-2.6.0-23042316使用文档

【Web】记录巅峰极客2023 BabyURL题目复现——Jackson原生链_原生jackson 反序列化链子-程序员宅基地

文章浏览阅读1.2k次,点赞27次,收藏7次。2023巅峰极客 BabyURL之前AliyunCTF Bypassit I这题考查了这样一条链子:其实就是Jackson的原生反序列化利用今天复现的这题也是大同小异,一起来整一下。_原生jackson 反序列化链子

一文搞懂SpringCloud,详解干货,做好笔记_spring cloud-程序员宅基地

文章浏览阅读734次,点赞9次,收藏7次。微服务架构简单的说就是将单体应用进一步拆分,拆分成更小的服务,每个服务都是一个可以独立运行的项目。这么多小服务,如何管理他们?(服务治理 注册中心[服务注册 发现 剔除])这么多小服务,他们之间如何通讯?这么多小服务,客户端怎么访问他们?(网关)这么多小服务,一旦出现问题了,应该如何自处理?(容错)这么多小服务,一旦出现问题了,应该如何排错?(链路追踪)对于上面的问题,是任何一个微服务设计者都不能绕过去的,因此大部分的微服务产品都针对每一个问题提供了相应的组件来解决它们。_spring cloud

Js实现图片点击切换与轮播-程序员宅基地

文章浏览阅读5.9k次,点赞6次,收藏20次。Js实现图片点击切换与轮播图片点击切换<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script type="text/ja..._点击图片进行轮播图切换

tensorflow-gpu版本安装教程(过程详细)_tensorflow gpu版本安装-程序员宅基地

文章浏览阅读10w+次,点赞245次,收藏1.5k次。在开始安装前,如果你的电脑装过tensorflow,请先把他们卸载干净,包括依赖的包(tensorflow-estimator、tensorboard、tensorflow、keras-applications、keras-preprocessing),不然后续安装了tensorflow-gpu可能会出现找不到cuda的问题。cuda、cudnn。..._tensorflow gpu版本安装

随便推点

物联网时代 权限滥用漏洞的攻击及防御-程序员宅基地

文章浏览阅读243次。0x00 简介权限滥用漏洞一般归类于逻辑问题,是指服务端功能开放过多或权限限制不严格,导致攻击者可以通过直接或间接调用的方式达到攻击效果。随着物联网时代的到来,这种漏洞已经屡见不鲜,各种漏洞组合利用也是千奇百怪、五花八门,这里总结漏洞是为了更好地应对和预防,如有不妥之处还请业内人士多多指教。0x01 背景2014年4月,在比特币飞涨的时代某网站曾经..._使用物联网漏洞的使用者

Visual Odometry and Depth Calculation--Epipolar Geometry--Direct Method--PnP_normalized plane coordinates-程序员宅基地

文章浏览阅读786次。A. Epipolar geometry and triangulationThe epipolar geometry mainly adopts the feature point method, such as SIFT, SURF and ORB, etc. to obtain the feature points corresponding to two frames of images. As shown in Figure 1, let the first image be ​ and th_normalized plane coordinates

开放信息抽取(OIE)系统(三)-- 第二代开放信息抽取系统(人工规则, rule-based, 先抽取关系)_语义角色增强的关系抽取-程序员宅基地

文章浏览阅读708次,点赞2次,收藏3次。开放信息抽取(OIE)系统(三)-- 第二代开放信息抽取系统(人工规则, rule-based, 先关系再实体)一.第二代开放信息抽取系统背景​ 第一代开放信息抽取系统(Open Information Extraction, OIE, learning-based, 自学习, 先抽取实体)通常抽取大量冗余信息,为了消除这些冗余信息,诞生了第二代开放信息抽取系统。二.第二代开放信息抽取系统历史第二代开放信息抽取系统着眼于解决第一代系统的三大问题: 大量非信息性提取(即省略关键信息的提取)、_语义角色增强的关系抽取

10个顶尖响应式HTML5网页_html欢迎页面-程序员宅基地

文章浏览阅读1.1w次,点赞6次,收藏51次。快速完成网页设计,10个顶尖响应式HTML5网页模板助你一臂之力为了寻找一个优质的网页模板,网页设计师和开发者往往可能会花上大半天的时间。不过幸运的是,现在的网页设计师和开发人员已经开始共享HTML5,Bootstrap和CSS3中的免费网页模板资源。鉴于网站模板的灵活性和强大的功能,现在广大设计师和开发者对html5网站的实际需求日益增长。为了造福大众,Mockplus的小伙伴整理了2018年最..._html欢迎页面

计算机二级 考试科目,2018全国计算机等级考试调整,一、二级都增加了考试科目...-程序员宅基地

文章浏览阅读282次。原标题:2018全国计算机等级考试调整,一、二级都增加了考试科目全国计算机等级考试将于9月15-17日举行。在备考的最后冲刺阶段,小编为大家整理了今年新公布的全国计算机等级考试调整方案,希望对备考的小伙伴有所帮助,快随小编往下看吧!从2018年3月开始,全国计算机等级考试实施2018版考试大纲,并按新体系开考各个考试级别。具体调整内容如下:一、考试级别及科目1.一级新增“网络安全素质教育”科目(代..._计算机二级增报科目什么意思

conan简单使用_apt install conan-程序员宅基地

文章浏览阅读240次。conan简单使用。_apt install conan