58 sync_var.reset(
new SyncType(
SyncPolicy(5), left_sub, right_sub, left_info_sub, right_info_sub) );
71 const sensor_msgs::ImageConstPtr& r_img_msg,
72 const sensor_msgs::CameraInfoConstPtr& l_info_msg,
73 const sensor_msgs::CameraInfoConstPtr& r_info_msg)
76 ROS_INFO(
"[SyncNode]: Initialized.");
96 msg.data =
"Reseting camera driver at ROSTIME: " +
97 boost::lexical_cast<
string>(now) +
"s.";
void publish(const boost::shared_ptr< M > &message) const
image_transport::ImageTransport it_
ros::Timer sync_timer_
Maximum time without sync
ROSCPP_DECL void spin(Spinner &spinner)
double timer_period_
Last ros time sync
message_filters::sync_policies::ApproximateTime< sensor_msgs::Image, sensor_msgs::Image, sensor_msgs::CameraInfo, sensor_msgs::CameraInfo > SyncPolicy
Camera name
Sync(ros::NodeHandle nh, ros::NodeHandle nhp)
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
double last_ros_sync_
True when node is initialized.
Timer createTimer(Rate r, Handler h, Obj o, bool oneshot=false, bool autostart=true) const
double max_unsync_time_
Timer period
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void msgsCallback(const sensor_msgs::ImageConstPtr &l_img_msg, const sensor_msgs::ImageConstPtr &r_img_msg, const sensor_msgs::CameraInfoConstPtr &l_info_msg, const sensor_msgs::CameraInfoConstPtr &r_info_msg)
#define ROS_WARN_STREAM(args)
message_filters::Synchronizer< SyncPolicy > SyncType
void subscribe(ImageTransport &it, const std::string &base_topic, uint32_t queue_size, const TransportHints &transport_hints=TransportHints())
void subscribe(ros::NodeHandle &nh, const std::string &topic, uint32_t queue_size, const ros::TransportHints &transport_hints=ros::TransportHints(), ros::CallbackQueueInterface *callback_queue=0)
void syncCallback(const ros::TimerEvent &)
string camera_
Timer to check the image sync