def ros_type_from_type(uavcan_type):
if uavcan_type.category == uavcan_type.CATEGORY_COMPOUND:
if uavcan_type.kind == uavcan_type.KIND_MESSAGE:
return Message(uavcan_type.full_name).Type
elif uavcan_type.kind == uavcan_type.KIND_SERVICE:
return Service(uavcan_type.full_name).Type
# No ROS type so return something that evaluates to None.
return lambda: None
评论列表
文章目录