C++ define for ros-version: ifdef ROS_MELODIC
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?
See whether #q9562 is sufficient. It's not
#if ROS_MELODIC
though.Another option: CMake defines: #q148831.