eclipse-ecal / rosidl_typesupport_protobuf

Middleware agnostic ros2 static typesupport which uses Protobuf for serialization/deserialization.
Apache License 2.0
52 stars 15 forks source link

how to convert .idl file to .proto file #24

Open jackiearcobaleno opened 11 months ago

jackiearcobaleno commented 11 months ago

I got the package and colcon build it. But I cannot find the proto file in the workspace. On continue, I find it use the rosidl_adaptor_proto to generate files, but it need argument with "--generator-arguments-file" that I cannot GET it. Please show the detail step. Thank You!

@FlorianReimold

FlorianReimold commented 11 months ago

The proto files are only intermediate files for this type-support. You should find them by searching your build directory for proto files. I think the command line to do that from terminal should be find . -name "*proto" -type f

jackiearcobaleno commented 10 months ago

The proto files are only intermediate files for this type-support. You should find them by searching your build directory for proto files. I think the command line to do that from terminal should be find . -name "*proto" -type f

Thanks for the reply. Now I can exchange ros2 message with ecal protobuf message by the type-support and rmw_ecal. I don't known can it convert the ros2 native message format to proto format,such as std_msgs,sensor_msgs and etc.

FlorianReimold commented 10 months ago

Sure, this works for any ROS2 message. When using the protobuf typesupport in a ROS2 project it even is required to "convert" all the standard messages that you are using, because ROS2 doesn't ship with them.

tfoote commented 9 months ago

As of #31 there is now automatically generated Type Adapter functions which will convert between ROS native datatypes and the Proto in memory datatypes.