Skip to content

Commit

Permalink
filters fix (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serafadam authored Mar 28, 2023
1 parent f25effe commit ae5aa58
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion depthai_bridge/src/ImageConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ void ImageConverter::toRosMsgFromBitStream(std::shared_ptr<dai::ImgFrame> inData
}

void ImageConverter::toRosMsg(std::shared_ptr<dai::ImgFrame> inData, std::deque<ImageMsgs::Image>& outImageMsgs) {
auto tstamp = inData->getTimestampDevice();
std::chrono::_V2::steady_clock::time_point tstamp;
if(_getBaseDeviceTimestamp)
tstamp = inData->getTimestampDevice();
else
tstamp = inData->getTimestamp();
ImageMsgs::Image outImageMsg;
StdMsgs::Header header;
header.frame_id = _frameName;
Expand Down
2 changes: 1 addition & 1 deletion depthai_filters/src/detection2d_overlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void Detection2DOverlay::overlayCB(const sensor_msgs::msg::Image::ConstSharedPtr
auto x2 = detection.bbox.center.position.x + detections->detections[0].bbox.size_x / 2.0;
auto y1 = detection.bbox.center.position.y - detections->detections[0].bbox.size_y / 2.0;
auto y2 = detection.bbox.center.position.y + detections->detections[0].bbox.size_y / 2.0;
auto labelStr = detection.results[0].hypothesis.class_id;
auto labelStr = labelMap[stoi(detection.results[0].hypothesis.class_id)];
auto confidence = detection.results[0].hypothesis.score;
cv::putText(previewMat, labelStr, cv::Point(x1 + 10, y1 + 20), cv::FONT_HERSHEY_TRIPLEX, 0.5, white, 3);
cv::putText(previewMat, labelStr, cv::Point(x1 + 10, y1 + 20), cv::FONT_HERSHEY_TRIPLEX, 0.5, black);
Expand Down
2 changes: 1 addition & 1 deletion depthai_ros_driver/launch/example_segmentation.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def generate_launch_description():
declared_arguments = [
DeclareLaunchArgument("name", default_value="oak"),
DeclareLaunchArgument("params_file", default_value=os.path.join(depthai_prefix, 'config', 'segmentation.yaml')),
DeclareLaunchArgument("use_rviz", default_value="True"),
DeclareLaunchArgument("use_rviz", default_value="False"),
]

return LaunchDescription(
Expand Down

0 comments on commit ae5aa58

Please sign in to comment.