Quantcast
Viewing latest article 25
Browse Latest Browse All 670

catkin build protobuf?

Hi folks, how can I get `catkin` to build and deploy the results of protobuf's `.proto` files? What's the SOTA in this regard? I've tried find_package(Protobuf REQUIRED) include_directories(${Protobuf_INCLUDE_DIRS}) protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS protobuf/imu_data.proto) protobuf_generate_python(PROTO_PY protobuf/imu_data.proto) But that does nothing. It finds Protobuf but the bottom two commands basically do nothing. Not even throw an error. Is this the recommended way? Thank you! Cheers, Hendrik PS: I'm using `python-catkin-tools`, say, `catkin build` instead of `catkin_make`. In case that's some vital information... # Update 1: I managed to make it build by adding the line add_custom_target(imu_sys_proto ALL DEPENDS ${PROTO_PY}) to the `CMakeLists.txt`. This makes `catkin` (or rather `cmake`) **build** the Python bindings for my `.proto` file. But it does not **install** it. ## Question extension 1 So I'll extend my question to: what do I need to add to the `CMakeLists.txt` in order for `catkin` to copy the resulting `...pb2.py`file(s) to the correct folder (whichever that might be)?

Viewing latest article 25
Browse Latest Browse All 670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>