Getting a compile error including rosgraph_msgs/Log
Greetings,
I am trying to use rosgraph_msgs/Log to subscribe to rosout and when I include the header file I get the following compile error:
<command-line>:0:7: error: expected identifier before numeric constant
/opt/ros/melodic/include/rosgraph_msgs/Log.h:95:5: note: in expansion of macro ‘DEBUG’
DEBUG = 1,
^~~~~
<command-line>:0:7: error: expected ‘}’ before numeric constant
/opt/ros/melodic/include/rosgraph_msgs/Log.h:95:5: note: in expansion of macro ‘DEBUG’
DEBUG = 1,
^~~~~
<command-line>:0:7: error: expected unqualified-id before numeric constant
/opt/ros/melodic/include/rosgraph_msgs/Log.h:95:5: note: in expansion of macro ‘DEBUG’
DEBUG = 1,
^~~~~
In file included from ....
/opt/ros/melodic/include/rosgraph_msgs/Log.h:103:52: error: ‘ContainerAllocator’ was not declared in this scope
typedef boost::shared_ptr< ::rosgraph_msgs::Log_<ContainerAllocator> > Ptr;
^~~~~~~~~~~~~~~~~~
/opt/ros/melodic/include/rosgraph_msgs/Log.h:103:70: error: template argument 1 is invalid
typedef boost::shared_ptr< ::rosgraph_msgs::Log_<ContainerAllocator> > Ptr;
^
/opt/ros/melodic/include/rosgraph_msgs/Log.h:103:72: error: template argument 1 is invalid
typedef boost::shared_ptr< ::rosgraph_msgs::Log_<ContainerAllocator> > Ptr;
^
/opt/ros/melodic/include/rosgraph_msgs/Log.h:104:52: error: ‘ContainerAllocator’ was not declared in this scope
typedef boost::shared_ptr< ::rosgraph_msgs::Log_<ContainerAllocator> const> ConstPtr;
^~~~~~~~~~~~~~~~~~
/opt/ros/melodic/include/rosgraph_msgs/Log.h:104:70: error: template argument 1 is invalid
typedef boost::shared_ptr< ::rosgraph_msgs::Log_<ContainerAllocator> const> ConstPtr;
^
/opt/ros/melodic/include/rosgraph_msgs/Log.h:104:77: error: template argument 1 is invalid
typedef boost::shared_ptr< ::rosgraph_msgs::Log_<ContainerAllocator> const> ConstPtr;
^
/opt/ros/melodic/include/rosgraph_msgs/Log.h:110:45: error: ‘Log’ is not a member of ‘rosgraph_msgs’
typedef boost::shared_ptr< ::rosgraph_msgs::Log > LogPtr;
^~~
/opt/ros/melodic/include/rosgraph_msgs/Log.h:110:45: note: suggested alternative: ‘Log_’
typedef boost::shared_ptr< ::rosgraph_msgs::Log > LogPtr;
^~~
Log_
/opt/ros/melodic/include/rosgraph_msgs/Log.h:110:45: error: ‘Log’ is not a member of ‘rosgraph_msgs’
/opt/ros/melodic/include/rosgraph_msgs/Log.h:110:45: note: suggested alternative: ‘Log_’
typedef boost::shared_ptr< ::rosgraph_msgs::Log > LogPtr;
^~~
Log_
/opt/ros/melodic/include/rosgraph_msgs/Log.h:110:49: error: template argument 1 is invalid
typedef boost::shared_ptr< ::rosgraph_msgs::Log > LogPtr;
^
/opt/ros/melodic/include/rosgraph_msgs/Log.h:111:45: error: ‘Log’ is not a member of ‘rosgraph_msgs’
typedef boost::shared_ptr< ::rosgraph_msgs::Log const> LogConstPtr;
^~~
/opt/ros/melodic/include/rosgraph_msgs/Log.h:111:45: note: suggested alternative: ‘Log_’
typedef boost::shared_ptr< ::rosgraph_msgs::Log const> LogConstPtr;
^~~
Log_
/opt/ros/melodic/include/rosgraph_msgs/Log.h:111:45: error: ‘Log’ is not a member of ‘rosgraph_msgs’
/opt/ros/melodic/include/rosgraph_msgs/Log.h:111:45: note: suggested alternative: ‘Log_’
typedef boost::shared_ptr< ::rosgraph_msgs::Log const> LogConstPtr;
^~~
Log_
/opt/ros/melodic/include/rosgraph_msgs/Log.h:111:54: error: template argument 1 is invalid
typedef boost::shared_ptr< ::rosgraph_msgs::Log const> LogConstPtr;
^
/opt/ros/melodic/include/rosgraph_msgs/Log.h:155:1: error: expected declaration before ‘}’ token
} // namespace rosgraph_msgs
^
When I comment out #include <rosgraph_msgs log.h=""> I compile fine. rosgraph_msgs is added to my catkin_package in cmake and in my package.xml. Versions: 1.11.2-0bionic.20201017.050047
Is ...