def main(self, *, args): warnings.warn( "'ros2 msg' is deprecated and will be removed in a future ROS release. " f"Instead use: 'ros2 interface packages -m'" ) message_types = get_all_message_types() for package_name in sorted(message_types.keys()): print(package_name)
def main(self, *, args): warnings.warn( "'ros2 msg' is deprecated and will be removed in a future ROS release. " "Instead use: 'ros2 interface list -m'" ) message_types = get_all_message_types() for package_name in sorted(message_types.keys()): for message_name in sorted(message_types[package_name]): print('{package_name}/msg/{message_name}'.format_map(locals()))
def test_api(): all_message_types = get_all_message_types() # explicit dependencies of this package will for sure be available assert 'std_msgs' in all_message_types.keys() for package_name, message_types in all_message_types.items(): assert isinstance(message_types, Iterable) message_types2 = get_message_types(package_name) assert set(message_types) == set(message_types2) if package_name != 'std_msgs': continue for message_name in message_types: message_path = get_message_path(package_name, message_name) assert os.path.isfile(message_path) # check known package name get_message_types('std_msgs') message_path = get_message_path('std_msgs', 'Empty') assert os.path.isfile(message_path) # check not existing package name try: get_message_types('_not_existing_package_name') assert False except LookupError: pass # check package with doesn't have messages message_names = get_message_types('std_srvs') assert len(message_names) == 0 # check known package for not existing message name try: get_message_path('std_msgs', '_not_existing_message_name') assert False except LookupError: pass
def main(self, *, args): message_types = get_all_message_types() for package_name in sorted(message_types.keys()): print(package_name)
def main(self, *, args): message_types = get_all_message_types() for package_name in sorted(message_types.keys()): for message_name in sorted(message_types[package_name]): print('{package_name}/msg/{message_name}'.format_map(locals()))