From 3300e0efd389b24f3f14ec145a0307091b03eae1 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 10 Aug 2018 16:57:26 +0200 Subject: [PATCH] Ajout Readme + Modif mineures interface --- ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.cpp | 7 +- ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.hpp | 2 +- ASIFT_tests/demo_ASIFT_src/test_ASIFT.cpp | 2 +- README.md | 83 +++++++++++++++++ README.md~ | 85 ++++++++++++++++++ .../CMakeLists.txt | 0 .../CMakeLists.txt~ | 0 .../launch/asift_match.launch | 13 ++- .../launch/asift_match.launch~ | 13 ++- {asift_match => asift_matching}/package.xml | 0 {asift_match => asift_matching}/package.xml~ | 0 .../reference_data/book_references.txt | 0 .../reference_data/robobo_references.txt | 0 .../reference_data/train_image_005.yml~ | 0 .../reference_data/train_image_006.yml~ | 0 .../reference_data/train_image_007.yml~ | 0 {asift_match => asift_matching}/setup.py | 0 {asift_match => asift_matching}/setup.py~ | 0 .../src/ASIFT_matcher.cpp | 7 +- .../src/ASIFT_matcher.hpp | 2 +- {asift_match => asift_matching}/src/CImg.h | 0 .../src/ROS_matcher.cpp | 29 +++--- .../src/ROS_matcher.hpp | 3 +- .../src/ROS_matcher_node.cpp | 0 .../src/compute_asift_keypoints.cpp | 0 .../src/compute_asift_keypoints.h | 0 .../src/compute_asift_matches.cpp | 0 .../src/compute_asift_matches.h | 0 .../src/demo_lib_sift.cpp | 0 .../src/demo_lib_sift.h | 0 .../src/domain.cpp | 0 {asift_match => asift_matching}/src/domain.h | 0 .../src/filter.cpp | 0 {asift_match => asift_matching}/src/filter.h | 0 .../src/flimage.cpp | 0 {asift_match => asift_matching}/src/flimage.h | 0 {asift_match => asift_matching}/src/fproj.cpp | 0 {asift_match => asift_matching}/src/fproj.h | 0 {asift_match => asift_matching}/src/frot.cpp | 0 {asift_match => asift_matching}/src/frot.h | 0 .../CMakeDirectoryInformation.cmake | 0 .../CMakeFiles/Match.dir/CXX.includecache | 0 .../CMakeFiles/Match.dir/DependInfo.cmake | 0 .../libMatch/CMakeFiles/Match.dir/build.make | 0 .../CMakeFiles/Match.dir/cmake_clean.cmake | 0 .../Match.dir/cmake_clean_target.cmake | 0 .../CMakeFiles/Match.dir/depend.internal | 0 .../libMatch/CMakeFiles/Match.dir/depend.make | 0 .../libMatch/CMakeFiles/Match.dir/flags.make | 0 .../libMatch/CMakeFiles/Match.dir/link.txt | 0 .../CMakeFiles/Match.dir/progress.make | 0 .../src/libMatch/CMakeFiles/progress.marks | 0 .../src/libMatch/CMakeLists.txt | 0 .../src/libMatch/Makefile | 0 .../src/libMatch/cmake_install.cmake | 0 .../src/libMatch/libMatch.a | Bin .../src/libMatch/match.cpp | 0 .../src/libMatch/match.h | 0 .../CMakeDirectoryInformation.cmake | 0 .../CMakeFiles/Numerics.dir/CXX.includecache | 0 .../CMakeFiles/Numerics.dir/DependInfo.cmake | 0 .../CMakeFiles/Numerics.dir/build.make | 0 .../CMakeFiles/Numerics.dir/cmake_clean.cmake | 0 .../Numerics.dir/cmake_clean_target.cmake | 0 .../CMakeFiles/Numerics.dir/depend.internal | 0 .../CMakeFiles/Numerics.dir/depend.make | 0 .../CMakeFiles/Numerics.dir/flags.make | 0 .../CMakeFiles/Numerics.dir/link.txt | 0 .../CMakeFiles/Numerics.dir/progress.make | 0 .../src/libNumerics/CMakeFiles/progress.marks | 0 .../src/libNumerics/CMakeLists.txt | 0 .../src/libNumerics/Makefile | 0 .../src/libNumerics/cmake_install.cmake | 0 .../src/libNumerics/computeH.cpp | 0 .../src/libNumerics/homography.cpp | 0 .../src/libNumerics/homography.h | 0 .../src/libNumerics/libNumerics.a | Bin .../src/libNumerics/matrix.cpp | 0 .../src/libNumerics/matrix.h | 0 .../src/libNumerics/numerics.cpp | 0 .../src/libNumerics/numerics.h | 0 .../src/libNumerics/rodrigues.cpp | 0 .../src/libNumerics/rodrigues.h | 0 .../src/libNumerics/vector.cpp | 0 .../src/library.cpp | 0 {asift_match => asift_matching}/src/library.h | 0 .../src/numerics1.cpp | 0 .../src/numerics1.h | 0 {asift_match => asift_matching}/src/orsa.cpp | 0 {asift_match => asift_matching}/src/orsa.h | 0 .../src/splines.cpp | 0 {asift_match => asift_matching}/src/splines.h | 0 .../rviz_interface/launch/interface.launch | 17 ++++ .../rviz_interface/launch/interface.launch~ | 16 ++++ .../launch/interface_matching.launch | 27 +++--- .../launch/interface_matching.launch~ | 25 ++++-- .../launch/interface_plannar_seg.launch | 4 +- .../rviz_interface/src/InteractiveObject.cpp | 4 +- .../rviz_interface/src/InteractiveObject.hpp | 4 +- .../rviz_interface/src/RvizInterface.cpp | 18 ++-- 100 files changed, 298 insertions(+), 63 deletions(-) rename {asift_match => asift_matching}/CMakeLists.txt (100%) rename {asift_match => asift_matching}/CMakeLists.txt~ (100%) rename {asift_match => asift_matching}/launch/asift_match.launch (59%) rename {asift_match => asift_matching}/launch/asift_match.launch~ (60%) rename {asift_match => asift_matching}/package.xml (100%) rename {asift_match => asift_matching}/package.xml~ (100%) rename {asift_match => asift_matching}/reference_data/book_references.txt (100%) rename {asift_match => asift_matching}/reference_data/robobo_references.txt (100%) rename {asift_match => asift_matching}/reference_data/train_image_005.yml~ (100%) rename {asift_match => asift_matching}/reference_data/train_image_006.yml~ (100%) rename {asift_match => asift_matching}/reference_data/train_image_007.yml~ (100%) rename {asift_match => asift_matching}/setup.py (100%) rename {asift_match => asift_matching}/setup.py~ (100%) rename {asift_match => asift_matching}/src/ASIFT_matcher.cpp (99%) rename {asift_match => asift_matching}/src/ASIFT_matcher.hpp (97%) rename {asift_match => asift_matching}/src/CImg.h (100%) rename {asift_match => asift_matching}/src/ROS_matcher.cpp (83%) rename {asift_match => asift_matching}/src/ROS_matcher.hpp (95%) rename {asift_match => asift_matching}/src/ROS_matcher_node.cpp (100%) rename {asift_match => asift_matching}/src/compute_asift_keypoints.cpp (100%) rename {asift_match => asift_matching}/src/compute_asift_keypoints.h (100%) rename {asift_match => asift_matching}/src/compute_asift_matches.cpp (100%) rename {asift_match => asift_matching}/src/compute_asift_matches.h (100%) rename {asift_match => asift_matching}/src/demo_lib_sift.cpp (100%) rename {asift_match => asift_matching}/src/demo_lib_sift.h (100%) rename {asift_match => asift_matching}/src/domain.cpp (100%) rename {asift_match => asift_matching}/src/domain.h (100%) rename {asift_match => asift_matching}/src/filter.cpp (100%) rename {asift_match => asift_matching}/src/filter.h (100%) rename {asift_match => asift_matching}/src/flimage.cpp (100%) rename {asift_match => asift_matching}/src/flimage.h (100%) rename {asift_match => asift_matching}/src/fproj.cpp (100%) rename {asift_match => asift_matching}/src/fproj.h (100%) rename {asift_match => asift_matching}/src/frot.cpp (100%) rename {asift_match => asift_matching}/src/frot.h (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeFiles/CMakeDirectoryInformation.cmake (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeFiles/Match.dir/CXX.includecache (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeFiles/Match.dir/DependInfo.cmake (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeFiles/Match.dir/build.make (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeFiles/Match.dir/cmake_clean.cmake (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeFiles/Match.dir/cmake_clean_target.cmake (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeFiles/Match.dir/depend.internal (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeFiles/Match.dir/depend.make (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeFiles/Match.dir/flags.make (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeFiles/Match.dir/link.txt (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeFiles/Match.dir/progress.make (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeFiles/progress.marks (100%) rename {asift_match => asift_matching}/src/libMatch/CMakeLists.txt (100%) rename {asift_match => asift_matching}/src/libMatch/Makefile (100%) rename {asift_match => asift_matching}/src/libMatch/cmake_install.cmake (100%) rename {asift_match => asift_matching}/src/libMatch/libMatch.a (100%) rename {asift_match => asift_matching}/src/libMatch/match.cpp (100%) rename {asift_match => asift_matching}/src/libMatch/match.h (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeFiles/CMakeDirectoryInformation.cmake (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeFiles/Numerics.dir/CXX.includecache (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeFiles/Numerics.dir/DependInfo.cmake (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeFiles/Numerics.dir/build.make (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeFiles/Numerics.dir/cmake_clean.cmake (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeFiles/Numerics.dir/cmake_clean_target.cmake (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeFiles/Numerics.dir/depend.internal (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeFiles/Numerics.dir/depend.make (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeFiles/Numerics.dir/flags.make (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeFiles/Numerics.dir/link.txt (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeFiles/Numerics.dir/progress.make (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeFiles/progress.marks (100%) rename {asift_match => asift_matching}/src/libNumerics/CMakeLists.txt (100%) rename {asift_match => asift_matching}/src/libNumerics/Makefile (100%) rename {asift_match => asift_matching}/src/libNumerics/cmake_install.cmake (100%) rename {asift_match => asift_matching}/src/libNumerics/computeH.cpp (100%) rename {asift_match => asift_matching}/src/libNumerics/homography.cpp (100%) rename {asift_match => asift_matching}/src/libNumerics/homography.h (100%) rename {asift_match => asift_matching}/src/libNumerics/libNumerics.a (100%) rename {asift_match => asift_matching}/src/libNumerics/matrix.cpp (100%) rename {asift_match => asift_matching}/src/libNumerics/matrix.h (100%) rename {asift_match => asift_matching}/src/libNumerics/numerics.cpp (100%) rename {asift_match => asift_matching}/src/libNumerics/numerics.h (100%) rename {asift_match => asift_matching}/src/libNumerics/rodrigues.cpp (100%) rename {asift_match => asift_matching}/src/libNumerics/rodrigues.h (100%) rename {asift_match => asift_matching}/src/libNumerics/vector.cpp (100%) rename {asift_match => asift_matching}/src/library.cpp (100%) rename {asift_match => asift_matching}/src/library.h (100%) rename {asift_match => asift_matching}/src/numerics1.cpp (100%) rename {asift_match => asift_matching}/src/numerics1.h (100%) rename {asift_match => asift_matching}/src/orsa.cpp (100%) rename {asift_match => asift_matching}/src/orsa.h (100%) rename {asift_match => asift_matching}/src/splines.cpp (100%) rename {asift_match => asift_matching}/src/splines.h (100%) create mode 100644 rviz_interface/rviz_interface/launch/interface.launch create mode 100644 rviz_interface/rviz_interface/launch/interface.launch~ diff --git a/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.cpp b/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.cpp index 42f52be..3e3e2d2 100644 --- a/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.cpp +++ b/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.cpp @@ -494,7 +494,7 @@ bool ASIFT_matcher::computeCenter(int& cx, int& cy) const * threshold : Filtering coefficient. 1-Keep 68% of the keypoints / 2-Keep 95% of the keypoints / 3-Keep 99% of the keypoints. Default : 2. * Return true if the filtering is done. */ -bool ASIFT_matcher::distFilter(int threshold) +bool ASIFT_matcher::distFilter(float threshold) { if(_showInfo) cout<<"filtering keypoint..."<& image, unsigned int w, unsigned int h, unsigned int num_tilts =1); //Perform matching between an image and the references. bool computeROI(int& x, int& y, unsigned int& h, unsigned int& w) const; //Compute the bounding rectangle of the mathcing keypoints. bool computeCenter(int& cx, int& cy) const; //Compute the centroid of the matching keypoints. - bool distFilter(int threshold =2); //Perform a standard deviation filtering on the matching keypoints. + bool distFilter(float threshold =2); //Perform a standard deviation filtering on the matching keypoints. bool saveReferences(const char* ref_path) const; //Save reference data necessary for the matching. bool loadReferences(const char* ref_path); //Load reference data necessary for the matching. diff --git a/ASIFT_tests/demo_ASIFT_src/test_ASIFT.cpp b/ASIFT_tests/demo_ASIFT_src/test_ASIFT.cpp index aa582c1..1408462 100644 --- a/ASIFT_tests/demo_ASIFT_src/test_ASIFT.cpp +++ b/ASIFT_tests/demo_ASIFT_src/test_ASIFT.cpp @@ -7,7 +7,7 @@ int main(int argc, char **argv) << " *************************** ASIFT image matching **************************** " << std::endl << " ******************************************************************************* " << std::endl << "Usage: " << argv[0] << " imgIn.png [Tilt number option] [Filter option] [Resize option] " << std::endl - << "- imgIn.png: input image (in PNG format). " << std::endl + << "- imgIn.png: input image. " << std::endl << "- [Tilt number option: 1..(32+ ?)] : 7: Recommended / 1: no tilt. " << std::endl << "- [Filter option: 0..3]. Standard deviation filter coeff (1-68%/2-95%/3-99%). 0: no filtering (default). " << std::endl << "- [Resize option: 0/1]. 1: input images resize to 800x600 (default). 0: no resize. " << std::endl diff --git a/README.md b/README.md index 50a137f..ae87def 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,86 @@ # BaxterInterface Bricks for an Rviz based interface for objective sending. Maintainer: Antoine Harlé antoine.harle@etu.upmc.fr + +## What is this ? + +This is a ROS package implementing two working ROS modules : rviz_interface & asift_matching +It also include other ongoing non-ROS modules, mostly for test purposes. + +### rviz_interface + +This ROS modules implements markers and a panel for Rviz for sending StateSpace messages. + +### asift_matching + + +* texte reference generation : + +## Status +### Done + +### Todo +REGLER LE PROBLEME DE FRAME ... +Problème dans le filtrage : nombre de points _> probleme de reset du nombre + +## How to use it ? + +### Requirements + +* ROS Indigo (probably works in other versions too) + * PCL + * QT 5 +* Eigen 3 + +### Usage + +* Clone the repository to your catkin src +* catkin_make + +#### Simple Rviz interface +* Run : roslaunch rviz_interface interface.launch +* Setup rviz : + - set fixed frame to camera_rgb_optical_frame. + - add an InteractiveMarker and set topic to /RvizInterface/update. + - add a Marker and set topic to vizualization_topic parameter. + - add the Rviz interface panel. + +#### Rviz interface with simple moving tracker +* Run : + - roslaunch openni_launch openni.launch + - roslaunch rviz_interface interface_plannar_seg.launch +* Setup rviz : + - set fixed frame to camera_rgb_optical_frame. + - add an InteractiveMarker and set topic to /RvizInterface/update. + - add a Marker and set topic to vizualization_topic parameter. + - add the Rviz interface panel. + - add a PointCloud2 and set topic to /camera/depth_registered/points. + +#### ASIFT matching (no vizualisation) + +* Run : + - roslaunch openni_launch openni.launch + - asift_matching : roslaunch asift_matching asift_match.launch + +#### ASIFT matching & Rviz interface +* Run : + - roslaunch openni_launch openni.launch + - roslaunch rviz_interface interface_matching.launch +* Setup rviz : + - set fixed frame to camera_rgb_optical_frame. + - add an InteractiveMarker and set topic to /RvizInterface/update. + - add a Marker and set topic to vizualization_topic parameter. + - add the Rviz interface panel. + - add a PointCloud2 and set topic to /camera/depth_registered/points. + +### Parameters + +* The topic names are defined as parameters in the launchfiles. + +* rviz_interface parameters are defined as parameters in the rviz_interface launchfiles : Interface objects are defined by their names and types (0-Default, 1-Button, 2-2D object, 3-3D object) (see StateSpace.msg for more details). + +* asift_matching parameters are defined as parameters in the asift_matching launchfiles : +-> References are defined by the path to the references files can be a txt file (faster - see texte reference generation in asift_matching section) or a series of images files (slower - currently not working). +-> Tracked object is defined by the object name (must be one of the interface object to work properly with rviz_interface). +-> Number of tilts is defined by an integer value (1-no tilt, 7-recommended value). Higher value means slower process. +-> Standaed deviation filter coefficient is defined by a real value. Keep (1-68%/2-95%/3-99%) of the points statistically. 0: no filtering (default). diff --git a/README.md~ b/README.md~ index d4fa6ec..1893b37 100644 --- a/README.md~ +++ b/README.md~ @@ -1 +1,86 @@ # BaxterInterface +Bricks for an Rviz based interface for objective sending. +Maintainer: Antoine Harlé antoine.harle@etu.upmc.fr + +## What is this ? + +This is a ROS package implementing two working ROS modules : rviz_interface & asift_matching +It also include other ongoing non-ROS modules, mostly for test purposes. + +### rviz_interface + +This ROS modules implements markers and a panel for Rviz for sending StateSpace messages. + +### asift_matching + + +* texte reference generation : + +## Status +### Done + +### Todo +REGLER LE PROBLEME DE FRAME ... +Problème dans le filtrage ? + +## How to use it ? + +### Requirements + +* ROS Indigo (probably works in other versions too) + * PCL + * QT 5 +* Eigen 3 + +### Usage + +* Clone the repository to your catkin src +* catkin_make + +#### Simple Rviz interface +* Run : roslaunch rviz_interface interface.launch +* Setup rviz : + - set fixed frame to camera_rgb_optical_frame. + - add an InteractiveMarker and set topic to /RvizInterface/update. + - add a Marker and set topic to vizualization_topic parameter. + - add the Rviz interface panel. + +#### Rviz interface with simple moving tracker +* Run : + - roslaunch openni_launch openni.launch + - roslaunch rviz_interface interface_plannar_seg.launch +* Setup rviz : + - set fixed frame to camera_rgb_optical_frame. + - add an InteractiveMarker and set topic to /RvizInterface/update. + - add a Marker and set topic to vizualization_topic parameter. + - add the Rviz interface panel. + - add a PointCloud2 and set topic to /camera/depth_registered/points. + +#### ASIFT matching (no vizualisation) + +* Run : + - roslaunch openni_launch openni.launch + - asift_matching : roslaunch asift_matching asift_match.launch + +#### ASIFT matching & Rviz interface +* Run : + - roslaunch openni_launch openni.launch + - roslaunch rviz_interface interface_matching.launch +* Setup rviz : + - set fixed frame to camera_rgb_optical_frame. + - add an InteractiveMarker and set topic to /RvizInterface/update. + - add a Marker and set topic to vizualization_topic parameter. + - add the Rviz interface panel. + - add a PointCloud2 and set topic to /camera/depth_registered/points. + +### Parameters + +* The topic names are defined as parameters in the launchfiles. + +* rviz_interface parameters are defined as parameters in the rviz_interface launchfiles : Interface objects are defined by their names and types (0-Default, 1-Button, 2-2D object, 3-3D object) (see StateSpace.msg for more details). + +* asift_matching parameters are defined as parameters in the asift_matching launchfiles : +-> References are defined by the path to the references files can be a txt file (faster - see texte reference generation in asift_matching section) or a series of images files (slower - currently not working). +-> Tracked object is defined by the object name (must be one of the interface object to work properly with rviz_interface). +-> Number of tilts is defined by an integer value (1-no tilt, 7-recommended value). Higher value means slower process. +-> Standaed deviation filter coefficient is defined by a real value. Keep (1-68%/2-95%/3-99%) of the points statistically. 0: no filtering (default). diff --git a/asift_match/CMakeLists.txt b/asift_matching/CMakeLists.txt similarity index 100% rename from asift_match/CMakeLists.txt rename to asift_matching/CMakeLists.txt diff --git a/asift_match/CMakeLists.txt~ b/asift_matching/CMakeLists.txt~ similarity index 100% rename from asift_match/CMakeLists.txt~ rename to asift_matching/CMakeLists.txt~ diff --git a/asift_match/launch/asift_match.launch b/asift_matching/launch/asift_match.launch similarity index 59% rename from asift_match/launch/asift_match.launch rename to asift_matching/launch/asift_match.launch index 66beaf7..e72510e 100644 --- a/asift_match/launch/asift_match.launch +++ b/asift_matching/launch/asift_match.launch @@ -1,12 +1,17 @@ + - + + + - + [ + "train_image_000.png", + "train_image_001.png"] + + diff --git a/asift_match/launch/asift_match.launch~ b/asift_matching/launch/asift_match.launch~ similarity index 60% rename from asift_match/launch/asift_match.launch~ rename to asift_matching/launch/asift_match.launch~ index 66beaf7..4b8697a 100644 --- a/asift_match/launch/asift_match.launch~ +++ b/asift_matching/launch/asift_match.launch~ @@ -1,12 +1,17 @@ + - + + + - + [ + "train_image_000.png", + "train_image_001.png"] + + diff --git a/asift_match/package.xml b/asift_matching/package.xml similarity index 100% rename from asift_match/package.xml rename to asift_matching/package.xml diff --git a/asift_match/package.xml~ b/asift_matching/package.xml~ similarity index 100% rename from asift_match/package.xml~ rename to asift_matching/package.xml~ diff --git a/asift_match/reference_data/book_references.txt b/asift_matching/reference_data/book_references.txt similarity index 100% rename from asift_match/reference_data/book_references.txt rename to asift_matching/reference_data/book_references.txt diff --git a/asift_match/reference_data/robobo_references.txt b/asift_matching/reference_data/robobo_references.txt similarity index 100% rename from asift_match/reference_data/robobo_references.txt rename to asift_matching/reference_data/robobo_references.txt diff --git a/asift_match/reference_data/train_image_005.yml~ b/asift_matching/reference_data/train_image_005.yml~ similarity index 100% rename from asift_match/reference_data/train_image_005.yml~ rename to asift_matching/reference_data/train_image_005.yml~ diff --git a/asift_match/reference_data/train_image_006.yml~ b/asift_matching/reference_data/train_image_006.yml~ similarity index 100% rename from asift_match/reference_data/train_image_006.yml~ rename to asift_matching/reference_data/train_image_006.yml~ diff --git a/asift_match/reference_data/train_image_007.yml~ b/asift_matching/reference_data/train_image_007.yml~ similarity index 100% rename from asift_match/reference_data/train_image_007.yml~ rename to asift_matching/reference_data/train_image_007.yml~ diff --git a/asift_match/setup.py b/asift_matching/setup.py similarity index 100% rename from asift_match/setup.py rename to asift_matching/setup.py diff --git a/asift_match/setup.py~ b/asift_matching/setup.py~ similarity index 100% rename from asift_match/setup.py~ rename to asift_matching/setup.py~ diff --git a/asift_match/src/ASIFT_matcher.cpp b/asift_matching/src/ASIFT_matcher.cpp similarity index 99% rename from asift_match/src/ASIFT_matcher.cpp rename to asift_matching/src/ASIFT_matcher.cpp index 42f52be..3e3e2d2 100644 --- a/asift_match/src/ASIFT_matcher.cpp +++ b/asift_matching/src/ASIFT_matcher.cpp @@ -494,7 +494,7 @@ bool ASIFT_matcher::computeCenter(int& cx, int& cy) const * threshold : Filtering coefficient. 1-Keep 68% of the keypoints / 2-Keep 95% of the keypoints / 3-Keep 99% of the keypoints. Default : 2. * Return true if the filtering is done. */ -bool ASIFT_matcher::distFilter(int threshold) +bool ASIFT_matcher::distFilter(float threshold) { if(_showInfo) cout<<"filtering keypoint..."<& image, unsigned int w, unsigned int h, unsigned int num_tilts =1); //Perform matching between an image and the references. bool computeROI(int& x, int& y, unsigned int& h, unsigned int& w) const; //Compute the bounding rectangle of the mathcing keypoints. bool computeCenter(int& cx, int& cy) const; //Compute the centroid of the matching keypoints. - bool distFilter(int threshold =2); //Perform a standard deviation filtering on the matching keypoints. + bool distFilter(float threshold =2); //Perform a standard deviation filtering on the matching keypoints. bool saveReferences(const char* ref_path) const; //Save reference data necessary for the matching. bool loadReferences(const char* ref_path); //Load reference data necessary for the matching. diff --git a/asift_match/src/CImg.h b/asift_matching/src/CImg.h similarity index 100% rename from asift_match/src/CImg.h rename to asift_matching/src/CImg.h diff --git a/asift_match/src/ROS_matcher.cpp b/asift_matching/src/ROS_matcher.cpp similarity index 83% rename from asift_match/src/ROS_matcher.cpp rename to asift_matching/src/ROS_matcher.cpp index 5bb336c..b7abe0f 100644 --- a/asift_match/src/ROS_matcher.cpp +++ b/asift_matching/src/ROS_matcher.cpp @@ -7,15 +7,16 @@ #include "ROS_matcher.hpp" +//TODO : Regler le problème du chergements des images ROS_matcher::ROS_matcher(): _status(MATCHER_STATUS_WAITING_INIT) { - std::string center_topic, image_topic, pointcloud_topic, reference_txt_path; + std::string center_topic, image_topic, pointcloud_topic, reference_txt_path, reference_path; std::vector reference_data_paths; //Load Param _nh.param("tracked_object", tracked_object, "Object"); _nh.param("num_tilt", _num_tilt, 8); - _nh.param("std_dev_filter_coeff", _filter_coeff, 0); + _nh.param("std_dev_filter_coeff", _filter_coeff, 0); _nh.param("object_center_topic", center_topic,"/ASIFT_matcher/object_center"); _nh.param("image_topic", image_topic,"/camera/rgb/image_raw"); @@ -34,26 +35,30 @@ ROS_matcher::ROS_matcher(): _status(MATCHER_STATUS_WAITING_INIT) matcher.showInfo(false); //Load References - if(_nh.getParam("reference_txt_path", reference_txt_path)) + _nh.param("reference_path", reference_path); //BUG sur reference path ? + ROS_INFO("Ref path : %s", reference_path.c_str()); + if(_nh.getParam("reference_txt_path", reference_txt_path) && matcher.loadReferences(reference_txt_path.c_str())) { - if(matcher.loadReferences(reference_txt_path.c_str())) - _status = MATCHER_STATUS_IDLE; + ROS_INFO("Loaded reference from %s",reference_txt_path.c_str()); } else if(_nh.getParam("reference_data", reference_data_paths)) { for(unsigned int i=0; i0) - _status = MATCHER_STATUS_IDLE; + { + matcher.addReference((reference_path+reference_data_paths[i]).c_str(),_num_tilt); + ROS_INFO("Loaded reference from %s",(reference_path+reference_data_paths[i]).c_str()); + } } else { ROS_WARN("No reference data to initialize matcher."); } - if(_status == MATCHER_STATUS_IDLE) - ROS_INFO("Matcher Ready ! (%d references from %s)",matcher.getNbRef(), reference_txt_path.c_str()); + if(matcher.getNbRef()>0) + { + _status = MATCHER_STATUS_IDLE; + ROS_INFO("Matcher Ready ! (%d references)",matcher.getNbRef()); + } } ROS_matcher::~ROS_matcher() @@ -113,7 +118,7 @@ void ROS_matcher::cameraCallback(const sensor_msgs::Image::ConstPtr& image_msg, // geometry_msgs::PointStamped center_msg; rviz_interface::NamedPoint center_msg; matcher.distFilter(_filter_coeff); - + ROS_INFO("Filtered points : %d", matcher.getNbMatch()); if(matcher.computeCenter(cx, cy)) { //Conversions des donnée d'entrée en PCL diff --git a/asift_match/src/ROS_matcher.hpp b/asift_matching/src/ROS_matcher.hpp similarity index 95% rename from asift_match/src/ROS_matcher.hpp rename to asift_matching/src/ROS_matcher.hpp index 7d2c562..5d3d9f0 100644 --- a/asift_match/src/ROS_matcher.hpp +++ b/asift_matching/src/ROS_matcher.hpp @@ -50,7 +50,8 @@ protected: message_filters::Synchronizer* Timesync; //Matcher - int _num_tilt, _filter_coeff; //Parameters of the ASIFT_matcher + int _num_tilt; //Number of tilts + float _filter_coeff; //Filter parameter ASIFT_matcher matcher; //Matcher MATCHER_STATUS _status; //Matcher status diff --git a/asift_match/src/ROS_matcher_node.cpp b/asift_matching/src/ROS_matcher_node.cpp similarity index 100% rename from asift_match/src/ROS_matcher_node.cpp rename to asift_matching/src/ROS_matcher_node.cpp diff --git a/asift_match/src/compute_asift_keypoints.cpp b/asift_matching/src/compute_asift_keypoints.cpp similarity index 100% rename from asift_match/src/compute_asift_keypoints.cpp rename to asift_matching/src/compute_asift_keypoints.cpp diff --git a/asift_match/src/compute_asift_keypoints.h b/asift_matching/src/compute_asift_keypoints.h similarity index 100% rename from asift_match/src/compute_asift_keypoints.h rename to asift_matching/src/compute_asift_keypoints.h diff --git a/asift_match/src/compute_asift_matches.cpp b/asift_matching/src/compute_asift_matches.cpp similarity index 100% rename from asift_match/src/compute_asift_matches.cpp rename to asift_matching/src/compute_asift_matches.cpp diff --git a/asift_match/src/compute_asift_matches.h b/asift_matching/src/compute_asift_matches.h similarity index 100% rename from asift_match/src/compute_asift_matches.h rename to asift_matching/src/compute_asift_matches.h diff --git a/asift_match/src/demo_lib_sift.cpp b/asift_matching/src/demo_lib_sift.cpp similarity index 100% rename from asift_match/src/demo_lib_sift.cpp rename to asift_matching/src/demo_lib_sift.cpp diff --git a/asift_match/src/demo_lib_sift.h b/asift_matching/src/demo_lib_sift.h similarity index 100% rename from asift_match/src/demo_lib_sift.h rename to asift_matching/src/demo_lib_sift.h diff --git a/asift_match/src/domain.cpp b/asift_matching/src/domain.cpp similarity index 100% rename from asift_match/src/domain.cpp rename to asift_matching/src/domain.cpp diff --git a/asift_match/src/domain.h b/asift_matching/src/domain.h similarity index 100% rename from asift_match/src/domain.h rename to asift_matching/src/domain.h diff --git a/asift_match/src/filter.cpp b/asift_matching/src/filter.cpp similarity index 100% rename from asift_match/src/filter.cpp rename to asift_matching/src/filter.cpp diff --git a/asift_match/src/filter.h b/asift_matching/src/filter.h similarity index 100% rename from asift_match/src/filter.h rename to asift_matching/src/filter.h diff --git a/asift_match/src/flimage.cpp b/asift_matching/src/flimage.cpp similarity index 100% rename from asift_match/src/flimage.cpp rename to asift_matching/src/flimage.cpp diff --git a/asift_match/src/flimage.h b/asift_matching/src/flimage.h similarity index 100% rename from asift_match/src/flimage.h rename to asift_matching/src/flimage.h diff --git a/asift_match/src/fproj.cpp b/asift_matching/src/fproj.cpp similarity index 100% rename from asift_match/src/fproj.cpp rename to asift_matching/src/fproj.cpp diff --git a/asift_match/src/fproj.h b/asift_matching/src/fproj.h similarity index 100% rename from asift_match/src/fproj.h rename to asift_matching/src/fproj.h diff --git a/asift_match/src/frot.cpp b/asift_matching/src/frot.cpp similarity index 100% rename from asift_match/src/frot.cpp rename to asift_matching/src/frot.cpp diff --git a/asift_match/src/frot.h b/asift_matching/src/frot.h similarity index 100% rename from asift_match/src/frot.h rename to asift_matching/src/frot.h diff --git a/asift_match/src/libMatch/CMakeFiles/CMakeDirectoryInformation.cmake b/asift_matching/src/libMatch/CMakeFiles/CMakeDirectoryInformation.cmake similarity index 100% rename from asift_match/src/libMatch/CMakeFiles/CMakeDirectoryInformation.cmake rename to asift_matching/src/libMatch/CMakeFiles/CMakeDirectoryInformation.cmake diff --git a/asift_match/src/libMatch/CMakeFiles/Match.dir/CXX.includecache b/asift_matching/src/libMatch/CMakeFiles/Match.dir/CXX.includecache similarity index 100% rename from asift_match/src/libMatch/CMakeFiles/Match.dir/CXX.includecache rename to asift_matching/src/libMatch/CMakeFiles/Match.dir/CXX.includecache diff --git a/asift_match/src/libMatch/CMakeFiles/Match.dir/DependInfo.cmake b/asift_matching/src/libMatch/CMakeFiles/Match.dir/DependInfo.cmake similarity index 100% rename from asift_match/src/libMatch/CMakeFiles/Match.dir/DependInfo.cmake rename to asift_matching/src/libMatch/CMakeFiles/Match.dir/DependInfo.cmake diff --git a/asift_match/src/libMatch/CMakeFiles/Match.dir/build.make b/asift_matching/src/libMatch/CMakeFiles/Match.dir/build.make similarity index 100% rename from asift_match/src/libMatch/CMakeFiles/Match.dir/build.make rename to asift_matching/src/libMatch/CMakeFiles/Match.dir/build.make diff --git a/asift_match/src/libMatch/CMakeFiles/Match.dir/cmake_clean.cmake b/asift_matching/src/libMatch/CMakeFiles/Match.dir/cmake_clean.cmake similarity index 100% rename from asift_match/src/libMatch/CMakeFiles/Match.dir/cmake_clean.cmake rename to asift_matching/src/libMatch/CMakeFiles/Match.dir/cmake_clean.cmake diff --git a/asift_match/src/libMatch/CMakeFiles/Match.dir/cmake_clean_target.cmake b/asift_matching/src/libMatch/CMakeFiles/Match.dir/cmake_clean_target.cmake similarity index 100% rename from asift_match/src/libMatch/CMakeFiles/Match.dir/cmake_clean_target.cmake rename to asift_matching/src/libMatch/CMakeFiles/Match.dir/cmake_clean_target.cmake diff --git a/asift_match/src/libMatch/CMakeFiles/Match.dir/depend.internal b/asift_matching/src/libMatch/CMakeFiles/Match.dir/depend.internal similarity index 100% rename from asift_match/src/libMatch/CMakeFiles/Match.dir/depend.internal rename to asift_matching/src/libMatch/CMakeFiles/Match.dir/depend.internal diff --git a/asift_match/src/libMatch/CMakeFiles/Match.dir/depend.make b/asift_matching/src/libMatch/CMakeFiles/Match.dir/depend.make similarity index 100% rename from asift_match/src/libMatch/CMakeFiles/Match.dir/depend.make rename to asift_matching/src/libMatch/CMakeFiles/Match.dir/depend.make diff --git a/asift_match/src/libMatch/CMakeFiles/Match.dir/flags.make b/asift_matching/src/libMatch/CMakeFiles/Match.dir/flags.make similarity index 100% rename from asift_match/src/libMatch/CMakeFiles/Match.dir/flags.make rename to asift_matching/src/libMatch/CMakeFiles/Match.dir/flags.make diff --git a/asift_match/src/libMatch/CMakeFiles/Match.dir/link.txt b/asift_matching/src/libMatch/CMakeFiles/Match.dir/link.txt similarity index 100% rename from asift_match/src/libMatch/CMakeFiles/Match.dir/link.txt rename to asift_matching/src/libMatch/CMakeFiles/Match.dir/link.txt diff --git a/asift_match/src/libMatch/CMakeFiles/Match.dir/progress.make b/asift_matching/src/libMatch/CMakeFiles/Match.dir/progress.make similarity index 100% rename from asift_match/src/libMatch/CMakeFiles/Match.dir/progress.make rename to asift_matching/src/libMatch/CMakeFiles/Match.dir/progress.make diff --git a/asift_match/src/libMatch/CMakeFiles/progress.marks b/asift_matching/src/libMatch/CMakeFiles/progress.marks similarity index 100% rename from asift_match/src/libMatch/CMakeFiles/progress.marks rename to asift_matching/src/libMatch/CMakeFiles/progress.marks diff --git a/asift_match/src/libMatch/CMakeLists.txt b/asift_matching/src/libMatch/CMakeLists.txt similarity index 100% rename from asift_match/src/libMatch/CMakeLists.txt rename to asift_matching/src/libMatch/CMakeLists.txt diff --git a/asift_match/src/libMatch/Makefile b/asift_matching/src/libMatch/Makefile similarity index 100% rename from asift_match/src/libMatch/Makefile rename to asift_matching/src/libMatch/Makefile diff --git a/asift_match/src/libMatch/cmake_install.cmake b/asift_matching/src/libMatch/cmake_install.cmake similarity index 100% rename from asift_match/src/libMatch/cmake_install.cmake rename to asift_matching/src/libMatch/cmake_install.cmake diff --git a/asift_match/src/libMatch/libMatch.a b/asift_matching/src/libMatch/libMatch.a similarity index 100% rename from asift_match/src/libMatch/libMatch.a rename to asift_matching/src/libMatch/libMatch.a diff --git a/asift_match/src/libMatch/match.cpp b/asift_matching/src/libMatch/match.cpp similarity index 100% rename from asift_match/src/libMatch/match.cpp rename to asift_matching/src/libMatch/match.cpp diff --git a/asift_match/src/libMatch/match.h b/asift_matching/src/libMatch/match.h similarity index 100% rename from asift_match/src/libMatch/match.h rename to asift_matching/src/libMatch/match.h diff --git a/asift_match/src/libNumerics/CMakeFiles/CMakeDirectoryInformation.cmake b/asift_matching/src/libNumerics/CMakeFiles/CMakeDirectoryInformation.cmake similarity index 100% rename from asift_match/src/libNumerics/CMakeFiles/CMakeDirectoryInformation.cmake rename to asift_matching/src/libNumerics/CMakeFiles/CMakeDirectoryInformation.cmake diff --git a/asift_match/src/libNumerics/CMakeFiles/Numerics.dir/CXX.includecache b/asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/CXX.includecache similarity index 100% rename from asift_match/src/libNumerics/CMakeFiles/Numerics.dir/CXX.includecache rename to asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/CXX.includecache diff --git a/asift_match/src/libNumerics/CMakeFiles/Numerics.dir/DependInfo.cmake b/asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/DependInfo.cmake similarity index 100% rename from asift_match/src/libNumerics/CMakeFiles/Numerics.dir/DependInfo.cmake rename to asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/DependInfo.cmake diff --git a/asift_match/src/libNumerics/CMakeFiles/Numerics.dir/build.make b/asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/build.make similarity index 100% rename from asift_match/src/libNumerics/CMakeFiles/Numerics.dir/build.make rename to asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/build.make diff --git a/asift_match/src/libNumerics/CMakeFiles/Numerics.dir/cmake_clean.cmake b/asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/cmake_clean.cmake similarity index 100% rename from asift_match/src/libNumerics/CMakeFiles/Numerics.dir/cmake_clean.cmake rename to asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/cmake_clean.cmake diff --git a/asift_match/src/libNumerics/CMakeFiles/Numerics.dir/cmake_clean_target.cmake b/asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/cmake_clean_target.cmake similarity index 100% rename from asift_match/src/libNumerics/CMakeFiles/Numerics.dir/cmake_clean_target.cmake rename to asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/cmake_clean_target.cmake diff --git a/asift_match/src/libNumerics/CMakeFiles/Numerics.dir/depend.internal b/asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/depend.internal similarity index 100% rename from asift_match/src/libNumerics/CMakeFiles/Numerics.dir/depend.internal rename to asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/depend.internal diff --git a/asift_match/src/libNumerics/CMakeFiles/Numerics.dir/depend.make b/asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/depend.make similarity index 100% rename from asift_match/src/libNumerics/CMakeFiles/Numerics.dir/depend.make rename to asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/depend.make diff --git a/asift_match/src/libNumerics/CMakeFiles/Numerics.dir/flags.make b/asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/flags.make similarity index 100% rename from asift_match/src/libNumerics/CMakeFiles/Numerics.dir/flags.make rename to asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/flags.make diff --git a/asift_match/src/libNumerics/CMakeFiles/Numerics.dir/link.txt b/asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/link.txt similarity index 100% rename from asift_match/src/libNumerics/CMakeFiles/Numerics.dir/link.txt rename to asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/link.txt diff --git a/asift_match/src/libNumerics/CMakeFiles/Numerics.dir/progress.make b/asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/progress.make similarity index 100% rename from asift_match/src/libNumerics/CMakeFiles/Numerics.dir/progress.make rename to asift_matching/src/libNumerics/CMakeFiles/Numerics.dir/progress.make diff --git a/asift_match/src/libNumerics/CMakeFiles/progress.marks b/asift_matching/src/libNumerics/CMakeFiles/progress.marks similarity index 100% rename from asift_match/src/libNumerics/CMakeFiles/progress.marks rename to asift_matching/src/libNumerics/CMakeFiles/progress.marks diff --git a/asift_match/src/libNumerics/CMakeLists.txt b/asift_matching/src/libNumerics/CMakeLists.txt similarity index 100% rename from asift_match/src/libNumerics/CMakeLists.txt rename to asift_matching/src/libNumerics/CMakeLists.txt diff --git a/asift_match/src/libNumerics/Makefile b/asift_matching/src/libNumerics/Makefile similarity index 100% rename from asift_match/src/libNumerics/Makefile rename to asift_matching/src/libNumerics/Makefile diff --git a/asift_match/src/libNumerics/cmake_install.cmake b/asift_matching/src/libNumerics/cmake_install.cmake similarity index 100% rename from asift_match/src/libNumerics/cmake_install.cmake rename to asift_matching/src/libNumerics/cmake_install.cmake diff --git a/asift_match/src/libNumerics/computeH.cpp b/asift_matching/src/libNumerics/computeH.cpp similarity index 100% rename from asift_match/src/libNumerics/computeH.cpp rename to asift_matching/src/libNumerics/computeH.cpp diff --git a/asift_match/src/libNumerics/homography.cpp b/asift_matching/src/libNumerics/homography.cpp similarity index 100% rename from asift_match/src/libNumerics/homography.cpp rename to asift_matching/src/libNumerics/homography.cpp diff --git a/asift_match/src/libNumerics/homography.h b/asift_matching/src/libNumerics/homography.h similarity index 100% rename from asift_match/src/libNumerics/homography.h rename to asift_matching/src/libNumerics/homography.h diff --git a/asift_match/src/libNumerics/libNumerics.a b/asift_matching/src/libNumerics/libNumerics.a similarity index 100% rename from asift_match/src/libNumerics/libNumerics.a rename to asift_matching/src/libNumerics/libNumerics.a diff --git a/asift_match/src/libNumerics/matrix.cpp b/asift_matching/src/libNumerics/matrix.cpp similarity index 100% rename from asift_match/src/libNumerics/matrix.cpp rename to asift_matching/src/libNumerics/matrix.cpp diff --git a/asift_match/src/libNumerics/matrix.h b/asift_matching/src/libNumerics/matrix.h similarity index 100% rename from asift_match/src/libNumerics/matrix.h rename to asift_matching/src/libNumerics/matrix.h diff --git a/asift_match/src/libNumerics/numerics.cpp b/asift_matching/src/libNumerics/numerics.cpp similarity index 100% rename from asift_match/src/libNumerics/numerics.cpp rename to asift_matching/src/libNumerics/numerics.cpp diff --git a/asift_match/src/libNumerics/numerics.h b/asift_matching/src/libNumerics/numerics.h similarity index 100% rename from asift_match/src/libNumerics/numerics.h rename to asift_matching/src/libNumerics/numerics.h diff --git a/asift_match/src/libNumerics/rodrigues.cpp b/asift_matching/src/libNumerics/rodrigues.cpp similarity index 100% rename from asift_match/src/libNumerics/rodrigues.cpp rename to asift_matching/src/libNumerics/rodrigues.cpp diff --git a/asift_match/src/libNumerics/rodrigues.h b/asift_matching/src/libNumerics/rodrigues.h similarity index 100% rename from asift_match/src/libNumerics/rodrigues.h rename to asift_matching/src/libNumerics/rodrigues.h diff --git a/asift_match/src/libNumerics/vector.cpp b/asift_matching/src/libNumerics/vector.cpp similarity index 100% rename from asift_match/src/libNumerics/vector.cpp rename to asift_matching/src/libNumerics/vector.cpp diff --git a/asift_match/src/library.cpp b/asift_matching/src/library.cpp similarity index 100% rename from asift_match/src/library.cpp rename to asift_matching/src/library.cpp diff --git a/asift_match/src/library.h b/asift_matching/src/library.h similarity index 100% rename from asift_match/src/library.h rename to asift_matching/src/library.h diff --git a/asift_match/src/numerics1.cpp b/asift_matching/src/numerics1.cpp similarity index 100% rename from asift_match/src/numerics1.cpp rename to asift_matching/src/numerics1.cpp diff --git a/asift_match/src/numerics1.h b/asift_matching/src/numerics1.h similarity index 100% rename from asift_match/src/numerics1.h rename to asift_matching/src/numerics1.h diff --git a/asift_match/src/orsa.cpp b/asift_matching/src/orsa.cpp similarity index 100% rename from asift_match/src/orsa.cpp rename to asift_matching/src/orsa.cpp diff --git a/asift_match/src/orsa.h b/asift_matching/src/orsa.h similarity index 100% rename from asift_match/src/orsa.h rename to asift_matching/src/orsa.h diff --git a/asift_match/src/splines.cpp b/asift_matching/src/splines.cpp similarity index 100% rename from asift_match/src/splines.cpp rename to asift_matching/src/splines.cpp diff --git a/asift_match/src/splines.h b/asift_matching/src/splines.h similarity index 100% rename from asift_match/src/splines.h rename to asift_matching/src/splines.h diff --git a/rviz_interface/rviz_interface/launch/interface.launch b/rviz_interface/rviz_interface/launch/interface.launch new file mode 100644 index 0000000..a76559b --- /dev/null +++ b/rviz_interface/rviz_interface/launch/interface.launch @@ -0,0 +1,17 @@ + + + + + + + ["Foo", "KungFoo", "Panda", "Boo"] + [3, 2, 1, 0] + + + + + + + + + diff --git a/rviz_interface/rviz_interface/launch/interface.launch~ b/rviz_interface/rviz_interface/launch/interface.launch~ new file mode 100644 index 0000000..356fe39 --- /dev/null +++ b/rviz_interface/rviz_interface/launch/interface.launch~ @@ -0,0 +1,16 @@ + + + + + + ["Foo", "KungFoo", "Panda", "Boo"] + [3, 2, 1, 0] + + + + + + + + + diff --git a/rviz_interface/rviz_interface/launch/interface_matching.launch b/rviz_interface/rviz_interface/launch/interface_matching.launch index 9bdd54f..fa2138a 100644 --- a/rviz_interface/rviz_interface/launch/interface_matching.launch +++ b/rviz_interface/rviz_interface/launch/interface_matching.launch @@ -1,11 +1,12 @@ - - ["Foo", "KungFoo", "Panda", "Boo"] - [3, 2, 1, 0] - + + ["Foo", "KungFoo", "Panda", "Boo"] + [3, 2, 1, 0] + + @@ -13,13 +14,19 @@ + + - - - - + + + + + [ + "train_image_000.png", + "train_image_001.png"] + + + diff --git a/rviz_interface/rviz_interface/launch/interface_matching.launch~ b/rviz_interface/rviz_interface/launch/interface_matching.launch~ index 26abb77..d976f68 100644 --- a/rviz_interface/rviz_interface/launch/interface_matching.launch~ +++ b/rviz_interface/rviz_interface/launch/interface_matching.launch~ @@ -2,6 +2,11 @@ + + ["Foo", "KungFoo", "Panda", "Boo"] + [3, 2, 1, 0] + + @@ -9,15 +14,19 @@ - ["Foo", "KungFoo", "Panda", "Boo"] - [3, 2, 1, 0] + + - - - - + + + + + [ + "train_image_000.png", + "train_image_001.png"] + + + diff --git a/rviz_interface/rviz_interface/launch/interface_plannar_seg.launch b/rviz_interface/rviz_interface/launch/interface_plannar_seg.launch index ee884f3..0b207ca 100644 --- a/rviz_interface/rviz_interface/launch/interface_plannar_seg.launch +++ b/rviz_interface/rviz_interface/launch/interface_plannar_seg.launch @@ -2,8 +2,8 @@ - ["6DOF"] - [0] + ["6DOF"] + [0] diff --git a/rviz_interface/rviz_interface/src/InteractiveObject.cpp b/rviz_interface/rviz_interface/src/InteractiveObject.cpp index da84b47..81a4891 100644 --- a/rviz_interface/rviz_interface/src/InteractiveObject.cpp +++ b/rviz_interface/rviz_interface/src/InteractiveObject.cpp @@ -9,7 +9,7 @@ unsigned int InteractiveObject::nextObjectID = 1; //Constructeur -InteractiveObject::InteractiveObject(interactive_markers::InteractiveMarkerServer* server, const std::string& name, unsigned int type, unsigned int shape = Marker::CUBE, const tf::Vector3& position = tf::Vector3(0,0,0)) : _name(name), _type(type), _server(server), _showVisuals(true), _followObject(true) +InteractiveObject::InteractiveObject(interactive_markers::InteractiveMarkerServer* server, const std::string& name, unsigned int type, unsigned int shape = Marker::CUBE, const tf::Vector3& position) : _name(name), _type(type), _server(server), _showVisuals(true), _followObject(true) { _objectID = nextObjectID++; _state.name = name; @@ -31,7 +31,7 @@ InteractiveObject::InteractiveObject(interactive_markers::InteractiveMarkerServe } //Construit un InteractiveMarker -void InteractiveObject::createInteractiveMarker(Marker& marker, const tf::Vector3& position = tf::Vector3(0,0,0)) +void InteractiveObject::createInteractiveMarker(Marker& marker, const tf::Vector3& position) { //// Création d'un marker interactif //// // _int_marker.header.frame_id = "/map"; //Par défaut diff --git a/rviz_interface/rviz_interface/src/InteractiveObject.hpp b/rviz_interface/rviz_interface/src/InteractiveObject.hpp index cd9b4dc..126d23e 100644 --- a/rviz_interface/rviz_interface/src/InteractiveObject.hpp +++ b/rviz_interface/rviz_interface/src/InteractiveObject.hpp @@ -36,10 +36,10 @@ protected: ros::Publisher* _visual_pub; public: - InteractiveObject(interactive_markers::InteractiveMarkerServer* server, const std::string& name, unsigned int type, unsigned int shape, const tf::Vector3& position); + InteractiveObject(interactive_markers::InteractiveMarkerServer* server, const std::string& name, unsigned int type, unsigned int shape, const tf::Vector3& position = tf::Vector3(0,0,0)); //Construit un InteractiveMarker - void createInteractiveMarker(Marker& marker, const tf::Vector3& position); + void createInteractiveMarker(Marker& marker, const tf::Vector3& position = tf::Vector3(0,0,0)); //Fonction callback du serveur d' InteractiveMarker void processFeedback( const InteractiveMarkerFeedbackConstPtr &feedback ); diff --git a/rviz_interface/rviz_interface/src/RvizInterface.cpp b/rviz_interface/rviz_interface/src/RvizInterface.cpp index 15cfa2f..dbebcb1 100644 --- a/rviz_interface/rviz_interface/src/RvizInterface.cpp +++ b/rviz_interface/rviz_interface/src/RvizInterface.cpp @@ -13,6 +13,7 @@ RvizInterface::RvizInterface(): _server("RvizInterface") std::string objective_topic, vizualization_topic, config_topic, position_topic; std::vector object_names; std::vector object_types; + std::string frame_id; //Load Topics param _n.param("objective_topic", objective_topic,"/RvizInterface/state_objective"); @@ -29,8 +30,9 @@ RvizInterface::RvizInterface(): _server("RvizInterface") _position_sub = _n.subscribe(position_topic, 1, &RvizInterface::positionCallback, this); //Load objects - _n.getParam("tracked_object_names",object_names); - _n.getParam("tracked_object_types",object_types); + _n.param("frame_id", frame_id,"/map"); + _n.getParam("object_names",object_names); + _n.getParam("object_types",object_types); int names_size = object_names.size(); @@ -57,7 +59,7 @@ RvizInterface::RvizInterface(): _server("RvizInterface") break; case 1: _objects.push_back(new InteractiveObject(&_server, object_names[i], (int) rviz_interface::StateSpace::STATE_BOOL, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(0,0,0))); - _objects[i]->addButtoncontrol(); + // _objects[i]->addButtoncontrol(); break; case 2: _objects.push_back(new InteractiveObject(&_server, object_names[i], (int) rviz_interface::StateSpace::STATE_2D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(0,0,0))); @@ -69,16 +71,6 @@ RvizInterface::RvizInterface(): _server("RvizInterface") break; } } - // _objects.push_back(new InteractiveObject(&_server, object_name, (int) rviz_interface::StateSpace::STATE_3D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(0,0,0))); - // _objects[0]->add6DOFcontrol(); - - // _objects.push_back(new InteractiveObject(&_server, "3DOF", (int) rviz_interface::StateSpace::STATE_2D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(0,0,0))); - // _objects[1]->add3DOFcontrol(); - - // _objects.push_back(new InteractiveObject(&_server, "3DOF 2", (int) rviz_interface::StateSpace::STATE_2D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(-1,1,0))); - // _objects[2]->add3DOFcontrol(tf::Vector3(0.5,0.5,0)); - - // _objects.push_back(new InteractiveObject(&_server, "Button", (int) rviz_interface::StateSpace::STATE_3D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(1,-1,0))); for(unsigned int i=0;i<_objects.size();i++) {