[ros-users] Problems with boost and sensor_msgs

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: ros-users
Subject: [ros-users] Problems with boost and sensor_msgs
Hi,
I am trying to write a package in ros, which needs boost and sensor_msgs. I
add the depends to sensor_msgs in manifest file and also add the
rosbuild_add_boost_directories() in cmake file. But
still have compile problems like

In file included from
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.cpp:1:
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:10: error:
'sensor_msgs' has not been declared
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:10: error: ISO
C++ forbids declaration of 'PointCloud2' with no type
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:10: error:
typedef name may not be a nested-name-specifier
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:10: error:
expected ';' before 'PointCloud'
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:11: error:
'PointCloud' has not been declared
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:11: error: ISO
C++ forbids declaration of 'Ptr' with no type
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:11: error:
typedef name may not be a nested-name-specifier
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:11: error:
expected ';' before 'PointCloudPtr'
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:12: error:
'PointCloud' has not been declared
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:12: error: ISO
C++ forbids declaration of 'ConstPtr' with no type
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:12: error:
typedef name may not be a nested-name-specifier
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:12: error:
expected ';' before 'PointCloudConstPtr'
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:46: error: extra
qualification 'PointCloudGeometry::' on member 'loadBAG'
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h: In member
function 'virtual Vector3* PointCloudGeometry::get_verlist()':
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.h:30: warning: no
return statement in function returning non-void
In file included from /usr/include/boost/throw_exception.hpp:36,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:31,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from
/opt/ros/cturtle/ros/tools/rosbag/include/rosbag/chunked_file.h:42,
                 from
/opt/ros/cturtle/ros/tools/rosbag/include/rosbag/bag.h:39,
                 from
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.cpp:3:
/usr/include/boost/exception/exception.hpp: At global scope:
/usr/include/boost/exception/exception.hpp:129: error: expected identifier
before numeric constant
/usr/include/boost/exception/exception.hpp:129: error: expected '>' before
numeric constant
/usr/include/boost/exception/exception.hpp:130: error: expected
unqualified-id before numeric constant
/usr/include/boost/exception/exception.hpp:207: error: expected identifier
before numeric constant
/usr/include/boost/exception/exception.hpp:207: error: expected '>' before
numeric constant
/usr/include/boost/exception/exception.hpp:209: error: expected
unqualified-id before numeric constant
/usr/include/boost/exception/exception.hpp:216: error: expected identifier
before numeric constant
/usr/include/boost/exception/exception.hpp:216: error: expected '>' before
numeric constant
/usr/include/boost/exception/exception.hpp:218: error: expected
unqualified-id before numeric constant
/usr/include/boost/exception/exception.hpp:225: error: expected identifier
before numeric constant
/usr/include/boost/exception/exception.hpp:225: error: expected '>' before
numeric constant
/usr/include/boost/exception/exception.hpp:227: error: expected
unqualified-id before numeric constant
/usr/include/boost/exception/exception.hpp:236: error: expected identifier
before numeric constant
/usr/include/boost/exception/exception.hpp:236: error: expected '>' before
numeric constant
/usr/include/boost/exception/exception.hpp:237: error: expected
unqualified-id before numeric constant


and many similar errors.

How can I solve them?

Thx.

--
Jia Pan
Department of Computer Science, Campus Box 3175, Sitterson Hall,
UNC-Chapel Hill,
Chapel Hill, NC 27599-3175, USA