Skip to content

Commit

Permalink
build(detection_by_tracker): move utils.hpp file to the detection_by_…
Browse files Browse the repository at this point in the history
…tracker folder and namespace to avoid conflicts (autowarefoundation#5837)

* build(detection_by_tracker): move utils.hpp file to the detection_by_tracker folder and namespace to avoid conflicts

Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and danielsanchezaran committed Dec 15, 2023
1 parent e529434 commit 449b0e2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define DETECTION_BY_TRACKER__DETECTION_BY_TRACKER_CORE_HPP_

#include "detection_by_tracker/debugger.hpp"
#include "detection_by_tracker/utils.hpp"

#include <euclidean_cluster/euclidean_cluster.hpp>
#include <euclidean_cluster/utils.hpp>
Expand All @@ -39,8 +40,6 @@
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#endif

#include "utils/utils.hpp"

#include <tf2_ros/buffer.h>
#include <tf2_ros/transform_listener.h>

Expand Down Expand Up @@ -82,7 +81,7 @@ class DetectionByTracker : public rclcpp::Node
std::map<uint8_t, int> max_search_distance_for_merger_;
std::map<uint8_t, int> max_search_distance_for_divider_;

utils::TrackerIgnoreLabel tracker_ignore_;
detection_by_tracker::utils::TrackerIgnoreLabel tracker_ignore_;

void setMaxSearchRange();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef UTILS__UTILS_HPP_
#define UTILS__UTILS_HPP_
#ifndef DETECTION_BY_TRACKER__UTILS_HPP_
#define DETECTION_BY_TRACKER__UTILS_HPP_

#include <cstdint>

namespace detection_by_tracker
{
namespace utils
{
struct TrackerIgnoreLabel
Expand All @@ -32,5 +34,6 @@ struct TrackerIgnoreLabel
bool isIgnore(const uint8_t label) const;
}; // struct TrackerIgnoreLabel
} // namespace utils
} // namespace detection_by_tracker

#endif // UTILS__UTILS_HPP_
#endif // DETECTION_BY_TRACKER__UTILS_HPP_
5 changes: 4 additions & 1 deletion perception/detection_by_tracker/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "utils/utils.hpp"
#include "detection_by_tracker/utils.hpp"

#include <autoware_auto_perception_msgs/msg/object_classification.hpp>

namespace detection_by_tracker
{
namespace utils
{
using Label = autoware_auto_perception_msgs::msg::ObjectClassification;
Expand All @@ -28,3 +30,4 @@ bool TrackerIgnoreLabel::isIgnore(const uint8_t label) const
(label == Label::BICYCLE && BICYCLE) || (label == Label::PEDESTRIAN && PEDESTRIAN);
}
} // namespace utils
} // namespace detection_by_tracker

0 comments on commit 449b0e2

Please sign in to comment.