Skip to content

Commit

Permalink
iron updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Serafadam committed Jun 14, 2023
1 parent 3bc208c commit d5d4f6d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 22 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- humble
- galactic
- foxy
- iron
tags:
- 'v*'
pull_request:
Expand All @@ -17,8 +18,9 @@ on:
- humble
- galactic
- foxy
- iron
env:
ROS_DISTRO: humble
ROS_DISTRO: iron

jobs:
clang-format-lint:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG ROS_DISTRO=humble
ARG ROS_DISTRO=iron
FROM ros:${ROS_DISTRO}-ros-base
ARG USE_RVIZ
ARG BUILD_SEQUENTIAL=0
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ You can develop your ROS applications in following ways:
Supported ROS versions:
- Noetic
- Humble
- Iron

For usage check out respective git branches.

Expand Down
10 changes: 0 additions & 10 deletions depthai_bridge/src/ImgDetectionConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,11 @@ void ImgDetectionConverter::toRosMsg(std::shared_ptr<dai::ImgDetections> inNetDa

opDetectionMsg.detections[i].results.resize(1);

#if defined(IS_GALACTIC) || defined(IS_HUMBLE)
opDetectionMsg.detections[i].id = std::to_string(inNetData->detections[i].label);
opDetectionMsg.detections[i].results[0].hypothesis.class_id = std::to_string(inNetData->detections[i].label);
opDetectionMsg.detections[i].results[0].hypothesis.score = inNetData->detections[i].confidence;
#elif IS_ROS2
opDetectionMsg.detections[i].results[0].id = std::to_string(inNetData->detections[i].label);
opDetectionMsg.detections[i].results[0].score = inNetData->detections[i].confidence;
#endif
#ifdef IS_HUMBLE
opDetectionMsg.detections[i].bbox.center.position.x = xCenter;
opDetectionMsg.detections[i].bbox.center.position.y = yCenter;
#else
opDetectionMsg.detections[i].bbox.center.x = xCenter;
opDetectionMsg.detections[i].bbox.center.y = yCenter;
#endif
opDetectionMsg.detections[i].bbox.size_x = xSize;
opDetectionMsg.detections[i].bbox.size_y = ySize;
}
Expand Down
12 changes: 2 additions & 10 deletions depthai_bridge/src/SpatialDetectionConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,11 @@ void SpatialDetectionConverter::toRosMsg(std::shared_ptr<dai::SpatialImgDetectio
float yCenter = yMin + ySize / 2;
opDetectionMsg.detections[i].results.resize(1);

#if defined(IS_GALACTIC) || defined(IS_HUMBLE)
opDetectionMsg.detections[i].results[0].class_id = std::to_string(inNetData->detections[i].label);
#elif IS_ROS2
opDetectionMsg.detections[i].results[0].id = std::to_string(inNetData->detections[i].label);
opDetectionMsg.detections[i].results[0].score = inNetData->detections[i].confidence;
#endif
#ifdef IS_HUMBLE

opDetectionMsg.detections[i].bbox.center.position.x = xCenter;
opDetectionMsg.detections[i].bbox.center.position.y = yCenter;
#else
opDetectionMsg.detections[i].bbox.center.x = xCenter;
opDetectionMsg.detections[i].bbox.center.y = yCenter;
#endif

opDetectionMsg.detections[i].bbox.size_x = xSize;
opDetectionMsg.detections[i].bbox.size_y = ySize;

Expand Down

0 comments on commit d5d4f6d

Please sign in to comment.