C++ define for ros-version: ifdef ROS_MELODIC

asked 2019-02-01 12:15:25 -0600

I have some problems with some planner plugins a implemented for the navigation stack. They now are not compatible with melodic because several parts of the API changed, ie:

  • Costmap2DROS::getRobotPose

  • BaseLocalPlanner::initialize

I think this issue could be easily solved using some precompilation directives on the c++ code that enables some code for MELODIC and some other for PREVIOUS versions.

Does that define variable exist?

edit retag flag offensive close merge delete

Comments

1

See whether #q9562 is sufficient. It's not #if ROS_MELODIC though.

Another option: CMake defines: #q148831.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-01 13:24:36 -0600 )edit