diff --git a/ros2caret/verb/check_caret_rclcpp.py b/ros2caret/verb/check_caret_rclcpp.py index 7a5025c..ebc5805 100644 --- a/ros2caret/verb/check_caret_rclcpp.py +++ b/ros2caret/verb/check_caret_rclcpp.py @@ -71,6 +71,7 @@ class RclcppCheck(): def __init__(self, root_dir_path: str) -> None: RclcppCheck._ensure_dir_exist(root_dir_path) + RclcppCheck._validate_ros_distrinution(root_dir_path) get_package_name = RclcppCheck._create_get_package_name(root_dir_path) ros_obj_paths = RclcppCheck._get_obj_paths(root_dir_path) @@ -171,6 +172,16 @@ def _ensure_dir_exist(path: str): 'where the build command completed.') exit(1) + @staticmethod + def _validate_ros_distrinution(path: str): + if os.environ['ROS_DISTRO'][0] < 'i': + return + logger.info('For ROS Distributions after iron, ' + 'applications can be evaluated ' + 'without building with caret-rclcpp. ' + 'For this reason, the verification procedure is skipped.') + exit(0) + @staticmethod def get_package_name_from_path(root_dir_path: str, path: str) -> str: package_name = path.replace(root_dir_path, '').split('/')[0]