Skip to content

ros2wasm/wasm_publisher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wasm_publisher

This repo consists of a ROS 2 package containing a single publisher node. This package is cross-compiled to WebAssembly with the help of the ros2wasm-builder action.

Example Workflow

name: humble-package
on:
  push:
    branches: main
  pull_request:
    branches: '*'

jobs:
  build-package:
    runs-on: ubuntu-latest

    steps:
      - name: Create ROS 2 workspace
        shell: bash -eux {0}
        run: mkdir -p ros-workspace/src

      # Clone this repo (ROS package) into workspace
      - name: Checkout
        uses: actions/checkout@v3
        with:
          path: ros-workspace/src/wasm_publisher

      # Runs action and builds package
      - name: Cross-compile package
        uses: ihuicatl/[email protected]
        with:
          package: wasm_publisher
          ros_distro: 'humble'
          debug_mode: false

Once the workflow has successfully completed, the built files are available as artifacts.

Alt text

Usage

  1. Copy example workflow to a repository containing your target ROS package
  2. Adapt workflow example (change package name)
  3. Trigger workflow with a pull request or change triggers to run manually
  4. Download artifacts

Note: the ros2wasm-builder action only supports ROS 2 Humble (for now).

Other ROS 2 packages

It is also possible to build other ROS 2 packages. The steps of the workflow would reduce to this:

    steps:
      # Runs action and builds a different package
      - name: Cross-compile package
        uses: ihuicatl/[email protected]
        with:
          package: rclcpp  # new package name
          ros_distro: 'humble'
          debug_mode: false

About

Example publisher for the ros2wasm-builder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published