Skip to content

Commit 898d8c0

Browse files
committed
add VelocityPolygon to detector node
Signed-off-by: nelson <[email protected]>
1 parent 620c7c2 commit 898d8c0

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

nav2_collision_monitor/include/nav2_collision_monitor/collision_detector_node.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "nav2_collision_monitor/types.hpp"
3434
#include "nav2_collision_monitor/polygon.hpp"
3535
#include "nav2_collision_monitor/circle.hpp"
36+
#include "nav2_collision_monitor/velocity_polygon.hpp"
3637
#include "nav2_collision_monitor/source.hpp"
3738
#include "nav2_collision_monitor/scan.hpp"
3839
#include "nav2_collision_monitor/pointcloud.hpp"

nav2_collision_monitor/src/collision_detector_node.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ bool CollisionDetector::configurePolygons(
207207
polygons_.push_back(
208208
std::make_shared<Circle>(
209209
node, polygon_name, tf_buffer_, base_frame_id, transform_tolerance));
210+
} else if (polygon_type == "velocity_polygon") {
211+
polygons_.push_back(
212+
std::make_shared<VelocityPolygon>(
213+
node, polygon_name, tf_buffer_, base_frame_id, transform_tolerance));
210214
} else { // Error if something else
211215
RCLCPP_ERROR(
212216
get_logger(),

0 commit comments

Comments
 (0)