ROS2 introductory tutorial -windows installation ROS2

ROS2 introductory tutorial -windows installation ROS2

ROS2 introductory tutorial -windows installation ROS2

Description:

  • It describes how to install under Windows system ROS2

System Requirements

  • Recommended win 10 system

Premise installation ROS2 preparations

  • 1. Install chocolate

  • Download Links Chocolatey of: HTTPS : //chocolatey.org/

  • 2. Install Python by Chocolatey

  • Open a command prompt and type the following command:

choco install -y python
  • 3. Install OpenSSL

  • From the link provided below to download OpenSSL installer. Please download Win64 OpenSSL v1.0.2, do not download or Light Win32 version.

  • OpenSSL Links: HTTPS : //slproweb.com/products/Win32OpenSSL.html

  • Run the installer with default parameters. Then, define environment variables (the following command assumes the default installation directory):

setx -m OPENSSL_CONF C:\OpenSSL-Win64\bin\openssl.cfg

#Add C:\OpenSSL-Win64\bin\ to your PATH

Enter an image description
Enter an image description
Enter an image description

  • 7.安装依赖项

  • 请从这个GitHub存储库下载这些软件包。

    • asio.1.10.6.nupkg

    • 本征3.3.3.nupkg

    • TinyXML的-usestl.2.6.2.nupkg

    • tinyxml2.4.1.0.nupkg

  • 下载完成后,执行以下命令:

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

# <PATH\TO\DOWNLOADS>为已下载软件包的文件夹的对应路径
  • 您还必须安装pip一个python包,yaml
python -m pip install -U pyyaml setuptools

下载ROS2

  • Download Links ROS2 of: HTTPS : //github.com/ros2/ros2/releases

  • Download the latest software package for Windows, for example ros2-package-windows-AMD64.zip.

    • Note: There may be multiple download binary options may lead to a different file name.
  • Unzip the zip file (we assume C:\dev\ros2).

Set ROS2 environment

  • Execute the following command and source RO2 configuration file to set the workspace
call C:\dev\ros2\local_setup.bat
  • If you have downloaded a version of OpenSplice support and hope to use it as middleware, you must obtain additional OpenSplice installation files. The only wayafter you can get ROS 2:
call "C:\opensplice67\HDE\x86_64.win64\release.bat"

Try some examples

  • Open a terminal, execute the following command:
ros2 run demo_nodes_cpp talker
  • Open a new terminal, execute the following command:
ros2 run demo_nodes_py listener
  • FIG operating results as follows:

Enter an image description

Troubleshooting

  • If you can not run the examples and the lack of dll error occurs, all external dependencies in front of the library, please check the installation, such as: OpenCV the PATHenvironment variable is set correctly

  • If you forget to do when you set the previous call C:\dev\ros2\local_setup.batcommand, you may not be able to run the demo

Reference links

Guess you like

Origin www.cnblogs.com/wdzeng/p/11426722.html