18 #ifndef RECOGNIZER_PREDICTION_ISM_SCENE_RECOGNITION_NODE_H 19 #define RECOGNIZER_PREDICTION_ISM_SCENE_RECOGNITION_NODE_H 25 #include <ISM/recognizer/Recognizer.hpp> 26 #include <ISM/utility/TableHelper.hpp> 27 #include <ISM/common_type/ObjectSet.hpp> 30 #include <std_srvs/Empty.h> 32 #include <asr_ism_visualizations/ObjectModelVisualizerRVIZ.hpp> 33 #include <asr_ism_visualizations/ism_result_visualizer_rviz.hpp> 34 #include <dynamic_reconfigure/server.h> 35 #include <asr_recognizer_prediction_ism/rp_ism_nodeConfig.h> 38 #include <asr_world_model/CompletePattern.h> 39 #include <asr_world_model/VisualizeSampledPoses.h> 40 #include <asr_world_model/PushCompletePatterns.h> 43 #include "asr_recognizer_prediction_ism/FindScenes.h" 44 #include "asr_recognizer_prediction_ism/SetLogDir.h" 45 #include "asr_recognizer_prediction_ism/ToggleVisualization.h" 119 static bool compareConfidence(ISM::RecognitionResultPtr i,ISM::RecognitionResultPtr j);
120 static bool isCompleteSubset(std::set<std::pair<std::string, std::string> > set_a,
121 std::set<std::pair<std::string, std::string> > set_b);
139 bool processFindScenesServiceCall(asr_recognizer_prediction_ism::FindScenes::Request &request, asr_recognizer_prediction_ism::FindScenes::Response &response);
147 bool setLogFilePathServiceCall(asr_recognizer_prediction_ism::SetLogDir::Request &request, asr_recognizer_prediction_ism::SetLogDir::Response &response);
167 ISM::ObjectSetPtr temp_set_ptr, std::vector<ISM::ObjectSetPtr>& object_sets,
bool measured_value_only);
std::string database_filename_
std::string object_constellation_folder_path_
void constructPatternObjectMapping()
std::vector< ISM::RecognitionResultPtr > & results_already_shared_
ros::Publisher visualization_publisher_
std::set< std::pair< std::string, std::string > > object_types_and_ids_set_
ISM::TableHelperPtr table_helper_
IH::ObjectConverterPtr converter
SceneRecognition(std::vector< ISM::RecognitionResultPtr > &results_already_shared, SharedRecognitionResultsManagerPtr shared_recognition_results_ptr)
SceneRecognitionNode Constructor.
int enable_rotation_mode_
ros::Publisher my_publisher_
std::vector< ISM::ObjectPtr > extractRealObjects(ISM::RecognitionResultPtr result_ptr)
std::string rotation_frame_
unsigned int last_object_set_size_
bool is_visualization_active_
int object_constellation_file_counter_
bool processFindScenesServiceCall(asr_recognizer_prediction_ism::FindScenes::Request &request, asr_recognizer_prediction_ism::FindScenes::Response &response)
processFindScenesServiceCall Receives service call with detected AsrObjects.
std::vector< ISM::RecognitionResultPtr > results_for_visualization_
SharedRecognitionResultsManagerPtr shared_recognition_results_ptr_
void sortBestRRperScene(std::stringstream &output)
std::vector< ISM::RecognitionResultPtr > incomplete_recognition_results_
static bool isCompleteSubset(std::set< std::pair< std::string, std::string > > set_a, std::set< std::pair< std::string, std::string > > set_b)
std::map< std::string, std::set< std::pair< std::string, std::string > > > pattern_object_map_
std::set< std::string > unique_pattern_names_
ros::ServiceClient viz_samples_client_
bool setLogFilePathServiceCall(asr_recognizer_prediction_ism::SetLogDir::Request &request, asr_recognizer_prediction_ism::SetLogDir::Response &response)
processSetLogDirServiceCall Receives service call where to write object constellations, used for scene recognition.
std::string viz_samples_client_name_
ros::ServiceServer toggle_visualization_server_
boost::shared_ptr< SceneRecognition > SceneRecognitionPtr
void filterIncompleteRR(std::vector< ISM::RecognitionResultPtr > &recognition_results)
ros::ServiceServer set_log_dir_server_
void writeObjectConstellationToXML(std::vector< ISM::ObjectPtr > &objects, int sceneRecogCount, int constellation_count)
bool processResetServiceCall(std_srvs::Empty::Request &request, std_srvs::Empty::Response &response)
processResetServiceCall Clears the old recognition results.
std::string push_complete_patterns_name_
void createObjectSetsFromPoseSamples(std::vector< asr_msgs::AsrObject >::iterator object_it, std::vector< asr_msgs::AsrObject >::iterator end_it, ISM::ObjectSetPtr temp_set_ptr, std::vector< ISM::ObjectSetPtr > &object_sets, bool measured_value_only)
ros::NodeHandle node_handle_
ros::ServiceClient push_complete_patterns_server_
VIZ::ObjectModelVisualizerRVIZ * object_model_visualizer_
std::string rotation_object_type_
std::string rotation_object_id_
std::string scene_markers_publisher_name_
static bool compareConfidence(ISM::RecognitionResultPtr i, ISM::RecognitionResultPtr j)
bool processToggleVisualizationServiceCall(std_srvs::Empty::Request &request, std_srvs::Empty::Response &response)
processToggleVisualizationServiceCall Toggle the visualization via service call.
ros::ServiceServer reset_server_
ISM::RecognizerPtr recognizer_
VIZ::ISMResultVisualizerRVIZPtr res_visualizer_
double max_projection_angle_deviation_
ros::ServiceServer find_scenes_server_
unsigned int object_set_max_count_