Skip to content

Commit

Permalink
Included get_available_rmw_implementations
Browse files Browse the repository at this point in the history
Signed-off-by: ahcorde <ahcorde@gmail.com>
  • Loading branch information
ahcorde committed Feb 27, 2020
1 parent c01a0ee commit bb6a939
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rclpy/rclpy/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
from rclpy.constants import S_TO_NS
from rclpy.context import Context

import ament_index_python

g_default_context = None
g_context_lock = threading.Lock()

Expand Down Expand Up @@ -68,6 +70,12 @@ def get_rmw_implementation_identifier():
return rclpy_implementation.rclpy_get_rmw_implementation_identifier()


def get_available_rmw_implementations():
"""Return the set of all available RMW implementations as registered in the ament index."""
rmw_implementations = ament_index_python.get_resources('rmw_typesupport')
return {name for name in rmw_implementations if name != 'rmw_implementation'}


def timeout_sec_to_nsec(timeout_sec):
"""
Convert timeout in seconds to rcl compatible timeout in nanoseconds.
Expand Down

0 comments on commit bb6a939

Please sign in to comment.