MCPcopy Create free account
hub / github.com/Robotics-STAR-Lab/H2-Mapping / image_callback

Function image_callback

src/dvins/pose_graph/src/pose_graph_node.cpp:93–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void image_callback(const sensor_msgs::ImageConstPtr &image_msg)
94{
95 //ROS_INFO("image_callback!");
96 if(!LOOP_CLOSURE)
97 return;
98 m_buf.lock();
99 image_buf.push(image_msg);
100 m_buf.unlock();
101 //printf(" image time %f \n", image_msg->header.stamp.toSec());
102
103 // detect unstable camera stream
104 if (last_image_time == -1)
105 last_image_time = image_msg->header.stamp.toSec();
106 else if (image_msg->header.stamp.toSec() - last_image_time > 1.0 || image_msg->header.stamp.toSec() < last_image_time)
107 {
108 ROS_WARN("image discontinue! detect a new sequence!");
109 new_sequence();
110 }
111 last_image_time = image_msg->header.stamp.toSec();
112}
113
114void point_callback(const sensor_msgs::PointCloudConstPtr &point_msg)
115{

Callers

nothing calls this directly

Calls 1

new_sequenceFunction · 0.85

Tested by

no test coverage detected