message filters PoseWithCovarianceStamped
Dear Ros Users, I tried to use a message filters to sync two PoseWithCovarianceStamped topics
void callback(const geometry_msgs::PoseWithCovarianceStampedPtr& pose_1, const geometry_msgs::PoseWithCovarianceStampedPtr& pose_2)
{
...
}
message_filters::Subscriber<geometry_msgs::posewithcovariancestamped> pose_sub_1(nh, "pose_1", 1);
message_filters::Subscriber<geometry_msgs::posewithcovariancestamped> pose_sub_2(nh, "pose_2", 1);
message_filters::TimeSynchronizer <geometry_msgs::PoseWithCovarianceStamped, geometry_msgs::PoseWithCovarianceStamped> sync(pose_sub_1, pose_sub_2, 10);
sync.registerCallback(boost::bind(&callback, _1, _2));
but I got error at compile time:
/usr/include/boost/bind/bind.hpp:313:34: error: invalid initialization of reference of type ‘const boost::shared_ptr<geometry_msgs::posewithcovariancestamped_<std::allocator<void> > >&’ from expression of type ‘const boost::shared_ptr<const geometry_msgs::posewithcovariancestamped_<std::allocator<void=""> > >’ unwrapper<f>::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]);