Skip to content

Commit

Permalink
add VelocityPolygon to detector node
Browse files Browse the repository at this point in the history
Signed-off-by: nelson <kaichie.lee@gmail.com>
  • Loading branch information
kaichie committed Jan 7, 2024
1 parent 620c7c2 commit 898d8c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "nav2_collision_monitor/types.hpp"
#include "nav2_collision_monitor/polygon.hpp"
#include "nav2_collision_monitor/circle.hpp"
#include "nav2_collision_monitor/velocity_polygon.hpp"
#include "nav2_collision_monitor/source.hpp"
#include "nav2_collision_monitor/scan.hpp"
#include "nav2_collision_monitor/pointcloud.hpp"
Expand Down
4 changes: 4 additions & 0 deletions nav2_collision_monitor/src/collision_detector_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ bool CollisionDetector::configurePolygons(
polygons_.push_back(
std::make_shared<Circle>(
node, polygon_name, tf_buffer_, base_frame_id, transform_tolerance));
} else if (polygon_type == "velocity_polygon") {
polygons_.push_back(
std::make_shared<VelocityPolygon>(
node, polygon_name, tf_buffer_, base_frame_id, transform_tolerance));

Check warning on line 213 in nav2_collision_monitor/src/collision_detector_node.cpp

View check run for this annotation

Codecov / codecov/patch

nav2_collision_monitor/src/collision_detector_node.cpp#L211-L213

Added lines #L211 - L213 were not covered by tests
} else { // Error if something else
RCLCPP_ERROR(
get_logger(),
Expand Down

0 comments on commit 898d8c0

Please sign in to comment.