diff --git a/.cmake-format.yaml b/.cmake-format.yaml
deleted file mode 100644
index e70e353..0000000
--- a/.cmake-format.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
-additional_commands:
- foo:
- flags:
- - BAR
- - BAZ
- kwargs:
- DEPENDS: '*'
- HEADERS: '*'
- SOURCES: '*'
-algorithm_order:
-- 0
-- 1
-- 2
-- 3
-always_wrap: []
-bullet_char: '*'
-command_case: lower
-dangle_parens: false
-emit_byteorder_mark: false
-enable_markup: false
-enum_char: .
-fence_pattern: ^\s*([`~]{3}[`~]*)(.*)$
-first_comment_is_literal: false
-keyword_case: upper
-line_ending: unix
-line_width: 80
-literal_comment_pattern: null
-max_subargs_per_line: 3
-per_command: {}
-ruler_pattern: ^\s*[^\w\s]{3}.*[^\w\s]{3}$
-separate_ctrl_name_with_space: false
-separate_fn_name_with_space: false
-tab_size: 2
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
deleted file mode 100644
index 12e6329..0000000
--- a/.pre-commit-config.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-- repo: local
- hooks:
- - id: clang-format
- name: Run clang-format
- description: Clang C/C++ code formatter.
- entry: clang-format -i
- args: [-style=file]
- language: system
- types: [file, c++]
- # note: formatting style in .clang-format
diff --git a/README.en.md b/README.en.md
index 131773c..d1cdbd3 100644
--- a/README.en.md
+++ b/README.en.md
@@ -1,7 +1,7 @@
# **ar_to_distance**
-[JP](README.md) | [EN](READMEen.md)
+[JP](README.md) | [EN](README_en.md)
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
diff --git a/README.md b/README.md
index 42b0e1b..c40cc51 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# **ar_to_distance**
-[JP](README.md) | [EN](README.en.md)
+[JP](README.md) | [EN](README_en.md)
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
diff --git a/ar_track_alvar/CMakeLists.txt b/ar_track_alvar/CMakeLists.txt
index 0db068b..94e94f2 100644
--- a/ar_track_alvar/CMakeLists.txt
+++ b/ar_track_alvar/CMakeLists.txt
@@ -143,18 +143,4 @@ if(CATKIN_ENABLE_TESTING)
foreach(LAUNCH_FILE ${LAUNCH_FILES})
roslaunch_add_file_check(${LAUNCH_FILE} USE_TEST_DEPENDENCIES)
endforeach()
-
- #catkin_download_test_data(
- # ${PROJECT_NAME}_4markers_tork.bag
- # http://download.ros.org/data/ar_track_alvar/ar_track_alvar_4markers_tork_2017-02-08-11-21-14.bag
- # # Workaround the issue http://answers.ros.org/question/253787/accessing-data-downloaded-via-catkin_download_test_data/
- # # by downloading into source folder.
- # #DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/test
- # DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/test
- # MD5 627aa0316bbfe4334e06023d7c2b4087
- # )
- #add_rostest(test/marker_arg_config-basic.test DEPENDENCIES ${PROJECT_NAME}_4markers_tork.bag)
- #add_rostest(test/marker_arg_config-full.test DEPENDENCIES ${PROJECT_NAME}_4markers_tork.bag)
- #add_rostest(test/marker_param_config-basic.test DEPENDENCIES ${PROJECT_NAME}_4markers_tork.bag)
- #add_rostest(test/marker_param_config-full.test DEPENDENCIES ${PROJECT_NAME}_4markers_tork.bag)
endif()
diff --git a/ar_track_alvar/include/ar_track_alvar/ConnectedComponents.h b/ar_track_alvar/include/ar_track_alvar/ConnectedComponents.h
index b60d719..3cda5de 100644
--- a/ar_track_alvar/include/ar_track_alvar/ConnectedComponents.h
+++ b/ar_track_alvar/include/ar_track_alvar/ConnectedComponents.h
@@ -125,8 +125,16 @@ class ALVAR_EXPORT LabelingCvSeq : public Labeling
LabelingCvSeq();
~LabelingCvSeq();
+ /**
+ * \brief Unused function, functionality was left as a TODO
+ */
void SetOptions(bool _detect_pose_grayscale = false);
+ /**
+ * \brief Labels image and filters blobs to obtain square-shaped objects from
+ * the scene. visualize parameter controls whether or not to draw the detected
+ * borders of the marker
+ */
void LabelSquares(cv::Mat& image, bool visualize = false);
std::vector> LabelImage(cv::Mat& image, int min_size,
diff --git a/ar_track_alvar/include/ar_track_alvar/EC.h b/ar_track_alvar/include/ar_track_alvar/EC.h
index 3a6438b..1130163 100644
--- a/ar_track_alvar/include/ar_track_alvar/EC.h
+++ b/ar_track_alvar/include/ar_track_alvar/EC.h
@@ -325,112 +325,6 @@ class TrackerFeaturesEC : public TrackerFeatures
first_id, last_id);
}
- /** \brief Track features matching the given functor. New features will have
- * id's in the specified id range. */
- /*template
- bool Track(IplImage *img, IplImage *mask, std::map &container, F
- do_handle_test, int type_id=0, int first_id=0, int last_id=65535)
- {
- // Update features to match the ones in the given container
- typename std::map::iterator iter = container.begin();
- typename std::map::iterator iter_end = container.end();
- feature_count = 0;
- for (;iter != iter_end; iter++) {
- T &f = iter->second;
- if (!do_handle_test(f)) continue;
- if (f.has_p2d != true) continue;
- f.has_p2d = false; // This is updated again to true if tracking succeeds
- features[feature_count] = f.p2d;
- ids[feature_count] = iter->first;
- feature_count++;
- if (feature_count == max_features) break;
- }
- // Check that next_id is ok
- if (next_id < first_id) next_id = first_id;
- if (next_id > last_id) return false; // TODO: Make some better solution for
- this
- // Purge if needed
- if (purge) {
- TrackerFeatures::Purge();
- purge=false;
- }
- // Track as usual (this will swap above features to prev_features)
- TrackHid(img, mask);
- // Update the container to have the updated features
- for (int i=0; i= last_id) break;
- T &f = container[id];
- f.type_id = type_id;
- f.has_p2d = true;
- f.p2d = features[i];
- }
- return true;
- }*/
-
- /** \brief Track features matching the given functor. If first_id >= 0 we call
- * \e AddFeatures with the specified id range. */
- template
- bool Track(IplImage* img, IplImage* mask, std::map& container,
- F do_handle_test, int type_id = 0, int first_id = -1,
- int last_id = -1)
- {
- // When first_id && last_id are < 0 then we don't add new features...
- if (first_id < 0)
- last_id = -1;
- // Update features to match the ones in the given container
- typename std::map::iterator iter = container.begin();
- typename std::map::iterator iter_end = container.end();
- feature_count = 0;
- for (; iter != iter_end; iter++)
- {
- T& f = iter->second;
- if (!do_handle_test(f))
- continue;
- if (f.has_p2d != true)
- continue;
- f.has_p2d = false; // This is updated again to true if tracking succeeds
- features[feature_count] = f.p2d;
- ids[feature_count] = iter->first;
- feature_count++;
- if (feature_count == max_features)
- break;
- }
- // Purge if needed
- if (purge)
- {
- TrackerFeatures::Purge();
- purge = false;
- }
- if (first_id < 0)
- {
- // Track as usual (this will swap above features to prev_features)
- TrackHid(img, mask, false);
- }
- else
- {
- // Check that next_id is ok
- if (next_id < first_id)
- next_id = first_id;
- if (next_id > last_id)
- return false; // TODO: Make some better solution for this
- // Track as usual (this will swap above features to prev_features)
- TrackHid(img, mask, true);
- }
- // Update the container to have the updated features
- for (int i = 0; i < feature_count; i++)
- {
- int id = ids[i];
- if (last_id >= 0 && id >= last_id)
- break;
- T& f = container[id];
- f.type_id = type_id;
- f.has_p2d = true;
- f.p2d = features[i];
- }
- return true;
- }
-
/** \brief add features to the previously tracked frame if there are less than
* min_features */
template
diff --git a/ar_track_alvar/launch/pr2_bundle.launch b/ar_track_alvar/launch/pr2_bundle.launch
new file mode 100644
index 0000000..69d49da
--- /dev/null
+++ b/ar_track_alvar/launch/pr2_bundle.launch
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ar_track_alvar/launch/pr2_bundle_no_kinect.launch b/ar_track_alvar/launch/pr2_bundle_no_kinect.launch
new file mode 100644
index 0000000..a7f4950
--- /dev/null
+++ b/ar_track_alvar/launch/pr2_bundle_no_kinect.launch
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ar_track_alvar/launch/pr2_indiv.launch b/ar_track_alvar/launch/pr2_indiv.launch
new file mode 100644
index 0000000..27e4689
--- /dev/null
+++ b/ar_track_alvar/launch/pr2_indiv.launch
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ar_track_alvar/launch/pr2_indiv_no_kinect.launch b/ar_track_alvar/launch/pr2_indiv_no_kinect.launch
new file mode 100644
index 0000000..4428714
--- /dev/null
+++ b/ar_track_alvar/launch/pr2_indiv_no_kinect.launch
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ar_track_alvar/launch/pr2_train.launch b/ar_track_alvar/launch/pr2_train.launch
new file mode 100644
index 0000000..b929260
--- /dev/null
+++ b/ar_track_alvar/launch/pr2_train.launch
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ar_track_alvar/nodes/IndividualMarkersNoKinect.cpp b/ar_track_alvar/nodes/IndividualMarkersNoKinect.cpp
index ed66caf..1b72841 100644
--- a/ar_track_alvar/nodes/IndividualMarkersNoKinect.cpp
+++ b/ar_track_alvar/nodes/IndividualMarkersNoKinect.cpp
@@ -64,7 +64,7 @@ MarkerDetector marker_detector;
bool enableSwitched = false;
bool enabled = true;
-double max_frequency = 8.0;
+double max_frequency = 100.0;
double marker_size;
double max_new_marker_error;
double max_track_error;
diff --git a/ar_track_alvar/nodes/TrainMarkerBundle.cpp b/ar_track_alvar/nodes/TrainMarkerBundle.cpp
index 42ccc22..851c58a 100644
--- a/ar_track_alvar/nodes/TrainMarkerBundle.cpp
+++ b/ar_track_alvar/nodes/TrainMarkerBundle.cpp
@@ -81,7 +81,7 @@ std::string cam_info_topic;
std::string output_frame;
int nof_markers;
-double GetMultiMarkerPose(IplImage* image, Pose& pose);
+double GetMultiMarkerPose(cv::Mat& image, Pose& pose);
void getCapCallback(const sensor_msgs::ImageConstPtr& image_msg);
int keyCallback(int key);
void makeMarkerMsgs(int type, int id, Pose& p,