Skip to content
2 changes: 2 additions & 0 deletions type_description_interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ rosidl_generate_interfaces(${PROJECT_NAME}
"msg/Field.msg"
"msg/FieldType.msg"
"msg/IndividualTypeDescription.msg"
"msg/KeyValue.msg"
"msg/TypeDescription.msg"
"srv/GetTypeDescription.srv"
ADD_LINTER_TESTS
)

Expand Down
2 changes: 2 additions & 0 deletions type_description_interfaces/msg/KeyValue.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
string key
string value
2 changes: 2 additions & 0 deletions type_description_interfaces/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

<buildtool_depend>rosidl_core_generators</buildtool_depend>

<depend>service_msgs</depend>

<exec_depend>rosidl_core_runtime</exec_depend>

Comment thread
emersonknapp marked this conversation as resolved.
<test_depend>ament_lint_auto</test_depend>
Expand Down
43 changes: 43 additions & 0 deletions type_description_interfaces/srv/GetTypeDescription.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# ROS interface type name, in PACKAGE/NAMESPACE/TYPENAME format
string type_name

# REP-2011 RIHS hash string, which looks like RIHSxx_hashvalue
string type_version_hash

# Whether to return the raw idl or msg file(s) in the response, if available
bool include_raw_description true
---
# include_raw_description requested, and provided successfully
uint8 RAW_DESCRIPTION_REQUESTED_PROVIDED = 0
# include_raw_description disabled, so type_description_raw was left empty
uint8 RAW_DESCRIPTION_NOT_REQUESTED_NOT_PROVIDED = 1
# include_raw_description requested, but no raw version available (perhaps for dynamically created types)
uint8 RAW_DESCRIPTION_REQUESTED_NOT_AVAILABLE = 2

# True if the type description information is available and populated in the response
Comment thread
emersonknapp marked this conversation as resolved.
Outdated
# If false, all other fields except `reason` are considered undefined
bool successful
# If `successful` is false, contains a reason for failure.
# On success, may contain a reason for missing type_description_raw.
string reason

# Contains a value from RAW_DESCRIPTION_ constants, explaining whether the
# `type_description_raw_file_name` and `type_description_raw` fields contain valid data.
uint8 type_description_raw_result

# The idl or msg file name
# Empty if not available, which will be noted in `reason`
string type_description_raw_file_name

# The idl or msg file, with comments and whitespace
# The file extension and/or the contents can be used to determine the format
# This contains all recursive raw files, each separated by a line of 80 '=' characters
# The order will be the same as the TypeDescription -
# which is top level interface, then referenced type descriptions in alphabetical order by type_name
string type_description_raw
Comment thread
emersonknapp marked this conversation as resolved.
Outdated
Comment thread
emersonknapp marked this conversation as resolved.
Outdated

# The parsed type description which can be used programmatically
TypeDescription type_description

# Key-value pairs of extra information.
KeyValue[] extra_information