MicroROS RTIDL is a project that will automate the conversion from .msg files to Python object. This code can run on the device or a computer then upload the Python objects to the device.
Python object can be hand crafted also.
An example of this schema is here Geometry:Twist
class Twist():
dataMap = {
"message_name": "Twist",
"message_namespace": "geometry_msgs::msg",
"components": [
{
"name": "linear",
"type": "Vector3",
"components": [
{
"name": "x",
"type": "float64"
},
{
"name": "y",
"type": "float64"
},
{
"name": "z",
"type": "float64"
}
]
},
{
"name": "angular",
"type": "Vector3",
"components": [
{
"name": "x",
"type": "float64"
},
{
"name": "y",
"type": "float64"
},
{
"name": "z",
"type": "float64"
}
]
}
]
}
typeTwist = registerDataType(Twist.dataMap)
#
# dumpDataType is used to output the instruction list for the Python Object
# This is used for Diagnostic purposes and can be deleted.
#
dumpDataType(typeTwist)
print("Registering Event Publishers\r\n")
pubCmdVel = registerROSPublisher("turtle1/cmd_vel", typeTwist)