ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

--> Solved my own problem

Point is not working PointStamped is required!

  point_1_topic_ = nh.param("point_fusion/point_1_topic", std::string("/turtlebot3/ball_tracking/first_ball_state/position"));
  point_2_topic_ = nh.param("point_fusion/point_2_topic", std::string("/ball_tracking_depth/first_ball_state"));


  message_filters::Subscriber<geometry_msgs::PointStamped> image1_sub(nh, "image1", 1);
  message_filters::Subscriber<geometry_msgs::PointStamped> image2_sub(nh, "image2", 1);

  typedef message_filters::sync_policies::ApproximateTime<geometry_msgs::PointStamped, geometry_msgs::PointStamped> MySyncPolicy;
  // ApproximateTime takes a queue size as its constructor argument, hence MySyncPolicy(10)
  message_filters::Synchronizer<MySyncPolicy> sync(MySyncPolicy(10), image1_sub, image2_sub);