34 #include <pcl/point_types.h> 35 #include <pcl/point_cloud.h> 41 #include <boost/bind.hpp> 42 #include <boost/scoped_ptr.hpp> 49 #include <gtest/gtest.h> 55 typedef pcl::PointCloud<pcl::PointXYZRGBNormal>
PCDType;
64 static const uint32_t mult = 1e6;
83 , expected_count_(expected_count)
88 void notify(
const PCDType::ConstPtr& message)
113 msg->header.frame_id =
"frame2";
129 msg->header.frame_id =
"frame1";
150 msg->header.frame_id =
"frame2";
166 msg->header.frame_id =
"frame2";
190 pcl::uint64_t pcl_stamp;
193 for (
int i = 0; i < 20; ++i)
196 msg->header.stamp = pcl_stamp;
197 msg->header.frame_id =
"frame2";
225 msg->header.frame_id =
"frame2";
243 std::vector<std::string> target_frames;
244 target_frames.push_back(
"frame1");
245 target_frames.push_back(
"frame2");
255 msg->header.frame_id =
"frame3";
284 pcl::uint64_t pcl_stamp;
290 msg->header.frame_id =
"frame2";
291 msg->header.stamp = pcl_stamp;
298 transform.
stamp_ += offset*1.1;
308 msg->header.stamp = pcl_stamp;
332 msg->header.frame_id =
"frame2";
346 msg->header.frame_id =
"";
361 boost::scoped_ptr<tf::TransformListener> tf_listener;
362 boost::scoped_ptr<tf::MessageFilter<PCDType> > tf_filter;
365 for (
int i = 0; i < 3; ++i) {
370 "map", 5, threaded_nh,
381 int main(
int argc,
char** argv)
383 testing::InitGoogleTest(&argc, argv);
386 ros::init(argc, argv,
"test_message_filter");
389 int ret = RUN_ALL_TESTS();
void add(const MEvent &evt)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
static void setNow(const Time &new_now)
void setStamp(ros::Time &stamp, pcl::uint64_t &pcl_stamp)
void fromPCL(const pcl::uint64_t &pcl_stamp, ros::Time &stamp)
void setTargetFrames(const std::vector< std::string > &target_frames)
void setCallbackQueue(CallbackQueueInterface *queue)
#define ROS_ASSERT_MSG(cond,...)
int main(int argc, char **argv)
message_filters::Connection registerFailureCallback(const FailureCallback &callback)
void notify(const geometry_msgs::PointStamped::ConstPtr &message)
void setTargetFrame(const std::string &target_frame)
void failure(const geometry_msgs::PointStamped::ConstPtr &message, FilterFailureReason reason)
ROSCPP_DECL void spinOnce()
void setTolerance(const ros::Duration &tolerance)
void toPCL(const ros::Time &stamp, pcl::uint64_t &pcl_stamp)
TEST(MessageFilter, noTransforms)
Connection registerCallback(const C &callback)
pcl::PointCloud< pcl::PointXYZRGBNormal > PCDType