Offworld-Robotics / numbat_software

Off World Robotics NUMBAT Backend
5 stars 4 forks source link

Implement Protocol Buffers in ROS #29

Closed hjed closed 9 years ago

hjed commented 10 years ago

The aim is to use them with pics to allow more accurate timing. This avoids corruption issues with audrinos when using a large number of ros topics.

hjed commented 10 years ago

For ubuntu the protobuf compiler is in the package protobuf-compiler

hjed commented 10 years ago

To add protobuffs to catkin_make

find_package(Protobuf REQUIRED) include_directories(${PROTOBUF_INCLUDE_DIRS}) PROTOBUF_GENERATE_CPP( src include messages/messages1.proto)

change: include_directories( ${catkin_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} )

AND target_link_libraries([node name] ${catkin_LIBRARIES} ${PROTOBUF_LIBRARIES} )

hjed commented 10 years ago

Just a note that the lib-protocdev package needs to be installed for this to compile as well

hjed commented 10 years ago

I can't make it this Saturday, but should have time to work on this during the week. It should be done by next Saturday, just need to fix some C++ generics bugs.

hjed commented 10 years ago

Not protbuff messages cannot have the same name as variables in that message