Expand description
The ROS 2 interface definition languages .msg and .srv, parsed.
A .msg file is one field or constant a line, after the ROS 2
documentation “Interfaces”:
# a comment
int32 x # a field
int32 y 5 # a field with a default value
string<=10 name "abc" # a bounded string
float64[3] v # an array; [] a sequence, [<=N] a bounded one
geometry_msgs/Point p # a message of another package
Point q # a message of the same package
int32 MAX=100 # a constant (its name in capitals)A .srv file is a request and a response, separated by a line ---.
A bare Header is std_msgs/Header, as in ROS 1.
Structs§
- Constant
Spec - A constant of a message.
- Field
Spec - A field of a message.
- Message
Spec - A message, as written.
- Service
Spec - A service, as written.
- Type
Spec - The type of a field.
Enums§
- Array
Spec - Whether a field is one value, an array or a sequence.
- Base
Spec - The type of a field, before the messages it names are found.
- Primitive
- A primitive type of the interface languages.
Functions§
- parse_
message - Parses the text of a
.msgfile of messagename. - parse_
service - Parses the text of a
.srvfile of servicename(pkg/srv/Name). - parse_
type - Parses the type of a field in a message of
package.