From 6b4a1ae697ce0bcd0dce0c08a6b339a3d6f6aa27 Mon Sep 17 00:00:00 2001 From: gavanderhoorn Date: Thu, 31 Aug 2023 12:32:57 +0200 Subject: [PATCH] Add GetActiveAlarmInfo definitions --- CMakeLists.txt | 7 ++++++- msg/AlarmCauseRemedy.msg | 10 ++++++++++ msg/AlarmInfo.msg | 36 ++++++++++++++++++++++++++++++++++++ msg/ErrorInfo.msg | 27 +++++++++++++++++++++++++++ package.xml | 1 + srv/GetActiveAlarmInfo.srv | 30 ++++++++++++++++++++++++++++++ 6 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 msg/AlarmCauseRemedy.msg create mode 100644 msg/AlarmInfo.msg create mode 100644 msg/ErrorInfo.msg create mode 100644 srv/GetActiveAlarmInfo.srv diff --git a/CMakeLists.txt b/CMakeLists.txt index 52ec279..5d02f75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,10 +7,14 @@ cmake_minimum_required(VERSION 3.5) project(motoros2_interfaces) find_package(ament_cmake REQUIRED) +find_package(builtin_interfaces REQUIRED) find_package(rosidl_default_generators REQUIRED) find_package(trajectory_msgs REQUIRED) set(msg_files + msg/AlarmInfo.msg + msg/AlarmCauseRemedy.msg + msg/ErrorInfo.msg msg/IoResultCodes.msg msg/MotionReadyEnum.msg msg/QueueResultEnum.msg @@ -18,6 +22,7 @@ set(msg_files ) set(srv_files + srv/GetActiveAlarmInfo.srv srv/QueueTrajPoint.srv srv/ReadMRegister.srv srv/ReadSingleIO.srv @@ -39,7 +44,7 @@ endif() rosidl_generate_interfaces(${PROJECT_NAME} ${msg_files} ${srv_files} - DEPENDENCIES trajectory_msgs + DEPENDENCIES builtin_interfaces trajectory_msgs ADD_LINTER_TESTS ) diff --git a/msg/AlarmCauseRemedy.msg b/msg/AlarmCauseRemedy.msg new file mode 100644 index 0000000..6662d04 --- /dev/null +++ b/msg/AlarmCauseRemedy.msg @@ -0,0 +1,10 @@ +# SPDX-FileCopyrightText: 2023, Yaskawa America, Inc. +# SPDX-FileCopyrightText: 2023, Delft University of Technology +# +# SPDX-License-Identifier: Apache-2.0 + +# Cause +string cause + +# Remedy +string remedy diff --git a/msg/AlarmInfo.msg b/msg/AlarmInfo.msg new file mode 100644 index 0000000..a872c25 --- /dev/null +++ b/msg/AlarmInfo.msg @@ -0,0 +1,36 @@ +# SPDX-FileCopyrightText: 2023, Yaskawa America, Inc. +# SPDX-FileCopyrightText: 2023, Delft University of Technology +# +# SPDX-License-Identifier: Apache-2.0 + +# Alarm Number +uint32 number + +# Alarm Name/Message +string message + +# Sub Code +int32 sub_code + +# reserved for future use +# +# Date & time at which this alarm was raised on the controller +# +# NOTE: in accordance with the "Clock and Time" ROS 2 design article, this +# stamp is in ROSTime == (local) SystemTime on Yaskawa Motoman robot +# controllers, as the latter is the only clock source supported on those +# platforms. +# +# This stamp will not be corrected for Host PC <-> Yaskawa controller clock +# drift, as it is intended purely for informational purposes (ie: for humans) +# at this time. +builtin_interfaces/Time datetime + +# reserved for future use: contents (from CSV) +string contents + +# reserved for future use: meaning (from CSV) +string description + +# reserved for future use: potential causes and their potential remedies (from CSV) +motoros2_interfaces/AlarmCauseRemedy[] help diff --git a/msg/ErrorInfo.msg b/msg/ErrorInfo.msg new file mode 100644 index 0000000..dfe163b --- /dev/null +++ b/msg/ErrorInfo.msg @@ -0,0 +1,27 @@ +# SPDX-FileCopyrightText: 2023, Yaskawa America, Inc. +# SPDX-FileCopyrightText: 2023, Delft University of Technology +# +# SPDX-License-Identifier: Apache-2.0 + +# Error Number +uint32 number + +# Error Name/Message +string message + +# Sub Code +int32 sub_code + +# reserved for future use +# +# Date & time at which this error was raised on the controller +# +# NOTE: in accordance with the "Clock and Time" ROS 2 design article, this +# stamp is in ROSTime == (local) SystemTime on Yaskawa Motoman robot +# controllers, as the latter is the only clock source supported on those +# platforms. +# +# This stamp will not be corrected for Host PC <-> Yaskawa controller clock +# drift, as it is intended purely for informational purposes (ie: for humans) +# at this time. +builtin_interfaces/Time datetime diff --git a/package.xml b/package.xml index ee12529..6ab1774 100644 --- a/package.xml +++ b/package.xml @@ -22,6 +22,7 @@ ament_cmake rosidl_default_generators + builtin_interfaces trajectory_msgs rosidl_default_runtime diff --git a/srv/GetActiveAlarmInfo.srv b/srv/GetActiveAlarmInfo.srv new file mode 100644 index 0000000..675da51 --- /dev/null +++ b/srv/GetActiveAlarmInfo.srv @@ -0,0 +1,30 @@ +# SPDX-FileCopyrightText: 2023, Yaskawa America, Inc. +# SPDX-FileCopyrightText: 2023, Delft University of Technology +# +# SPDX-License-Identifier: Apache-2.0 + +# empty request (service returns information about all active alarms & errors). + +--- + +# Result of the service invocation. Values other than one (1) signal failure. +# +# NOTE: future versions of this service may use a different set of result codes +uint32 result_code + +# string representation of the value in 'result_code', for humans +string result_message + +# Each entry in this list provides detailed information about all currently +# active alarms. If this list is empty, there are no active alarms. +# +# Note: order of entries in this list does not encode for any specific severity +# or priority of active alarms. +motoros2_interfaces/AlarmInfo[] alarms + +# Each entry in this list provides detailed information about all currently +# active errors. If this list is empty, there are no active errors. +# +# Note: order of entries in this list does not encode for any specific severity +# or priority of active errors. +motoros2_interfaces/ErrorInfo[] errors