-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add spatial bounding boxes in Noetic (#338)
- Loading branch information
Showing
36 changed files
with
299 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0"?> | ||
<package format="3"> | ||
<name>depthai_bridge</name> | ||
<version>2.7.3</version> | ||
<version>2.7.4</version> | ||
<description>The depthai_bridge package</description> | ||
|
||
<maintainer email="[email protected]">Sachin Guruswamy</maintainer> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0"?> | ||
<package format="2"> | ||
<name>depthai_descriptions</name> | ||
<version>2.7.3</version> | ||
<version>2.7.4</version> | ||
<description>The depthai_descriptions package</description> | ||
|
||
<maintainer email="[email protected]">Adam Serafin</maintainer> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/oak: | ||
camera_i_nn_type: spatial | ||
rgb_i_enable_preview: true | ||
rgb_i_keep_preview_aspect_ratio: false | ||
nn_i_enable_passthrough: true | ||
nn_i_disable_resize: true | ||
stereo_i_subpixel: true | ||
/spatial_bb_node: | ||
desqueeze: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#pragma once | ||
|
||
#include "image_transport/image_transport.h" | ||
#include "message_filters/subscriber.h" | ||
#include "message_filters/sync_policies/approximate_time.h" | ||
#include "message_filters/synchronizer.h" | ||
#include "nodelet/nodelet.h" | ||
#include "ros/ros.h" | ||
#include "sensor_msgs/CameraInfo.h" | ||
#include "sensor_msgs/Image.h" | ||
#include "vision_msgs/Detection3DArray.h" | ||
#include "visualization_msgs/MarkerArray.h" | ||
|
||
namespace depthai_filters { | ||
class SpatialBB : public nodelet::Nodelet { | ||
public: | ||
void onInit() override; | ||
|
||
void overlayCB(const sensor_msgs::ImageConstPtr& preview, | ||
const sensor_msgs::CameraInfoConstPtr& info, | ||
const vision_msgs::Detection3DArrayConstPtr& detections); | ||
|
||
message_filters::Subscriber<sensor_msgs::Image> previewSub; | ||
message_filters::Subscriber<sensor_msgs::CameraInfo> infoSub; | ||
message_filters::Subscriber<vision_msgs::Detection3DArray> detSub; | ||
|
||
typedef message_filters::sync_policies::ApproximateTime<sensor_msgs::Image, sensor_msgs::CameraInfo, vision_msgs::Detection3DArray> syncPolicy; | ||
std::unique_ptr<message_filters::Synchronizer<syncPolicy>> sync; | ||
ros::Publisher overlayPub; | ||
ros::Publisher markerPub; | ||
std::vector<std::string> labelMap = {"background", "aeroplane", "bicycle", "bird", "boat", "bottle", "bus", | ||
"car", "cat", "chair", "cow", "diningtable", "dog", "horse", | ||
"motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"}; | ||
bool desqueeze = false; | ||
}; | ||
} // namespace depthai_filters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0"?> | ||
<launch> | ||
<arg name="params_file" default="$(find depthai_filters)/config/spatial_bb.yaml"/> | ||
|
||
<arg name="name" default="oak" /> | ||
|
||
<include file="$(find depthai_ros_driver)/launch/rgbd_pcl.launch"> | ||
<arg name="name" value="$(arg name)"/> | ||
<arg name="rectify_rgb" value="true"/> | ||
<arg name="params_file" value="$(arg params_file)"/> | ||
</include> | ||
|
||
<node name="spatial_bb_node" pkg="nodelet" type="nodelet" output="screen" required="true" args="load depthai_filters/SpatialBB $(arg name)_nodelet_manager"> | ||
<remap from="/rgb/preview/image_raw" to="$(arg name)/nn/passthrough/image_raw"/> | ||
<remap from="/nn/spatial_detections" to="$(arg name)/nn/spatial_detections"/> | ||
<remap from="/stereo/camera_info" to="$(arg name)/stereo/camera_info"/> | ||
|
||
</node> | ||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
<library path="lib/libdepthai_filters"> | ||
<class name="depthai_filters/Detection2DOverlay" type="depthai_filters::Detection2DOverlay" base_class_type="nodelet::Nodelet"> | ||
<description> | ||
<description> | ||
Detection 2D Overlay. | ||
</description> | ||
</description> | ||
</class> | ||
<class name="depthai_filters/SegmentationOverlay" type="depthai_filters::SegmentationOverlay" base_class_type="nodelet::Nodelet"> | ||
<description> | ||
<class name="depthai_filters/SegmentationOverlay" type="depthai_filters::SegmentationOverlay" base_class_type="nodelet::Nodelet"> | ||
<description> | ||
Segmentation Overlay. | ||
</description> | ||
</description> | ||
</class> | ||
<class name="depthai_filters/WLSFilter" type="depthai_filters::WLSFilter" base_class_type="nodelet::Nodelet"> | ||
<description> | ||
<class name="depthai_filters/WLSFilter" type="depthai_filters::WLSFilter" base_class_type="nodelet::Nodelet"> | ||
<description> | ||
WLS Filter. | ||
</description> | ||
</description> | ||
</class> | ||
<class name="depthai_filters/SpatialBB" type="depthai_filters::SpatialBB" base_class_type="nodelet::Nodelet"> | ||
<description> | ||
Spatial Bounding Box publisher. | ||
</description> | ||
</class> | ||
</library> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0"?> | ||
<package format="2"> | ||
<name>depthai_filters</name> | ||
<version>2.7.3</version> | ||
<version>2.7.4</version> | ||
<description>The depthai_filters package</description> | ||
|
||
<maintainer email="[email protected]">Adam Serafin</maintainer> | ||
|
@@ -20,6 +20,7 @@ | |
<depend>image_pipeline</depend> | ||
<depend>nodelet</depend> | ||
<depend>libopencv-dev</depend> | ||
<depend>visualization_msgs</depend> | ||
|
||
|
||
<export> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.