Coder Social home page Coder Social logo

glogemann / msix_ros Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ms-iot/msix_ros

0.0 1.0 0.0 2.63 MB

A collection of tools to create MSIX Packaging for ROS Applications

License: MIT License

Batchfile 0.84% C++ 3.47% PowerShell 46.15% Shell 49.55%

msix_ros's Introduction

ROS on MSIX Packaging

MSIX is a Windows app package format that provides a modern packaging experience to all Windows apps.

This project contains some useful scripts to build MSIX packages for ROS applications.

Prerequisites

You can install Windows 10 SDK by selecting Windows 10 SDK (10.0.19041.0) in the optional components of the Visual Studio 2019 Installer.

Before you proceed, it is highly recommended to read What's MSIX and learn it benefits.

Task 1: Binary Install ROS on Windows

You can binary install ROS on Windows by following ROS on Windows installation. You can skip this step if you did it already.

Task 2: Install ROS Workspace

Now you will need to install your ROS workspace into c:\opt\install and make it live side-by-side with the ROS installation.

You can do it by specifying the install space when running catkin_make_isolated:

:: catkin_make_isolated example

catkin_make_isolated --install --merge --install-space c:\opt\install

Task 3: Prepare ROS Runtime Contents

Check the folder layout of c:\opt and it should be like as below:

-- opt
   |-- python27amd64
   |-- ros\melodic\x64
   |-- rosdeps\x64
   |-- install

Now open the PowerShell terminal and change the working directory to this project. Run rosprep.ps1 to prepare the ROS runtime contents, and it will stage the results under working folder.

rosprep.ps1 copies the contents only required at runtime and fixes up hard-coded prefix in ROS files to accommodate MSIX virtualized file system requirement.

Task 4: Prepare MSIX Packaging Layout and App Manifest Files

Before building MSIX package, you will need to define some answer files for MSIX to build.

In this project, you can check this example and modify it per your requirement.

Under the example folder, you can find:

  • PackagingLayout.xml: Define the file contents for MSIX packaging.
  • AppxManifest.xml: Define the MSIX app's entry points and additional capability\behavior.
  • Launcher.bat: Define the start-up ROS application by roslaunch convention.

ROS is using a communication model which requires to listen TCP\UDP ports. It is important to identify and define the proper firewall rules for the best experience. From the previous step, rosprep.ps1 generates a firewall.xml as a baseline for all the executables potentially required to do ROS topics publish and subscribe. It is recommended to review it and integrate the rules back to your AppxManifest.xml.

Task 5: Build MSIX Bundles and Packages

Run build.ps1 to package the example project. The -certFile test.pfx -certPassword 1234 can specify the signing certificate. The -packagingLayout <path to PackagingLayout.xml> can specify your customized PackagingLayout.xml.

Task 6: Install MSIX Packages

Now you can find the MSIX packages under output folder. Double click ros-melodic-desktop.msixbundle to install.

Or you can install MSIX to device context by Add-AppProvisionedPackage.

On your target machine, the signing certificate needs to be trusted before installing the package. Open PowerShell in administrative privilege, run Import-Certificate -FilePath "<your certificate file (.cer)>" -CertStoreLocation Cert:\LocalMachine\Root. Then the certificate will be added to the Trusted Root Certification Authorities store.

Task 7: Run ROS Application

You can find the app entry point registered on the Start Menu. Click it to execute.

You will need to rename the c:\opt to something else (for example, c:\opt_) on your target device. Otherwise, the application could be affected by the ROS installation. This is due to ROS build tools currently embed hard-coded paths to PE files and this fix is work in progress now.

What's Next

Now you know how to package ROS into MSIX package. You can integrate it with CI\CD pipelines. And you may want to know more about how to distribute in larger scale.

Learn more about MSIX distribution here.

Troubleshooting

Sometimes you need to be able to trouble shoot an installation. Here is a collection of useful resources to help.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

msix_ros's People

Contributors

seanyen avatar ooeygui avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.