Skip to content

Commit 4171d29

Browse files
authored
Merge pull request #8 from ROBOTIS-GIT/feature-fast-protocol
Use GroupFastSyncRead and GroupFastBulkRead
2 parents 7e7a342 + 016d975 commit 4171d29

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ ROS 2 package providing a hardware interface for controlling [Dynamixel](https:/
1111

1212
This package currently supports ROS 2 Humble only. Ensure that ROS 2 Humble is properly installed (ROS 2 Humble installation guide).
1313

14-
- [Dynamixel SDK](https://github.com/ROBOTIS-GIT/DynamixelSDK):
15-
- Install the Dynamixel SDK using the following command:
16-
17-
```bash
18-
sudo apt install ros-humble-dynamixel-sdk
19-
```
20-
2114
- Hardware Requirements:
2215

2316
- Dynamixel servos
@@ -31,6 +24,7 @@ This package currently supports ROS 2 Humble only. Ensure that ROS 2 Humble is p
3124

3225
```bash
3326
cd ~/${WORKSPACE}/src
27+
git clone -b humble https://github.com/ROBOTIS-GIT/DynamixelSDK.git
3428
git clone -b humble https://github.com/ROBOTIS-GIT/dynamixel_hardware_interface.git
3529
git clone -b humble https://github.com/ROBOTIS-GIT/dynamixel_interfaces.git
3630
```

include/dynamixel_hardware_interface/dynamixel/dynamixel.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ class Dynamixel
125125
std::vector<RWItemList> read_data_list_;
126126

127127
// sync read
128-
dynamixel::GroupSyncRead * group_sync_read_;
128+
dynamixel::GroupFastSyncRead * group_sync_read_;
129129
// indirect inform for sync read
130130
std::map<uint8_t /*id*/, IndirectInfo> indirect_info_read_;
131131

132132
// bulk read
133-
dynamixel::GroupBulkRead * group_bulk_read_;
133+
dynamixel::GroupFastBulkRead * group_bulk_read_;
134134

135135
// write item (sync or bulk) variable
136136
bool write_type_;

src/dynamixel/dynamixel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ DxlError Dynamixel::SetSyncReadHandler(std::vector<uint8_t> id_arr)
799799
IN_ADDR, indirect_info_read_[id_arr.at(0)].size);
800800

801801
group_sync_read_ =
802-
new dynamixel::GroupSyncRead(
802+
new dynamixel::GroupFastSyncRead(
803803
port_handler_, packet_handler_,
804804
IN_ADDR, indirect_info_read_[id_arr.at(0)].size);
805805

@@ -917,7 +917,7 @@ DxlError Dynamixel::SetBulkReadHandler(std::vector<uint8_t> id_arr)
917917
IN_ADDR, indirect_info_read_[id_arr.at(0)].size);
918918
}
919919

920-
group_bulk_read_ = new dynamixel::GroupBulkRead(port_handler_, packet_handler_);
920+
group_bulk_read_ = new dynamixel::GroupFastBulkRead(port_handler_, packet_handler_);
921921

922922
for (auto it_id : id_arr) {
923923
uint8_t ID = it_id;

0 commit comments

Comments
 (0)