Skip to content

Commit

Permalink
fix(behavior_path_planner): modify build error in rolling (#756)
Browse files Browse the repository at this point in the history
* fix(behavior_path_planner): modify build error in rolling

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
wep21 and pre-commit-ci[bot] authored Apr 24, 2022
1 parent 091031d commit ca720a3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions planning/behavior_path_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ ament_auto_add_library(behavior_path_planner_node SHARED
src/scene_module/pull_out/util.cpp
)

target_include_directories(behavior_path_planner_node SYSTEM PUBLIC
${EIGEN3_INCLUDE_DIR}
)

target_link_libraries(behavior_path_planner_node
${OpenCV_LIBRARIES}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@
#include <lanelet2_routing/RoutingGraph.h>
#include <lanelet2_routing/RoutingGraphContainer.h>
#include <tf2/utils.h>

#ifdef USE_TF2_GEOMETRY_MSGS_DEPRECATED_HEADER
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#else
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#endif

#include <limits>
#include <memory>
Expand All @@ -69,6 +74,7 @@ inline geometry_msgs::msg::Pose getPose(
}
} // namespace tier4_autoware_utils

#ifdef USE_TF2_GEOMETRY_MSGS_DEPRECATED_HEADER
namespace tf2
{
inline void fromMsg(const geometry_msgs::msg::PoseStamped & msg, tf2::Stamped<tf2::Transform> & out)
Expand Down Expand Up @@ -110,6 +116,7 @@ inline void doTransform(
toMsg(v_out, t_out);
}
} // namespace tf2
#endif

namespace behavior_path_planner
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ BehaviorPathPlannerNode::BehaviorPathPlannerNode(const rclcpp::NodeOptions & nod
perception_subscriber_ = create_subscription<PredictedObjects>(
"~/input/perception", 1, std::bind(&BehaviorPathPlannerNode::onPerception, this, _1));
scenario_subscriber_ = create_subscription<Scenario>(
"~/input/scenario", 1, [this](const Scenario::SharedPtr msg) { current_scenario_ = msg; });
"~/input/scenario", 1, [this](const Scenario::ConstSharedPtr msg) {
current_scenario_ = std::make_shared<Scenario>(*msg);
});
external_approval_subscriber_ = create_subscription<ApprovalMsg>(
"~/input/external_approval", 1,
std::bind(&BehaviorPathPlannerNode::onExternalApproval, this, _1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2449,7 +2449,7 @@ void AvoidanceModule::updateRegisteredObject(const ObjectDataArray & now_objects
};

// -- check now_objects, add it if it has new object id --
for (const auto now_obj : now_objects) {
for (const auto & now_obj : now_objects) {
if (!isAlreadyRegistered(now_obj.object.object_id)) {
registered_objects_.push_back(now_obj);
}
Expand Down

0 comments on commit ca720a3

Please sign in to comment.