Skip to content
Vamsi Krishna K edited this page Apr 20, 2022 · 31 revisions

Welcome to the ss22-ros2-perception wiki!

Summary of some important concepts in ROS2:

1. Lifecycle nodes:

  • Lifecycle nodes are managed nodes state machines. It has primary and transition states.
  • Task is performed in primary states (steady states).
  • Transition states (intermediate states) indicate if the transition between two states is successful.
  • In a service client lifecycle, an external user can control the lifecycle of the nodes
  • Application - For some devices which take a long booting time such as laser or camera, we can perform activities in their configuring state.
  • currently, subscriber is not provided by the Lifecycle class.
  • Reference - https://github.com/ros2/demos/blob/foxy/lifecycle/README.rst

2. Composition

  • ROS2 component is similar to ROS1 nodelet.
  • With components, it's easy to
    1. Add common concepts like lifecycle to an existing node.
    2. Run multiple nodes in separate processes (easy to debug individual nodes)
    3. Run multiple nodes in a single process (for efficient communication - Intra Process Communication)
  • Multiple components can be registered in the same shared library.
  • Reference - https://docs.ros.org/en/foxy/Concepts/About-Composition.html#writing-a-component

3. Quality of service:

  • Quality of Service (QoS) policies handles communication between the nodes.
  • If not defined, system default parameters will be chosen for the QoS profile.
  • Reliability, Lifespan, and Liveliness are some of the important QoS policies.
  • When compared to ROS1, ROS1 only sends "reliable" data. There is no option for "best-effort" reliability.
  • For critical applications, it is important to receive image data as soon as it is captured (Reliability - 'Best Effort'). Losing 5-6 frames doesn't matter for subscribers in this case. While some subscribers need reliable data.
  • We can configure QoS profiles for both publishers and subscribers. But we have to take care of compatibility constraints if we assign different profiles to them.
  • Reference - https://docs.ros.org/en/foxy/Concepts/About-Quality-of-Service-Settings.html

4. Message filters

  • Message filters have a policy defined for each filter. These filters take messages as input and depending upon this policy, they may or may not output the message at a later point in time.
  • Example - time synchronizer takes messages from multiple sources and outputs if all the received messages have the same timestamp. With C++ we can synchronize up to 9 channels.
  • Each filter has different input and output types. So, not all filters are inter-connectable.
  • Reference - https://github.com/ros2/message_filters/blob/master/include/message_filters/time_synchronizer.h
Clone this wiki locally