Skip to content

Commit 1a7c204

Browse files
authored
Merge pull request #674 from ROBOTIS-GIT/main
Bump 4.0.3
2 parents b5dd448 + f03fbcf commit 1a7c204

File tree

258 files changed

+23494
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+23494
-18
lines changed

.github/workflows/ros-ci.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ name: CI
44
# Specifies the events that trigger the workflow
55
on:
66
push:
7-
branches: [ main, humble ]
7+
branches: [ main, humble, jazzy ]
88
pull_request:
9-
branches: [ main, humble ]
9+
branches: [ main, humble, jazzy ]
1010

1111
# Defines a set of jobs to be run as part of the workflow
1212
jobs:
@@ -49,6 +49,23 @@ jobs:
4949
with:
5050
required-ros-distributions: ${{ matrix.ros_distribution }}
5151

52+
- name: Check and Install ROS dependencies
53+
shell: bash
54+
run: |
55+
set -e
56+
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
57+
echo "--- Updating rosdep definitions ---"
58+
rosdep update
59+
echo "--- Installing system dependencies for ROS 2 ${{ matrix.ros_distribution }} ---"
60+
rosdep install --from-paths ros_ws/src --ignore-src -y -r --rosdistro ${{ matrix.ros_distribution }}
61+
echo "--- Performing rosdep check for ROS 2 ${{ matrix.ros_distribution }} ---"
62+
if rosdep check --from-paths ros_ws/src --ignore-src --rosdistro ${{ matrix.ros_distribution }}; then
63+
echo "--- rosdep check passed ---"
64+
else
65+
echo "--- rosdep check failed: Missing system dependencies or unresolvable keys. ---"
66+
exit 1
67+
fi
68+
5269
- name: Build and Test
5370
uses: ros-tooling/action-ros-ci@v0.3
5471
with:

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "DynamixelSDK c++"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 3.8.4
41+
PROJECT_NUMBER = 4.0.3
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

ReleaseNote.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Dynamixel SDK Release Notes
22

3+
4.0.3 (2025-12-17)
4+
------------------
5+
* Dynamixel Easy SDK supports Linux SBC environments, Linux 32-bit platforms, and ROS 2 based build and deployment workflows
6+
* Contributors: Hyungyu Kim
7+
8+
4.0.2 (2025-11-24)
9+
------------------
10+
* Easy SDK Python update
11+
* Added data types.hpp
12+
* Added error handling for cases where operation fails due to incorrect torque state or operating mode.
13+
* Contributors: Hyungyu Kim
14+
15+
4.0.1 (2025-11-05)
16+
------------------
17+
* Fix error that cache status is not updated
18+
* Contributors: Hyungyu Kim
19+
20+
4.0.0 (2025-10-14)
21+
------------------
22+
* Update Dynamixel Easy SDK in C++ Linux 64bit
23+
* Contributors: Hyungyu Kim
24+
325
3.8.4 (2025-05-28)
426
------------------
527
* Deprecate ament_include_dependency usage in CMakeLists.txt

c++/build/linux32/Makefile

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ SYMLINK = ln -s
3535
MKDIR = mkdir
3636
CC = gcc
3737
CX = g++
38-
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g
39-
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g
40-
FORMAT = -m32
38+
CONTROL_TABLE_PATH_FLAG = -DCONTROL_TABLE_PATH=\"$(INSTALL_ROOT)/share/dynamixel_sdk/control_table\"
39+
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g $(CONTROL_TABLE_PATH_FLAG)
40+
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g $(CONTROL_TABLE_PATH_FLAG)
41+
FORMAT = -m32 -std=c++17
4142
INCLUDES += -I$(DIR_DXL)/include/dynamixel_sdk
43+
INCLUDES += -I$(DIR_DXL)/include
4244

4345
#---------------------------------------------------------------------
4446
# Required external libraries
@@ -60,6 +62,11 @@ SOURCES = src/dynamixel_sdk/group_bulk_read.cpp \
6062
src/dynamixel_sdk/protocol1_packet_handler.cpp \
6163
src/dynamixel_sdk/protocol2_packet_handler.cpp \
6264
src/dynamixel_sdk/port_handler_linux.cpp \
65+
src/dynamixel_easy_sdk/connector.cpp \
66+
src/dynamixel_easy_sdk/control_table.cpp \
67+
src/dynamixel_easy_sdk/motor.cpp \
68+
src/dynamixel_easy_sdk/dynamixel_error.cpp \
69+
src/dynamixel_easy_sdk/group_executor.cpp
6370

6471

6572
OBJECTS=$(addsuffix .o,$(addprefix $(DIR_OBJS)/,$(basename $(notdir $(SOURCES)))))
@@ -88,6 +95,12 @@ install: $(TARGET)
8895
# copy the headers into the include directory
8996
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/include/dynamixel_sdk || $(MKDIR) $(INSTALL_ROOT)/include/dynamixel_sdk
9097
$(CP_ALL) $(DIR_DXL)/include/dynamixel_sdk/* $(INSTALL_ROOT)/include/dynamixel_sdk/
98+
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/include/dynamixel_easy_sdk || $(MKDIR) $(INSTALL_ROOT)/include/dynamixel_easy_sdk
99+
$(CP_ALL) $(DIR_DXL)/include/dynamixel_easy_sdk/* $(INSTALL_ROOT)/include/dynamixel_easy_sdk
100+
101+
# copy the control_table directory into the share directory
102+
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/share/dynamixel_sdk || $(MKDIR) -p $(INSTALL_ROOT)/share/dynamixel_sdk
103+
$(CP_ALL) $(DIR_DXL)/../control_table $(INSTALL_ROOT)/share/dynamixel_sdk/
91104

92105
$(LD_CONFIG)
93106

@@ -99,6 +112,8 @@ uninstall:
99112

100113
$(RM) $(INSTALL_ROOT)/include/dynamixel_sdk/dynamixel_sdk.h
101114
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_sdk/*
115+
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_easy_sdk/*
116+
$(RM_ALL) $(INSTALL_ROOT)/share/dynamixel_sdk/control_table
102117

103118
reinstall: uninstall install
104119

@@ -119,6 +134,9 @@ $(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_sdk/%.c
119134
$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_sdk/%.cpp
120135
$(CX) $(CXFLAGS) -c $? -o $@
121136

137+
$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_easy_sdk/%.cpp
138+
$(CX) $(CXFLAGS) -c $? -o $@
139+
122140
#---------------------------------------------------------------------
123141
# END OF MAKEFILE
124142
#---------------------------------------------------------------------

c++/build/linux64/Makefile

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ SYMLINK = ln -s
3535
MKDIR = mkdir
3636
CC = gcc
3737
CX = g++
38-
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g
39-
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g
40-
FORMAT = -m64
38+
CONTROL_TABLE_PATH_FLAG = -DCONTROL_TABLE_PATH=\"$(INSTALL_ROOT)/share/dynamixel_sdk/control_table\"
39+
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g $(CONTROL_TABLE_PATH_FLAG)
40+
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g $(CONTROL_TABLE_PATH_FLAG)
41+
FORMAT = -m64 -std=c++17
4142
INCLUDES += -I$(DIR_DXL)/include/dynamixel_sdk
43+
INCLUDES += -I$(DIR_DXL)/include
4244

4345
#---------------------------------------------------------------------
4446
# Required external libraries
@@ -60,6 +62,11 @@ SOURCES = src/dynamixel_sdk/group_bulk_read.cpp \
6062
src/dynamixel_sdk/protocol1_packet_handler.cpp \
6163
src/dynamixel_sdk/protocol2_packet_handler.cpp \
6264
src/dynamixel_sdk/port_handler_linux.cpp \
65+
src/dynamixel_easy_sdk/connector.cpp \
66+
src/dynamixel_easy_sdk/control_table.cpp \
67+
src/dynamixel_easy_sdk/motor.cpp \
68+
src/dynamixel_easy_sdk/dynamixel_error.cpp \
69+
src/dynamixel_easy_sdk/group_executor.cpp
6370

6471

6572
OBJECTS=$(addsuffix .o,$(addprefix $(DIR_OBJS)/,$(basename $(notdir $(SOURCES)))))
@@ -89,6 +96,13 @@ install: $(TARGET)
8996
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/include/dynamixel_sdk || $(MKDIR) $(INSTALL_ROOT)/include/dynamixel_sdk
9097
$(CP_ALL) $(DIR_DXL)/include/dynamixel_sdk/* $(INSTALL_ROOT)/include/dynamixel_sdk
9198

99+
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/include/dynamixel_easy_sdk || $(MKDIR) $(INSTALL_ROOT)/include/dynamixel_easy_sdk
100+
$(CP_ALL) $(DIR_DXL)/include/dynamixel_easy_sdk/* $(INSTALL_ROOT)/include/dynamixel_easy_sdk
101+
102+
# copy the control_table directory into the share directory
103+
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/share/dynamixel_sdk || $(MKDIR) -p $(INSTALL_ROOT)/share/dynamixel_sdk
104+
$(CP_ALL) $(DIR_DXL)/../control_table $(INSTALL_ROOT)/share/dynamixel_sdk/
105+
92106
$(LD_CONFIG)
93107

94108
uninstall:
@@ -99,6 +113,8 @@ uninstall:
99113

100114
$(RM) $(INSTALL_ROOT)/include/dynamixel_sdk/dynamixel_sdk.h
101115
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_sdk/*
116+
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_easy_sdk/*
117+
$(RM_ALL) $(INSTALL_ROOT)/share/dynamixel_sdk/control_table
102118

103119
reinstall: uninstall install
104120

@@ -119,6 +135,9 @@ $(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_sdk/%.c
119135
$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_sdk/%.cpp
120136
$(CX) $(CXFLAGS) -c $? -o $@
121137

138+
$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_easy_sdk/%.cpp
139+
$(CX) $(CXFLAGS) -c $? -o $@
140+
122141
#---------------------------------------------------------------------
123142
# END OF MAKEFILE
124143
#---------------------------------------------------------------------

c++/build/linux_sbc/Makefile

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ SYMLINK = ln -s
3535
MKDIR = mkdir
3636
CC = gcc
3737
CX = g++
38-
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) -fPIC -g
39-
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) -fPIC -g
38+
CONTROL_TABLE_PATH_FLAG = -DCONTROL_TABLE_PATH=\"$(INSTALL_ROOT)/share/dynamixel_sdk/control_table\"
39+
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) -fPIC -g $(CONTROL_TABLE_PATH_FLAG)
40+
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) -fPIC -g $(CONTROL_TABLE_PATH_FLAG)
4041
INCLUDES += -I$(DIR_DXL)/include/dynamixel_sdk
42+
INCLUDES += -I$(DIR_DXL)/include
4143

4244
#---------------------------------------------------------------------
4345
# Required external libraries
@@ -59,6 +61,11 @@ SOURCES = src/dynamixel_sdk/group_bulk_read.cpp \
5961
src/dynamixel_sdk/protocol1_packet_handler.cpp \
6062
src/dynamixel_sdk/protocol2_packet_handler.cpp \
6163
src/dynamixel_sdk/port_handler_linux.cpp \
64+
src/dynamixel_easy_sdk/connector.cpp \
65+
src/dynamixel_easy_sdk/control_table.cpp \
66+
src/dynamixel_easy_sdk/motor.cpp \
67+
src/dynamixel_easy_sdk/dynamixel_error.cpp \
68+
src/dynamixel_easy_sdk/group_executor.cpp
6269

6370

6471
OBJECTS=$(addsuffix .o,$(addprefix $(DIR_OBJS)/,$(basename $(notdir $(SOURCES)))))
@@ -86,7 +93,14 @@ install: $(TARGET)
8693

8794
# copy the headers into the include directory
8895
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/include/dynamixel_sdk || $(MKDIR) $(INSTALL_ROOT)/include/dynamixel_sdk
89-
$(CP_ALL) $(DIR_DXL)/include/dynamixel_sdk/* $(INSTALL_ROOT)/include/dynamixel_sdk/
96+
$(CP_ALL) $(DIR_DXL)/include/dynamixel_sdk/* $(INSTALL_ROOT)/include/dynamixel_sdk
97+
98+
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/include/dynamixel_easy_sdk || $(MKDIR) $(INSTALL_ROOT)/include/dynamixel_easy_sdk
99+
$(CP_ALL) $(DIR_DXL)/include/dynamixel_easy_sdk/* $(INSTALL_ROOT)/include/dynamixel_easy_sdk
100+
101+
# copy the control_table directory into the share directory
102+
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/share/dynamixel_sdk || $(MKDIR) -p $(INSTALL_ROOT)/share/dynamixel_sdk
103+
$(CP_ALL) $(DIR_DXL)/../control_table $(INSTALL_ROOT)/share/dynamixel_sdk/
90104

91105
$(LD_CONFIG)
92106

@@ -98,6 +112,8 @@ uninstall:
98112

99113
$(RM) $(INSTALL_ROOT)/include/dynamixel_sdk/dynamixel_sdk.h
100114
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_sdk/*
115+
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_easy_sdk/*
116+
$(RM_ALL) $(INSTALL_ROOT)/share/dynamixel_sdk/control_table
101117

102118
reinstall: uninstall install
103119

@@ -118,6 +134,9 @@ $(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_sdk/%.c
118134
$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_sdk/%.cpp
119135
$(CX) $(CXFLAGS) -c $? -o $@
120136

137+
$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_easy_sdk/%.cpp
138+
$(CX) $(CXFLAGS) -c $? -o $@
139+
121140
#---------------------------------------------------------------------
122141
# END OF MAKEFILE
123142
#---------------------------------------------------------------------
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Copyright 2025 ROBOTIS CO., LTD.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// Author: Hyungyu Kim
16+
17+
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_EASY_SDK_CONNECTOR_HPP_
18+
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_EASY_SDK_CONNECTOR_HPP_
19+
20+
#include <memory>
21+
#include <string>
22+
#include <vector>
23+
24+
#include "dynamixel_sdk/dynamixel_sdk.h"
25+
#include "dynamixel_easy_sdk/dynamixel_error.hpp"
26+
#include "dynamixel_easy_sdk/motor.hpp"
27+
#include "dynamixel_easy_sdk/group_executor.hpp"
28+
29+
namespace dynamixel
30+
{
31+
class Connector
32+
{
33+
public:
34+
Connector(const std::string & port_name, int baud_rate);
35+
36+
virtual ~Connector();
37+
38+
std::unique_ptr<Motor> createMotor(uint8_t id);
39+
std::vector<std::unique_ptr<Motor>> createAllMotors(int start_id = 0, int end_id = 252);
40+
std::unique_ptr<GroupExecutor> createGroupExecutor();
41+
42+
Result<void, DxlError> write1ByteData(uint8_t id, uint16_t address, uint8_t value);
43+
Result<void, DxlError> write2ByteData(uint8_t id, uint16_t address, uint16_t value);
44+
Result<void, DxlError> write4ByteData(uint8_t id, uint16_t address, uint32_t value);
45+
Result<uint8_t, DxlError> read1ByteData(uint8_t id, uint16_t address);
46+
Result<uint16_t, DxlError> read2ByteData(uint8_t id, uint16_t address);
47+
Result<uint32_t, DxlError> read4ByteData(uint8_t id, uint16_t address);
48+
49+
Result<void, DxlError> reboot(uint8_t id);
50+
Result<uint16_t, DxlError> ping(uint8_t id);
51+
Result<std::vector<uint8_t>, DxlError> broadcastPing();
52+
Result<void, DxlError> factoryReset(uint8_t id, uint8_t option);
53+
void closePort() {port_handler_->closePort();}
54+
55+
PortHandler * getPortHandler() const {return port_handler_.get();}
56+
PacketHandler * getPacketHandler() const {return packet_handler_;}
57+
58+
private:
59+
std::unique_ptr<PortHandler> port_handler_;
60+
PacketHandler * packet_handler_;
61+
};
62+
} // namespace dynamixel
63+
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_EASY_SDK_CONNECTOR_HPP_ */
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Copyright 2025 ROBOTIS CO., LTD.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// Author: Hyungyu Kim
16+
17+
#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_EASY_SDK_CONTROL_TABLE_HPP_
18+
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_EASY_SDK_CONTROL_TABLE_HPP_
19+
20+
#include <cstdint>
21+
#include <fstream>
22+
#include <iostream>
23+
#include <map>
24+
#include <sstream>
25+
#include <string>
26+
27+
#include "dynamixel_easy_sdk/data_types.hpp"
28+
#include "dynamixel_easy_sdk/dynamixel_error.hpp"
29+
30+
namespace dynamixel
31+
{
32+
class ControlTable
33+
{
34+
public:
35+
static const std::map<uint16_t, std::string> ParsingModelList();
36+
static const std::string getModelName(uint16_t model_number);
37+
static const std::map<std::string, ControlTableItem> & getControlTable(uint16_t model_number);
38+
};
39+
} // namespace dynamixel
40+
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_EASY_SDK_CONTROL_TABLE_HPP_ */

0 commit comments

Comments
 (0)