Skip to content

[demo] Image Processing Pipeline #55

Closed

Description

@wjwwood

The purpose of this demo is to demonstrate how ROS 2 can be used to write efficient multi node processing pipelines without sacrificing reusability, rapid development, or introspection. The idea is to setup an image processing pipeline that consists of several nodes which are publishing and subscribing to large messages (for example rgb or yuv images at a resolution >= 1280x1024) at high rates (for example 30 or 60 Hz) and show that the pipeline can operate with minimal copying of image messages. Additionally the demo can be used to show ROS 2's ability to do the runtime mapping of nodes to system processes. Giving the developer freedom to easily try different configurations and to make use of fault isolation while developing without costing production performance hits. Finally, this demo would be a candidate for showing off the type masquerading ability of ROS 2 (this is similar to how ROS 1 allowed pub/sub of non-ROS message types). Ideally, if one node publishes a custom message type and another node in the same process subscribes to the same custom type, then no copies would be needed.

Goals:

  • Demonstrate use of efficient intra-process comms.
  • Demonstrate configuration time organization of nodes into process.
  • Demonstrate using non-ROS types in comms (type masquerading).

Needed features:

Intra-process communications for Pub/Sub (services might be a stretch goal).

  • prototype rclcpp/rcl/rmw/rosidl support for inprocess messages which are used to synchronize access to shared pointers, while mimicking the QoS of the DDS network link. Prototype Pub/Sub Intra-Process Comms #59
  • Find a way to instrument messages to monitor their construction/destruction/copy methods. Add Instrumentation to Generated Msg Code rosidl#21 (for now we'll skip this)
  • Propose intra-process design based on prototype and results of instrumentation.
  • Develop tests for the intra-process comms.

Node Components (Component Nodes?)

The ability for users to write nodes which are agnostic to their execution, i.e. in its own process or sharing a process with others.

Node Component life cycle

  • [ ] At least a minimal life cycle will be required to handle the loading of nodes into a node container, i.e. startup, run, shutdown.

Configuration Management

  • [ ] Any features (syntactic sugar) needed in the launch needed to reasonably manage configuration of nodes and processes.
    • Perhaps some higher level interfaces to represent nodes and node containers.

Type Masquerading

Type masquerading is where you can publish and subscribe to types other than the message type of the topic as long as there is a mapping between them. Type masquerading is closely related to Intra-Process Communication, because if done properly no intermediate conversion is necessary if a publisher and subscribe in the same process are using the same masqueraded type.

  • [ ] Define an interface for rclcpp similar to the “message traits” interface in ROS 1.
    • This allows a user to map a custom time to a ROS message type.
    • This interface needs to have something like conversion constructors so that the custom type can be converted to and from the ROS equivalent in memory.
  • [ ] Add support for type masquerading in rclcpp where appropriate.
    • Publishers and Subscribers
    • Service Clients? and Service Servers? (probably a stretch goal for this demo)
  • [ ] Avoid unnecessary conversions and copies when using with intra-process comms.
  • [ ] Type masquerading should work with both intra-process and interprocess communications.

Other tasks:

  • Setup package with demo in it.
    • Should have three or more nodes.
    • Should have large images being transported between nodes in more than one place.
    • [ ] Should use a non-ROS message type like OpenCV's image format.
    • [ ] Should provide a few example "launch files" for different runtime configurations.
    • [ ] Should have instructions on how to introspect the activity, including: dropped messages, message buffering, and message object construction, copying, and conversions.

Activity

  1. self-assigned this
    on Jun 11, 2015
  2. added
    ready
    on Jun 11, 2015
  3. wjwwood commented on Jun 15, 2015

    @wjwwood
    MemberAuthor

    @dirk-thomas @jacquelinekay @tfoote @esteve Can you guys look over this updated description and mention anything you think is missing or unclear?

  4. jackieokay commented on Jun 15, 2015

    @jackieokay
    Contributor

    Can you define the magnitude of "large messages" and "high rates" in the first paragraph of the description?

  5. jackieokay commented on Jun 15, 2015

    @jackieokay
    Contributor

    Other considerations, I don't know how specific you want to get:

    Provide a concrete metric for when each feature will be considered done for the demo. For example, the goal for type masquerading could be "show efficient transport of an OpenCV image masquerading as a generic Image type in both intra and inter-process communication".

    Give a dependency graph for this set of features (unless you think this is already adequately captured in the MindMup)

  6. dirk-thomas commented on Jun 15, 2015

    @dirk-thomas
    Member

    Looks detailed and complete to me.

  7. wjwwood commented on Jun 15, 2015

    @wjwwood
    MemberAuthor

    Can you define the magnitude of "large messages" and "high rates" in the first paragraph of the description?

    That's a good idea, I'll come up with something that is typical, e.g. 30 Hz and 1280x1024 pixel RGB images.

    Provide a concrete metric for when each feature will be considered done for the demo. For example, the goal for type masquerading could be "show efficient transport of an OpenCV image masquerading as a generic Image type in both intra and inter-process communication".

    I can try to go into more detail about the acceptance criteria, but I wasn't sure exactly what type I would use, so I left details like using OpenCV's Mat object or something like that out of the description. The point about type masquerading working in both intra and inter process comms is valid, I'll add that.

    Give a dependency graph for this set of features (unless you think this is already adequately captured in the MindMup)

    I think these features are actually (maybe surprisingly) isolated from each other in terms of dependencies. The sub bullets of the node component model stuff is fairly sequential, but ideally they can be done independently of intra-process, type masquerading, and component life cycle items.

  8. dirk-thomas commented on Aug 19, 2015

    @dirk-thomas
    Member

    I pushed the forked pluginlib which uses the forked class_loader as well as the ament index through ament_index_cpp: https://github.com/ros/pluginlib/tree/ros2

  9. wjwwood commented on Sep 8, 2015

    @wjwwood
    MemberAuthor

    TODO for me. Summarize what's been done for the alpha 1 and move remaining things into new issues.

  10. added
    in progress
    and removed
    ready
    on Sep 15, 2015
  11. wjwwood commented on Sep 16, 2015

    @wjwwood
    MemberAuthor

    Ok, I've struck out anything we didn't close above, and I spun out a few issues for some of the more immediate tasks. We only managed to accomplish part of this demo:

    • We got intra process working.
    • We did not get loading of nodes by components done.
    • We did not get Type Masquerading implemented.
    • We did not get to extending launch with syntactic sugar for launching nodes remotely.
  12. removed
    in progress
    on Sep 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions