| 320 | |
| 321 | |
| 322 | void new_sequence() |
| 323 | { |
| 324 | printf("new sequence\n"); |
| 325 | sequence++; |
| 326 | printf("sequence cnt %d \n", sequence); |
| 327 | if (sequence > 10) |
| 328 | { |
| 329 | ROS_WARN("only support 5 sequences since it's boring to copy code for more sequences."); |
| 330 | ROS_BREAK(); |
| 331 | } |
| 332 | posegraph.posegraph_visualization->reset(); |
| 333 | posegraph.publish(); |
| 334 | m_buf.lock(); |
| 335 | while (!image_buf.empty()) |
| 336 | image_buf.pop(); |
| 337 | while (!depth_buf.empty()) |
| 338 | depth_buf.pop(); |
| 339 | while (!point_buf.empty()) |
| 340 | point_buf.pop(); |
| 341 | while (!pose_buf.empty()) |
| 342 | pose_buf.pop(); |
| 343 | while (!odometry_buf.empty()) |
| 344 | odometry_buf.pop(); |
| 345 | m_buf.unlock(); |
| 346 | } |
| 347 | |
| 348 | void image_callback(const sensor_msgs::ImageConstPtr &image_msg, const sensor_msgs::ImageConstPtr &depth_msg) |
| 349 | { |