[ros-users] Problems with boost and sensor_msgs

panj panjia1983 at gmail.com
Sat Dec 18 05:03:17 UTC 2010


Yes. I tried both pcl and bag API. The sensor_msgs problem is solved. But the
boost problem is still there....

part of the code:

#include "point_geometry.h"
#include "utility.h"
//#include 
//#include 
//#include 
//#include 

//#include 
//#include 

#include 
#include 

int PointCloudGeometry::loadBAG(const char* fileName, float scalarFactor)
{
        ///************ use bag
	//rosbag::Bag bag(std::string(fileName), rosbag::bagmode::Read);
	//std::string topic_name("/narrow_stereo_textured/points2");
	//rosbag::View view(bag, rosbag::TopicQuery(topic_name));
	//BOOST_FOREACH(rosbag::MessageInstance const m, view)
	//{
	//	sensor_msgs::PointCloud2::Ptr i = m.instantiate();
	//}
	//bag.close();

 /// ************* use pcl 
  sensor_msgs::PointCloud2ConstPtr cloud_blob, cloud_blob_prev;
  pcl::PointCloud cloud;

  pcl_ros::BAGReader reader;

	return 1;
}

boost error:
/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
In file included from /usr/include/boost/smart_ptr/shared_ptr.hpp:31,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from
/opt/ros/cturtle/stacks/point_cloud_perception/pcl/include/pcl/pcl_base.h:56,
                 from
/opt/ros/cturtle/stacks/point_cloud_perception/pcl_ros/include/pcl_ros/pcl_nodelet.h:48,
                 from
/opt/ros/cturtle/stacks/point_cloud_perception/pcl_ros/include/pcl_ros/io/bag_io.h:41,
                 from
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.cpp:11:
/usr/include/boost/throw_exception.hpp:57: error: expected identifier before
numeric constant
/usr/include/boost/throw_exception.hpp:57: error: expected '>' before
numeric constant
/usr/include/boost/throw_exception.hpp:57: error: variable or field
'throw_exception' declared void
/usr/include/boost/throw_exception.hpp:57: error: expected ')' before
'const'
In file included from /usr/include/boost/smart_ptr/shared_ptr.hpp:32,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from
/opt/ros/cturtle/stacks/point_cloud_perception/pcl/include/pcl/pcl_base.h:56,
                 from
/opt/ros/cturtle/stacks/point_cloud_perception/pcl_ros/include/pcl_ros/pcl_nodelet.h:48,
                 from
/opt/ros/cturtle/stacks/point_cloud_perception/pcl_ros/include/pcl_ros/io/bag_io.h:41,
                 from
/playpen/panj/Workspace/roswork/pCOL/pCOL/point_geometry.cpp:11:



-- 
View this message in context: http://ros-users.122217.n3.nabble.com/Problems-with-boost-and-sensor-msgs-tp2108524p2109104.html
Sent from the ROS-Users mailing list archive at Nabble.com.



More information about the ros-users mailing list