46 #ifndef SRC_BAGGER_INCLUDE_BAGGER_BAGGER_H_ 47 #define SRC_BAGGER_INCLUDE_BAGGER_BAGGER_H_ 50 #include <boost/filesystem.hpp> 55 #include <bagger/BaggingState.h> 56 #include <bagger/SetBagState.h> 102 bool onBagStateSrv(bagger::SetBagState::Request &request, bagger::SetBagState::Response &response);
105 void publishBaggingStates();
108 std::string getCurrentWorkingDirectory();
111 std::vector<boost::filesystem::path> getMatchingFilePathsInDirectory(
const boost::filesystem::path &dir_path,
112 std::string match_string);
114 std::string getBagNameFromRecordOptions(std::string record_opts);
116 std::string removeSuffix(std::string s, std::string suffix);
123 void attemptRecordCleanup();
std::map< std::string, RecordProcess > profile_name_to_record_process_map_
std::vector< std::string > getRecordOptionsVector()
ros::Publisher bagging_state_publisher_
For publishing the names and states of each record profile rosbag record process. ...
ros::NodeHandlePtr node_handle_
void setRecording(bool recording)
std::map< std::string, std::string > profile_name_to_record_options_map_
bool recording_
whether or not the rosbag record process is currently recording
std::string getName()
Getters.
Utility class for managing each spawned rosbag record process.
ros::ServiceServer bag_state_service_
Service for starting / stopping rosbag record processes.
void setRecordOptionString(std::string record_options)
void setName(std::string name)
pid_t record_pid_
pid of the spawned process - used to eventually terminate it
ros::NodeHandlePtr private_node_handle_
std::string name_
name associated with the process - comes from the set record_profiles
std::string record_options_
record options associated with the process - comes from the set record_profiles
void setRecordPID(pid_t pid)
Setters.