Skip to content

Commit 9d10eab

Browse files
authored
Merge pull request #13 from ROBOTIS-GIT/feature-humble-lint-ci
Added ci, lint and bump
2 parents 4171d29 + dabe6c3 commit 9d10eab

File tree

7 files changed

+82
-27
lines changed

7 files changed

+82
-27
lines changed

.github/workflows/ros-ci.yml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,57 @@
1-
name: ros-ci
1+
# The name of the workflow
2+
name: CI
23

3-
# Controls when the action will run. Triggers the workflow on push or pull request
4+
# Specifies the events that trigger the workflow
45
on:
56
push:
6-
branches: [ humble ]
7+
branches: [ main, humble, jazzy ]
78
pull_request:
8-
branches: [ humble ]
9+
branches: [ main, humble, jazzy ]
910

10-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
11+
# Defines a set of jobs to be run as part of the workflow
1112
jobs:
12-
humble:
13+
# The name of the job
14+
ROS_CI:
1315
runs-on: ubuntu-22.04
1416
strategy:
1517
fail-fast: false
1618
matrix:
1719
ros_distribution:
1820
- humble
21+
- jazzy
22+
- rolling
1923
include:
24+
# ROS 2 Humble Hawksbill
2025
- docker_image: ubuntu:jammy
2126
ros_distribution: humble
2227
ros_version: 2
23-
# # Rolling
24-
# - docker_image: ubuntu:jammy
25-
# ros_distribution: rolling
26-
# ros_version: 2
28+
# ROS 2 Jazzy Jalisco
29+
- docker_image: ubuntu:noble
30+
ros_distribution: jazzy
31+
ros_version: 2
32+
# ROS 2 Rolling Ridley
33+
- docker_image: ubuntu:noble
34+
ros_distribution: rolling
35+
ros_version: 2
2736
container:
2837
image: ${{ matrix.docker_image }}
2938
steps:
30-
- name: Setup directories
39+
- name: Setup workspace
3140
run: mkdir -p ros_ws/src
32-
- name: checkout
33-
uses: actions/checkout@v3
41+
42+
- name: Checkout code
43+
uses: actions/checkout@v4
3444
with:
3545
path: ros_ws/src
46+
3647
- name: Setup ROS environment
37-
uses: ros-tooling/setup-ros@0.7.1
48+
uses: ros-tooling/setup-ros@v0.7
3849
with:
3950
required-ros-distributions: ${{ matrix.ros_distribution }}
51+
4052
- name: Build and Test
41-
uses: ros-tooling/action-ros-ci@0.3.5
53+
uses: ros-tooling/action-ros-ci@v0.3
4254
with:
43-
package-name: dynamixel_hardware_interface
4455
target-ros2-distro: ${{ matrix.ros_distribution }}
4556
vcs-repo-file-url: "https://raw.githubusercontent.com/ROBOTIS-GIT/dynamixel_hardware_interface/main/dynamixel_hardware_interface_ci.repos"
57+
package-name: dynamixel_hardware_interface

.github/workflows/ros-lint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# The name of the workflow
2+
name: Lint
3+
4+
# Specifies the events that trigger the workflow
5+
on:
6+
pull_request:
7+
8+
# Defines a set of jobs to be run as part of the workflow
9+
jobs:
10+
ament_lint:
11+
runs-on: ubuntu-latest
12+
container:
13+
image: rostooling/setup-ros-docker:ubuntu-noble-ros-rolling-ros-base-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
linter: [cppcheck, cpplint, uncrustify, flake8, pep257, lint_cmake, xmllint, copyright]
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup ROS environment
23+
uses: ros-tooling/[email protected]
24+
25+
- name: Run Linter
26+
env:
27+
AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: 1
28+
uses: ros-tooling/action-ros-lint@master
29+
with:
30+
linter: ${{ matrix.linter }}
31+
distribution: rolling
32+
package-name: "*"

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
Changelog for package dynamixel_hardware_interface
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
1.3.0 (2025-02-17)
6+
------------------
7+
* Enhance Error Handling and Timeout Management
8+
* Use GroupFastSyncRead and GroupFastBulkRead
9+
* Remove deprecated parameter ros_update_freq_ to prevent stoi failure
10+
* Contributors: Woojin Wie
11+
512
1.2.0 (2025-01-17)
613
------------------
714
* Extend Bulk/Sync Selection Logic to Include Indirect Operations

dynamixel_hardware_interface_ci.repos

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ repositories:
22
utils/DynamixelSDK:
33
type: git
44
url: https://github.com/ROBOTIS-GIT/DynamixelSDK.git
5-
version: humble
5+
version: main
66
dynamixel_hardware_interface/dynamixel_interfaces:
77
type: git
88
url: https://github.com/ROBOTIS-GIT/dynamixel_interfaces.git
9-
version: humble
9+
version: main

include/dynamixel_hardware_interface/dynamixel_hardware_interface.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
#include "dynamixel_interfaces/srv/set_data_to_dxl.hpp"
3939
#include "dynamixel_interfaces/srv/reboot_dxl.hpp"
4040

41-
#include "realtime_tools/realtime_publisher.h"
42-
#include "realtime_tools/realtime_buffer.h"
41+
#include "realtime_tools/realtime_publisher.hpp"
42+
#include "realtime_tools/realtime_buffer.hpp"
4343

4444
#include "std_srvs/srv/set_bool.hpp"
4545

package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version='1.0' encoding='UTF-8'?>
22
<package format="3">
33
<name>dynamixel_hardware_interface</name>
4-
<version>1.2.0</version>
4+
<version>1.3.0</version>
55
<description>
66
ROS 2 package providing a hardware interface for controlling Dynamixel motors via the ROS 2 control framework.
77
</description>

src/dynamixel_hardware_interface.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ hardware_interface::CallbackReturn DynamixelHardware::on_init(
7070
baud_rate_ = info_.hardware_parameters["baud_rate"];
7171
try {
7272
err_timeout_ms_ = stod(info_.hardware_parameters["error_timeout_ms"]);
73-
} catch (const std::exception& e) {
74-
RCLCPP_ERROR(logger_, "Failed to parse error_timeout_ms parameter: %s, using default value", e.what());
73+
} catch (const std::exception & e) {
74+
RCLCPP_ERROR(
75+
logger_, "Failed to parse error_timeout_ms parameter: %s, using default value",
76+
e.what());
7577
}
7678

7779
RCLCPP_INFO_STREAM(
@@ -405,10 +407,11 @@ hardware_interface::return_type DynamixelHardware::read(
405407
read_error_duration_ = rclcpp::Duration(0, 0);
406408
}
407409
read_error_duration_ = read_error_duration_ + period;
408-
410+
409411
RCLCPP_ERROR_STREAM(
410412
logger_,
411-
"Dynamixel Read Fail (Duration: " << read_error_duration_.seconds() * 1000 << "ms/" << err_timeout_ms_ << "ms)");
413+
"Dynamixel Read Fail (Duration: " << read_error_duration_.seconds() * 1000 << "ms/" <<
414+
err_timeout_ms_ << "ms)");
412415

413416
if (read_error_duration_.seconds() * 1000 >= err_timeout_ms_) {
414417
return hardware_interface::return_type::ERROR;
@@ -470,10 +473,11 @@ hardware_interface::return_type DynamixelHardware::write(
470473
return hardware_interface::return_type::OK;
471474
} else {
472475
write_error_duration_ = write_error_duration_ + period;
473-
476+
474477
RCLCPP_ERROR_STREAM(
475478
logger_,
476-
"Dynamixel Write Fail (Duration: " << write_error_duration_.seconds() * 1000 << "ms/" << err_timeout_ms_ << "ms)");
479+
"Dynamixel Write Fail (Duration: " << write_error_duration_.seconds() * 1000 << "ms/" <<
480+
err_timeout_ms_ << "ms)");
477481

478482
if (write_error_duration_.seconds() * 1000 >= err_timeout_ms_) {
479483
return hardware_interface::return_type::ERROR;

0 commit comments

Comments
 (0)