#include <bits/stdc++.h>
#include <boost/thread/thread.hpp>
#include <camera_info_manager/camera_info_manager.h>
#include <cv_bridge/cv_bridge.h>
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <ros/ros.h>
#include <rosbag/bag.h>
#include <rosbag/view.h>
#include <utility>
#include <vector>
#include <string>
#include <stdio.h>
#include <sensor_msgs/CompressedImage.h>
#include <compressed_depth_image_transport/rvl_codec.h>
#include <compressed_depth_image_transport/compression_common.h>
Go to the source code of this file.
|
| void | arrangeFramesWithTimeStamps (const std::string &file_name, int num_depth_frames, int num_ab_frames) |
| | AB and depth images with the same timestamp are treated as frames and written to the final binary file, which is arranged in ascending order of timestamps. More...
|
| |
| bool | comparator (std::pair< long, int > &first_element, std::pair< long, int > &second_element) |
| | comparison function More...
|
| |
| void | deleteFile (std::string file_name) |
| | deleting the intermediate files. remove() function does not work with a null terminated string, so here null character at the end of the string is removed then passed remove function More...
|
| |
| void | findMissingABOrDepthFrames (const std::string &file_name, int num_depth_frames, int num_ab_frames) |
| | This function finds whether any depth frame do not have the AB frame corresponding to it. More...
|
| |
| int | main (int argc, char **argv) |
| | This is main function. More...
|
| |
| void | notifyFrameLoss (const std::string &file_name) |
| | Notifies if capture is less than 10FPS. More...
|
| |
| void | sort_map (std::map< long, int > &mapped_array) |
| | sorts the map More...
|
| |
| void | storeCameraTopicsInbinFile (std::string bag_file_name, std::vector< std::string > cam_name) |
| | Stores camera topics in binary file. More...
|
| |
◆ arrangeFramesWithTimeStamps()
| void arrangeFramesWithTimeStamps |
( |
const std::string & |
file_name, |
|
|
int |
num_depth_frames, |
|
|
int |
num_ab_frames |
|
) |
| |
AB and depth images with the same timestamp are treated as frames and written to the final binary file, which is arranged in ascending order of timestamps.
- Parameters
-
| file_name | file name |
| num_depth_frames | number of depth frames |
| num_ab_frames | number of AB frames |
Definition at line 282 of file read_rosbags.cpp.
◆ comparator()
| bool comparator |
( |
std::pair< long, int > & |
first_element, |
|
|
std::pair< long, int > & |
second_element |
|
) |
| |
comparison function
- Parameters
-
| first_element | first element |
| second_element | second element |
- Returns
- true if first pair element's first value is less than second pair element's first value
-
false if first pair element's first value is greater than second pair element's first value
Definition at line 50 of file read_rosbags.cpp.
◆ deleteFile()
| void deleteFile |
( |
std::string |
file_name | ) |
|
deleting the intermediate files. remove() function does not work with a null terminated string, so here null character at the end of the string is removed then passed remove function
- Parameters
-
Definition at line 85 of file read_rosbags.cpp.
◆ findMissingABOrDepthFrames()
| void findMissingABOrDepthFrames |
( |
const std::string & |
file_name, |
|
|
int |
num_depth_frames, |
|
|
int |
num_ab_frames |
|
) |
| |
This function finds whether any depth frame do not have the AB frame corresponding to it.
- Parameters
-
| file_name | Input file name |
| num_depth_frames | Total number of depth frames |
| num_ab_frames | Total number of AB frames |
Definition at line 113 of file read_rosbags.cpp.
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
This is main function.
- Parameters
-
| argc | number of input arguments to the function |
| argv | array of pointer to the input arguments |
- Returns
- int
Definition at line 675 of file read_rosbags.cpp.
◆ notifyFrameLoss()
| void notifyFrameLoss |
( |
const std::string & |
file_name | ) |
|
Notifies if capture is less than 10FPS.
- Parameters
-
Definition at line 224 of file read_rosbags.cpp.
◆ sort_map()
| void sort_map |
( |
std::map< long, int > & |
mapped_array | ) |
|
sorts the map
- Parameters
-
| mapped_array | input mapped array to sort function |
Definition at line 60 of file read_rosbags.cpp.
◆ storeCameraTopicsInbinFile()
| void storeCameraTopicsInbinFile |
( |
std::string |
bag_file_name, |
|
|
std::vector< std::string > |
cam_name |
|
) |
| |
Stores camera topics in binary file.
- Parameters
-
| bag_file_name | input bag file name |
| cam_name | camera prefix names |
Definition at line 410 of file read_rosbags.cpp.
◆ CAM_VERSION