Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate content from std_msgs #11

Merged
merged 8 commits into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,38 @@ find_package(rosidl_default_generators REQUIRED)

rosidl_generate_interfaces(${PROJECT_NAME}
"action/Fibonacci.action"
"msg/Bool.msg"
"msg/Byte.msg"
"msg/ByteMultiArray.msg"
"msg/Char.msg"
"msg/Empty.msg"
"msg/Float32.msg"
"msg/Float32MultiArray.msg"
"msg/Float64.msg"
"msg/Float64MultiArray.msg"
"msg/Int16.msg"
"msg/Int16MultiArray.msg"
"msg/Int32.msg"
"msg/Int32MultiArray.msg"
"msg/Int64.msg"
"msg/Int64MultiArray.msg"
"msg/Int8.msg"
"msg/Int8MultiArray.msg"
"msg/MultiArrayDimension.msg"
"msg/MultiArrayLayout.msg"
"msg/String.msg"
"msg/UInt16.msg"
"msg/UInt16MultiArray.msg"
"msg/UInt32.msg"
"msg/UInt32MultiArray.msg"
"msg/UInt64.msg"
"msg/UInt64MultiArray.msg"
"msg/UInt8.msg"
"msg/UInt8MultiArray.msg"
"msg/WString.msg"
"srv/AddTwoInts.srv"
"srv/SetBool.srv"
"srv/Trigger.srv"
)

install(FILES mapping_rules.yaml DESTINATION share/${PROJECT_NAME})
Expand Down
5 changes: 5 additions & 0 deletions msg/Bool.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, bool.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
bool data
5 changes: 5 additions & 0 deletions msg/Byte.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, byte.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
byte data
9 changes: 9 additions & 0 deletions msg/ByteMultiArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.

# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.

MultiArrayLayout layout # specification of data layout
byte[] data # array of data
5 changes: 5 additions & 0 deletions msg/Char.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, char.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
char data
2 changes: 2 additions & 0 deletions msg/Empty.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
5 changes: 5 additions & 0 deletions msg/Float32.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, float32.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
float32 data
9 changes: 9 additions & 0 deletions msg/Float32MultiArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.

# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.

MultiArrayLayout layout # specification of data layout
float32[] data # array of data
5 changes: 5 additions & 0 deletions msg/Float64.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, float64.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
float64 data
9 changes: 9 additions & 0 deletions msg/Float64MultiArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.

# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.

MultiArrayLayout layout # specification of data layout
float64[] data # array of data
5 changes: 5 additions & 0 deletions msg/Int16.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, int16.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
int16 data
9 changes: 9 additions & 0 deletions msg/Int16MultiArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.

# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.

MultiArrayLayout layout # specification of data layout
int16[] data # array of data
5 changes: 5 additions & 0 deletions msg/Int32.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, int32.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
int32 data
9 changes: 9 additions & 0 deletions msg/Int32MultiArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.

# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.

MultiArrayLayout layout # specification of data layout
int32[] data # array of data
5 changes: 5 additions & 0 deletions msg/Int64.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, int64.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
int64 data
9 changes: 9 additions & 0 deletions msg/Int64MultiArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.

# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.

MultiArrayLayout layout # specification of data layout
int64[] data # array of data
5 changes: 5 additions & 0 deletions msg/Int8.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, in8.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
int8 data
9 changes: 9 additions & 0 deletions msg/Int8MultiArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.

# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.

MultiArrayLayout layout # specification of data layout
int8[] data # array of data
7 changes: 7 additions & 0 deletions msg/MultiArrayDimension.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.

string label # label of given dimension
uint32 size # size of given dimension (in type units)
uint32 stride # stride of given dimension
30 changes: 30 additions & 0 deletions msg/MultiArrayLayout.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.
Copy link

@hidmic hidmic May 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tfoote datastruct -- In other places we talk about data types in a similar, almost equivalent way. Consider standardizing the terminology.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I specifically chose datastruct here to refer to the structure as opposed to the type as the guidance is to make a new type (indirectly by the new message).


# The multiarray declares a generic multi-dimensional array of a
# particular data type. Dimensions are ordered from outer most
# to inner most.
#
# Accessors should ALWAYS be written in terms of dimension stride
# and specified outer-most dimension first.
#
# multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]
#
# A standard, 3-channel 640x480 image with interleaved color channels
# would be specified as:
#
# dim[0].label = "height"
# dim[0].size = 480
# dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image)
# dim[1].label = "width"
# dim[1].size = 640
# dim[1].stride = 3*640 = 1920
# dim[2].label = "channel"
# dim[2].size = 3
# dim[2].stride = 3
#
# multiarray(i,j,k) refers to the ith row, jth column, and kth channel.

MultiArrayDimension[] dim # Array of dimension properties
uint32 data_offset # padding bytes at front of data
5 changes: 5 additions & 0 deletions msg/String.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, string.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
string data
5 changes: 5 additions & 0 deletions msg/UInt16.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, uint16.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
uint16 data
9 changes: 9 additions & 0 deletions msg/UInt16MultiArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.

# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.

MultiArrayLayout layout # specification of data layout
uint16[] data # array of data
5 changes: 5 additions & 0 deletions msg/UInt32.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, uint32.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
uint32 data
9 changes: 9 additions & 0 deletions msg/UInt32MultiArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.

# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.

MultiArrayLayout layout # specification of data layout
uint32[] data # array of data
5 changes: 5 additions & 0 deletions msg/UInt64.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, unint64.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
uint64 data
9 changes: 9 additions & 0 deletions msg/UInt64MultiArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.

# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.

MultiArrayLayout layout # specification of data layout
uint64[] data # array of data
5 changes: 5 additions & 0 deletions msg/UInt8.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, uint8.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
uint8 data
9 changes: 9 additions & 0 deletions msg/UInt8MultiArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is an example of using complex datatypes.
# It is not recommended to use directly.
# To use a similar datastruct please define a custom message with appropriate semantic meaning.

# Please look at the MultiArrayLayout message definition for
# documentation on all multiarrays.

MultiArrayLayout layout # specification of data layout
uint8[] data # array of data
5 changes: 5 additions & 0 deletions msg/WString.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is an example message of using a primitive datatype, wstring.
# If you want to test with this that's fine, but if you are deploying
# it into a system you should create a semantically meaningful message type.
# If you want to embed it in another message, use the primitive data type instead.
wstring data
8 changes: 8 additions & 0 deletions srv/SetBool.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This is an example of a service to set a boolean value.
# This can be used for testing but a semantically meaningful
# one should be created to be built upon.

bool data # e.g. for hardware enabling / disabling
---
bool success # indicate successful run of triggered service
string message # informational, e.g. for error messages
7 changes: 7 additions & 0 deletions srv/Trigger.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# An example of a trigger service.
# This can be used for testing but a semantically meaningful
# one should be created to be built upon.

---
bool success # indicate successful run of triggered service
string message # informational, e.g. for error messages.