Skip to content

Commit 9fe7800

Browse files
committed
[ROS2] [Jazzy] Update librealsense version to 2.57.5 in CI workflows and Dockerfile; improve logging format in inference modules
1 parent c8471af commit 9fe7800

16 files changed

Lines changed: 45 additions & 57 deletions

.github/workflows/code_format.yml

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,35 @@
11

22
name: Code_Format_Check
33

4-
# Controls when the workflow will run
54
on:
6-
# Triggers the workflow on push or pull request events but only for the "master" branch
75
push:
86
branches: [ "master", "ros2" ]
97
pull_request:
108
branches: [ "master", "ros2" ]
11-
12-
# Allows you to run this workflow manually from the Actions tab
139
workflow_dispatch:
1410

1511
permissions:
1612
contents: read
1713

18-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1914
jobs:
20-
# Removed the old artifacts
21-
remove-old-artifacts:
22-
runs-on: ubuntu-22.04
23-
timeout-minutes: 10
24-
steps:
25-
- name: Remove old artifacts
26-
uses: c-hive/gha-remove-artifacts@v1
27-
with:
28-
age: '15 days'
2915
code-format-check:
30-
# The type of runner that the job will run on
3116
runs-on: ubuntu-22.04
32-
# Steps represent a sequence of tasks that will be executed as part of the job
17+
timeout-minutes: 10
18+
3319
steps:
34-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
35-
- uses: actions/checkout@v3
36-
# Install clang-format
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
3723
- name: Install clang-format
38-
run: sudo apt-get update && sudo apt-get install clang-format -y
39-
# Run clang-format on all C++ files
40-
- name: Run clang-format
4124
run: |
42-
find . -type f \( -name '*.h' -o -name '*.hpp' -o -name '*.cpp' \) \
43-
! -path "*/build/*" ! -path "*/install/*" ! -path "*/log/*" \
44-
-exec clang-format -i -style=file {} \;
45-
# Check if any files were modified
46-
- name: Check for formatting changes
25+
sudo apt-get update
26+
sudo apt-get install -y clang-format-14
27+
sudo ln -s /usr/bin/clang-format-14 /usr/bin/clang-format
28+
29+
- name: Run clang-format check
4730
run: |
48-
git diff --exit-code || (echo "Code formatting issues detected. Please run clang-format locally." && exit 1)
31+
FILES=$(find . -type f \( -name '*.h' -o -name '*.hpp' -o -name '*.cpp' \) \
32+
! -path "*/build/*" ! -path "*/install/*" ! -path "*/log/*")
4933
34+
clang-format --dry-run --Werror -style=file $FILES
5035

.github/workflows/ubuntu-24.04-jazzy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
git libssl-dev libusb-1.0-0-dev libudev-dev pkg-config \
5656
libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev cmake
5757
cd ~/
58-
git clone --depth 1 --branch v2.54.2 https://github.com/IntelRealSense/librealsense.git
58+
git clone --depth 1 --branch v2.57.5 https://github.com/IntelRealSense/librealsense.git
5959
cd librealsense
6060
mkdir build && cd build
6161
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_GRAPHICAL_EXAMPLES=OFF

docker/ros2_ov2025/ros2_jazzy/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN apt update && \
3131

3232
# Build librealsense2
3333
WORKDIR /root/
34-
RUN git clone --branch v2.55.1 --single-branch https://github.com/IntelRealSense/librealsense.git && \
34+
RUN git clone --branch v2.57.5 --single-branch https://github.com/IntelRealSense/librealsense.git && \
3535
cd librealsense && \
3636
mkdir build && \
3737
cd build && \

openvino_wrapper_lib/include/openvino_wrapper_lib/models/attributes/base_attribute.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ class ModelAttribute
107107
if (attr_.max_proposal_count <= 0 || attr_.object_size <= 0 || attr_.input_height <= 0 || attr_.input_width <= 0 ||
108108
attr_.input_names.empty() || attr_.output_names.empty()) {
109109
slog::info << "--------" << slog::endl;
110-
slog::warn << "Not all attributes are set correctly! not 0 or empty is allowed in" << " the above list."
111-
<< slog::endl;
110+
slog::warn << "Not all attributes are set correctly! not 0 or empty is allowed in"
111+
<< " the above list." << slog::endl;
112112
}
113113
if (attr_.input_tensor_count != static_cast<int>(attr_.input_names.size())) {
114114
slog::info << "--------" << slog::endl;

openvino_wrapper_lib/include/openvino_wrapper_lib/utils/version_info.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ static std::ostream& operator<<(std::ostream& os, const ov::Version& version)
5353
{
5454
os << "\n\tAPI version ............ ";
5555
os << OPENVINO_VERSION_MAJOR << "." << OPENVINO_VERSION_MINOR << "." << OPENVINO_VERSION_PATCH;
56-
os << "\n\t" << "Build .................. " << version.buildNumber;
57-
os << "\n\t" << "Description ............ " << version.description;
56+
os << "\n\t"
57+
<< "Build .................. " << version.buildNumber;
58+
os << "\n\t"
59+
<< "Description ............ " << version.description;
5860

5961
return os;
6062
}

openvino_wrapper_lib/src/inferences/age_gender_detection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ const std::vector<cv::Rect>
105105
openvino_wrapper_lib::AgeGenderDetection::getFilteredROIs(const std::string filter_conditions) const
106106
{
107107
if (!filter_conditions.empty()) {
108-
slog::err << "Age gender detection does not support filtering now! " << "Filter conditions: " << filter_conditions
109-
<< slog::endl;
108+
slog::err << "Age gender detection does not support filtering now! "
109+
<< "Filter conditions: " << filter_conditions << slog::endl;
110110
}
111111
std::vector<cv::Rect> filtered_rois;
112112
for (auto res : results_) {

openvino_wrapper_lib/src/inferences/base_reidentification.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ double openvino_wrapper_lib::Tracker::calcSimilarity(const std::vector<float>& f
6262
const std::vector<float>& feature_b)
6363
{
6464
if (feature_a.size() != feature_b.size()) {
65-
slog::err << "cosine similarity can't be called for vectors of different lengths: " << "feature_a size = "
66-
<< std::to_string(feature_a.size()) << "feature_b size = " << std::to_string(feature_b.size())
67-
<< slog::endl;
65+
slog::err << "cosine similarity can't be called for vectors of different lengths: "
66+
<< "feature_a size = " << std::to_string(feature_a.size())
67+
<< "feature_b size = " << std::to_string(feature_b.size()) << slog::endl;
6868
}
6969
float mul_sum, denom_a, denom_b, value_a, value_b;
7070
mul_sum = denom_a = denom_b = value_a = value_b = 0;

openvino_wrapper_lib/src/inferences/emotions_detection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ const std::vector<cv::Rect>
127127
openvino_wrapper_lib::EmotionsDetection::getFilteredROIs(const std::string filter_conditions) const
128128
{
129129
if (!filter_conditions.empty()) {
130-
slog::err << "Emotion detection does not support filtering now! " << "Filter conditions: " << filter_conditions
131-
<< slog::endl;
130+
slog::err << "Emotion detection does not support filtering now! "
131+
<< "Filter conditions: " << filter_conditions << slog::endl;
132132
}
133133
std::vector<cv::Rect> filtered_rois;
134134
for (auto res : results_) {

openvino_wrapper_lib/src/inferences/face_reidentification.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ const std::vector<cv::Rect>
114114
openvino_wrapper_lib::FaceReidentification::getFilteredROIs(const std::string filter_conditions) const
115115
{
116116
if (!filter_conditions.empty()) {
117-
slog::err << "Face reidentification does not support filtering now! " << "Filter conditions: " << filter_conditions
118-
<< slog::endl;
117+
slog::err << "Face reidentification does not support filtering now! "
118+
<< "Filter conditions: " << filter_conditions << slog::endl;
119119
}
120120
std::vector<cv::Rect> filtered_rois;
121121
for (auto res : results_) {

openvino_wrapper_lib/src/inferences/head_pose_detection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ const std::vector<cv::Rect>
107107
openvino_wrapper_lib::HeadPoseDetection::getFilteredROIs(const std::string filter_conditions) const
108108
{
109109
if (!filter_conditions.empty()) {
110-
slog::err << "Headpose detection does not support filtering now! " << "Filter conditions: " << filter_conditions
111-
<< slog::endl;
110+
slog::err << "Headpose detection does not support filtering now! "
111+
<< "Filter conditions: " << filter_conditions << slog::endl;
112112
}
113113
std::vector<cv::Rect> filtered_rois;
114114
for (auto res : results_) {

0 commit comments

Comments
 (0)