Skip to content

Commit

Permalink
refactor: update include paths for object association modules
Browse files Browse the repository at this point in the history
  • Loading branch information
technolojin committed Jun 24, 2024
1 parent 6ac4b24 commit 0c0139f
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 132 deletions.
16 changes: 8 additions & 8 deletions perception/object_merger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ include_directories(
${EIGEN3_INCLUDE_DIR}
)

ament_auto_add_library(object_association_merger SHARED
src/object_association_merger/data_association/data_association.cpp
src/object_association_merger/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp
src/object_association_merger/node.cpp
ament_auto_add_library(${PROJECT_NAME} SHARED
src/data_association/data_association.cpp
src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp
src/node.cpp
)

target_link_libraries(object_association_merger
target_link_libraries(${PROJECT_NAME}
Eigen3::Eigen
)

rclcpp_components_register_node(object_association_merger
PLUGIN "object_association::ObjectAssociationMergerNode"
EXECUTABLE object_association_merger_node
rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "autoware::object_merger::ObjectAssociationMergerNode"
EXECUTABLE ${PROJECT_NAME}_node
)

ament_auto_package(INSTALL_TO_SHARE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,22 @@
// Author: v1.0 Yukihiro Saito
//

#ifndef OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_
#define OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_

#include <list>
#include <memory>
#include <unordered_map>
#include <vector>
#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_
#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_

#define EIGEN_MPL2_ONLY
#include "object_merger/data_association/solver/gnn_solver.hpp"

#include "autoware/object_merger/data_association/solver/gnn_solver.hpp"

#include <Eigen/Core>
#include <Eigen/Geometry>

#include <autoware_perception_msgs/msg/detected_objects.hpp>
#include "autoware_perception_msgs/msg/detected_objects.hpp"

#include <list>
#include <memory>
#include <unordered_map>
#include <vector>

class DataAssociation
{
Expand All @@ -56,4 +57,4 @@ class DataAssociation
virtual ~DataAssociation() {}
};

#endif // OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_
#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_
#define OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_
#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_
#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_

#include "object_merger/data_association/solver/gnn_solver_interface.hpp"
#include "object_merger/data_association/solver/mu_successive_shortest_path.hpp"
#include "object_merger/data_association/solver/successive_shortest_path.hpp"
#include "autoware/object_merger/data_association/solver/gnn_solver_interface.hpp"
#include "autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp"

#endif // OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_
#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_
#define OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_
#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_
#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_

#include <unordered_map>
#include <vector>
Expand All @@ -32,4 +32,4 @@ class GnnSolverInterface
};
} // namespace gnn_solver

#endif // OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_
#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_
#define OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_
#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_
#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_

#include "object_merger/data_association/solver/gnn_solver_interface.hpp"
#include "autoware/object_merger/data_association/solver/gnn_solver_interface.hpp"

#include <unordered_map>
#include <vector>
Expand All @@ -34,4 +34,4 @@ class MuSSP : public GnnSolverInterface
};
} // namespace gnn_solver

#endif // OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_
#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_
#define OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_
#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_
#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_

#include "object_merger/data_association/solver/gnn_solver_interface.hpp"
#include "autoware/object_merger/data_association/solver/gnn_solver_interface.hpp"

#include <unordered_map>
#include <vector>
Expand All @@ -34,4 +34,4 @@ class SSP : public GnnSolverInterface
};
} // namespace gnn_solver

#endif // OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_
#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef OBJECT_MERGER__NODE_HPP_
#define OBJECT_MERGER__NODE_HPP_
#ifndef AUTOWARE__OBJECT_MERGER__NODE_HPP_
#define AUTOWARE__OBJECT_MERGER__NODE_HPP_

#include "object_merger/data_association/data_association.hpp"
#include "autoware/object_merger/data_association/data_association.hpp"
#include "autoware/universe_utils/ros/debug_publisher.hpp"
#include "autoware/universe_utils/ros/published_time_publisher.hpp"
#include "autoware/universe_utils/system/stop_watch.hpp"

#include <autoware/universe_utils/ros/debug_publisher.hpp>
#include <autoware/universe_utils/ros/published_time_publisher.hpp>
#include <autoware/universe_utils/system/stop_watch.hpp>
#include <rclcpp/rclcpp.hpp>

#include <autoware_perception_msgs/msg/detected_objects.hpp>
#include "autoware_perception_msgs/msg/detected_objects.hpp"

#include <message_filters/subscriber.h>
#include <message_filters/sync_policies/approximate_time.h>
Expand All @@ -45,7 +45,7 @@
#include <string>
#include <vector>

namespace object_association
namespace autoware::object_merger
{
class ObjectAssociationMergerNode : public rclcpp::Node
{
Expand Down Expand Up @@ -89,6 +89,6 @@ class ObjectAssociationMergerNode : public rclcpp::Node

std::unique_ptr<autoware::universe_utils::PublishedTimePublisher> published_time_publisher_;
};
} // namespace object_association
} // namespace autoware::object_merger

#endif // OBJECT_MERGER__NODE_HPP_
#endif // AUTOWARE__OBJECT_MERGER__NODE_HPP_
73 changes: 0 additions & 73 deletions perception/object_merger/include/object_merger/utils/utils.hpp

This file was deleted.

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

#include "object_merger/data_association/data_association.hpp"
#include "autoware/object_merger/data_association/data_association.hpp"

#include "autoware/object_merger/data_association/solver/gnn_solver.hpp"
#include "autoware/universe_utils/geometry/geometry.hpp"
#include "object_merger/data_association/solver/gnn_solver.hpp"
#include "object_merger/utils/utils.hpp"
#include "object_recognition_utils/object_recognition_utils.hpp"

#include <algorithm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "object_merger/data_association/solver/mu_successive_shortest_path.hpp"
#include "autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp"

#include <mussp/mussp.h>

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

#include "object_merger/data_association/solver/successive_shortest_path.hpp"
#include "autoware/object_merger/data_association/solver/successive_shortest_path.hpp"

#include <algorithm>
#include <cassert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "object_merger/node.hpp"
#define EIGEN_MPL2_ONLY

#include "autoware/object_merger/node.hpp"

#include "autoware/universe_utils/geometry/geometry.hpp"
#include "object_merger/utils/utils.hpp"
#include "object_recognition_utils/object_recognition_utils.hpp"

#include <Eigen/Core>
#include <Eigen/Geometry>

#include <boost/optional.hpp>

#include <chrono>
#include <unordered_map>

#define EIGEN_MPL2_ONLY
#include <Eigen/Core>
#include <Eigen/Geometry>

using Label = autoware_perception_msgs::msg::ObjectClassification;

namespace
Expand Down Expand Up @@ -70,7 +70,7 @@ std::map<int, double> convertListToClassMap(const std::vector<double> & distance
}
} // namespace

namespace object_association
namespace autoware::object_merger
{
ObjectAssociationMergerNode::ObjectAssociationMergerNode(const rclcpp::NodeOptions & node_options)
: rclcpp::Node("object_association_merger_node", node_options),
Expand Down Expand Up @@ -233,7 +233,7 @@ void ObjectAssociationMergerNode::objectsCallback(
processing_time_publisher_->publish<tier4_debug_msgs::msg::Float64Stamped>(
"debug/processing_time_ms", stop_watch_ptr_->toc("processing_time", true));
}
} // namespace object_association
} // namespace autoware::object_merger

#include <rclcpp_components/register_node_macro.hpp>
RCLCPP_COMPONENTS_REGISTER_NODE(object_association::ObjectAssociationMergerNode)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::object_merger::ObjectAssociationMergerNode)

0 comments on commit 0c0139f

Please sign in to comment.