Giter Club home page Giter Club logo

example_ownership's Introduction

Ownership example for Neuron SDK

This is a simple ROS 2 example for ownership QoS, which is supported in Neuron SDK. Ownership is often used for redundancy nodes. There are two attributes: kind and strength. If there are several publishers and their kind are shared, these publishers share the ownership to publishe messages. If their kind are exclusive with different strength, subscriber will only receive messages from higher strength publisher.

Shared ownership example

  • subscriber side
ros2 run nsdk_ownership ownership_sub -k shared
  • publisher side

    • One publisher is shared ownership and it's ID is 100
ros2 run nsdk_ownership ownership_pub -k shared -i 100
  • One publisher is shared ownership and it's ID is 200
ros2 run nsdk_ownership ownership_pub -k shared -i 200

Exclusive ownership example

  • subscriber side
ros2 run nsdk_ownership ownership_sub -k exclusive
  • publisher side

    • One publisher is shared ownership and it's ID is 100
ros2 run nsdk_ownership ownership_pub -k exclusive -i 100 -s 100
  • One publisher is shared ownership and it's ID is 200
ros2 run nsdk_ownership ownership_pub -k exclusive -i 200 -s 200

Now you can see subscriber only can receive message from node id 200. If you stop the publisher which node id is 200, you will see the publisher which node id is 100 hands over.

example_ownership's People

Contributors

evshary 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.