Skip to content

Commit 834c9b0

Browse files
authored
Merge pull request #21 from AGH-CEAI/feature/multithread_refactor
Refactor - Multithread modbus communication
2 parents 6df3623 + 7191d26 commit 834c9b0

19 files changed

+1046
-877
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Before build, change the hardcoded parameters in the beginning of the `robotiq_h
7373

7474
To run test:
7575
```bash
76-
cd cd ~/ceai_ws/src/robotiq_hande_driver/build/robotiq_hande_driver/
76+
cd ~/ceai/ros_ws/build/robotiq_hande_driver
7777
./communication_test
7878
```
7979

robotiq_hande_driver/CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Added
11+
12+
* [PR-21](https://github.com/AGH-CEAI/robotiq_hande_driver/pull/21) - Added:
13+
* `SocatManager` for managing the external `socat` process.
14+
* Added colored logging.
15+
* Introduced 4 new params for URDFs:
16+
* `frequency_hz` (int) to control the amount of sleep rate in new thread
17+
* `create_socat_tty` (bool) to create a virtual serial port,
18+
* `ip_adress` and `port` to configure the creation of virtual serial port with `socat`,
19+
1120
### Changed
21+
22+
* [PR-21](https://github.com/AGH-CEAI/robotiq_hande_driver/pull/21) - Refactored the modbus communication to use multithreads:
23+
* Renamed `application.hpp/cpp` to `hande_gripper.hpp/cpp`.
24+
* Changed plain arrays `uint8_t bytes_[]` into `std::array<uint8_t, *>`.
25+
* Moved all logic from the `communication.cpp/hpp` to `protocol_logic.cpp/hpp`.
26+
* Moved all non-trivial definitions from `*.hpp`s to `*.cpp`s.
27+
* Moved from C-like functions to C++ ones (e.g. to `chrono` and `thread` instead of `usleep()`).
28+
* Encapsulated whole `Communication` config into `CommunicationConfig` struct.
29+
* renamed `tty` param to `tty_port` for better clarity.
30+
1231
### Deprecated
32+
1333
### Removed
1434
### Fixed
35+
36+
* [PR-21](https://github.com/AGH-CEAI/robotiq_hande_driver/pull/21) - Fixed:
37+
* Fixed integration with - UR's RTDE communication protocol ([aegis_ros#38](https://github.com/AGH-CEAI/aegis_ros/issues/38)).
38+
* Re-enabled the `-Werror` flag #5.
39+
* Fixed typos with wrong values in `GRIPPER_OUTPUT_FIRST_REG` and `GRIPPER_INPUT_FIRST_REG`.
40+
1541
### Security
1642

1743
## [0.1.0] - 2025-03-13

robotiq_hande_driver/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ cmake_minimum_required(VERSION 3.16)
22
project(robotiq_hande_driver)
33

44
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
5-
# TODO(issue#5) Fix warnings to enable the -Werror flag
6-
add_compile_options(-Wall -Wextra -Wpedantic)
5+
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
76
endif()
87

98
include(FindPkgConfig)
@@ -25,8 +24,12 @@ foreach(dependency IN ITEMS ${HW_IF_INCLUDE_DEPENDS})
2524
endforeach()
2625

2726
add_library(
28-
${PROJECT_NAME} SHARED hardware/src/hande_hardware_interface.cpp hardware/src/application.cpp
29-
hardware/src/communication.cpp hardware/src/protocol_logic.cpp)
27+
${PROJECT_NAME} SHARED
28+
hardware/src/hande_hardware_interface.cpp
29+
hardware/src/hande_gripper.cpp
30+
hardware/src/communication.cpp
31+
hardware/src/protocol_logic.cpp
32+
hardware/src/socat_manager.cpp)
3033

3134
target_link_libraries(${PROJECT_NAME} PUBLIC ${DEPENDS})
3235

robotiq_hande_driver/hardware/include/robotiq_hande_driver/application.hpp

Lines changed: 0 additions & 324 deletions
This file was deleted.

0 commit comments

Comments
 (0)