Skip to content
Merged
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
60c7af0
add rosdep ci
GyuH13 Jun 19, 2025
54cabbf
Merge pull request #659 from ROBOTIS-GIT/feature-rosdep-ci
robotpilot Jun 20, 2025
0c29a54
api update in cpp linux 64bit
GyuH13 Aug 29, 2025
ed28160
Add exception in input param of getAllMotors
GyuH13 Aug 31, 2025
73c37dc
Use Makefile macro for control table path instead of hardcoding
GyuH13 Sep 1, 2025
be4e0a7
remove duplicate model_list
GyuH13 Sep 1, 2025
c530947
fix indentation
GyuH13 Sep 1, 2025
2ecc213
make getmotor function return unique_ptr
GyuH13 Sep 1, 2025
c469d8b
apply guard clause to improve readability
GyuH13 Sep 1, 2025
9865753
delete tab
GyuH13 Sep 8, 2025
f28c620
apply broadcastPing to getAllmotors function
GyuH13 Sep 9, 2025
f67d1d9
makefile typo error
GyuH13 Sep 9, 2025
f0485ca
add example
GyuH13 Sep 9, 2025
6ed0156
lint
GyuH13 Sep 9, 2025
fb3609a
Bump
GyuH13 Sep 9, 2025
c7ecd45
add const return in dxl Result object
GyuH13 Sep 9, 2025
a39c5d0
Remove changebaudrate
GyuH13 Sep 9, 2025
c75d8e7
header guard fix
GyuH13 Sep 9, 2025
ca75cf2
Make drive mode setup function to use parameter
GyuH13 Sep 11, 2025
2cc597e
example code update
GyuH13 Sep 11, 2025
080fb44
add motor group
GyuH13 Sep 18, 2025
1276415
add motor group
GyuH13 Sep 18, 2025
4ddebcf
remove example
GyuH13 Sep 23, 2025
7fa6d53
add pid gain function
GyuH13 Sep 29, 2025
cef960a
add current function
GyuH13 Sep 29, 2025
baad93e
unified motor object with motor proxy
GyuH13 Oct 10, 2025
bfb62ef
change function name which is named getMotor to createMotor
GyuH13 Oct 10, 2025
3ef96ec
remove motor header in group_executor.hpp
GyuH13 Oct 10, 2025
0af6a8a
lint
GyuH13 Oct 14, 2025
970dddf
bump
GyuH13 Oct 14, 2025
5a4733f
bump
GyuH13 Oct 15, 2025
aaff0f1
remove protocol arg in connector
GyuH13 Oct 15, 2025
b87a605
add error checking
GyuH13 Oct 16, 2025
90d55c6
change file structure
GyuH13 Oct 16, 2025
1f812ea
modified makefile
GyuH13 Oct 16, 2025
0052c5c
bump
GyuH13 Oct 16, 2025
160e3b9
change name of package to Easy SDK
GyuH13 Oct 16, 2025
0a4f971
reflect review
GyuH13 Oct 21, 2025
693076c
reflect review
GyuH13 Oct 21, 2025
ea714c4
Merge pull request #664 from ROBOTIS-GIT/feature-api-update
GyuH13 Nov 2, 2025
e86135b
bug fix that cache status is not updated
GyuH13 Nov 4, 2025
8c8ba6c
Bump
GyuH13 Nov 4, 2025
61f382f
Merge pull request #668 from ROBOTIS-GIT/feature-status-cache-bug-fix
GyuH13 Nov 5, 2025
a3b550e
python single motor control update
GyuH13 Nov 6, 2025
56dc925
cpp refactoring
GyuH13 Nov 7, 2025
6dd9bd5
add group motor control in python
GyuH13 Nov 10, 2025
2903299
add current and PWM mode
GyuH13 Nov 10, 2025
6f9f3cc
add getPresentpwm function
GyuH13 Nov 10, 2025
6920d45
python group control update
GyuH13 Nov 11, 2025
e3055cc
lint
GyuH13 Nov 11, 2025
516a3e5
cpp improvement update
GyuH13 Nov 11, 2025
58ed7d3
add data_types.hpp and remove stagedCommand.hpp
GyuH13 Nov 11, 2025
7475813
cpp update
GyuH13 Nov 12, 2025
6d55bc9
remove include control_table sentence in groupExecutor
GyuH13 Nov 12, 2025
aa87a44
refactorying groupExecutor
GyuH13 Nov 12, 2025
fa009d5
Added compatibility for Python versions below 3.9
GyuH13 Nov 12, 2025
2765bc9
processStatusRequests: add error handling for operating mode and torq…
GyuH13 Nov 17, 2025
e80ea1c
control_table.py: fix CONTROL_TABLE_PATH import for correct module st…
GyuH13 Nov 17, 2025
48736a5
motor.py: add error handling for unsupported data length in read/writ…
GyuH13 Nov 17, 2025
21cb38c
fix: update closePort method to use instance port_handler
GyuH13 Nov 17, 2025
02b75d5
fix: enhance error handling in port opening and baud rate setting
GyuH13 Nov 18, 2025
d55edd2
fix: improve error handling for port opening in Connector class
GyuH13 Nov 18, 2025
7455529
refactor: remove commented-out code for executeRead method in GroupEx…
GyuH13 Nov 18, 2025
9b97ae6
fix: update package description to reflect version 4.0.1
GyuH13 Nov 18, 2025
9f10443
refactor: replace custom _toSignedInt method with toSignedInt functio…
GyuH13 Nov 18, 2025
36a3388
fix: handle multiple import errors for resources module in control_ta…
GyuH13 Nov 18, 2025
e235116
rename DxlErrorCode to DxlError and update references across the code…
GyuH13 Nov 19, 2025
b52c049
refactor: update DxlRuntimeError and getErrorMessage to use dxl_error…
GyuH13 Nov 19, 2025
b9ce5ff
refactoring
GyuH13 Nov 20, 2025
0330829
Add broadcastPing() and closePort() in connector class of cpp
GyuH13 Nov 21, 2025
d0883d8
add motor control methods for homing offset and limits
GyuH13 Nov 24, 2025
e977a8d
BUMP 4.0.2
GyuH13 Nov 24, 2025
cb6eab9
bump
GyuH13 Nov 24, 2025
edf6c09
changes args type of setGoalPosition, setGoalVelocity uint32_t to in…
GyuH13 Nov 24, 2025
b04a0ed
Merge pull request #669 from ROBOTIS-GIT/feature-easy-sdk-python-update
GyuH13 Nov 27, 2025
77a9e8e
dxl easy sdk support sbc
GyuH13 Dec 16, 2025
db84b49
add env variable
GyuH13 Dec 16, 2025
067853b
Makefile: Add support for dynamixel_easy_sdk and update install/unins…
GyuH13 Dec 16, 2025
3359728
Add additional include directory path
GyuH13 Dec 16, 2025
efe34c9
Makefile: Update C++ standard to C++17 for 32-bit and 64-bit builds
GyuH13 Dec 16, 2025
0a31f2c
Dynamixel Easy SDK supports Linux SBC environments, Linux 32-bit plat…
GyuH13 Dec 17, 2025
c539379
Fix email address for Hyungyu Kim in authors list
GyuH13 Dec 17, 2025
c1f5d8b
CMakeLists.txt:add include path
GyuH13 Dec 17, 2025
83600f0
support ros python
GyuH13 Dec 18, 2025
4ce0ef3
Merge pull request #672 from ROBOTIS-GIT/feature-support-easy-sdk-in-…
GyuH13 Jan 2, 2026
e340f30
update version in cpp library.properties
GyuH13 Jan 5, 2026
f03fbcf
Merge pull request #675 from ROBOTIS-GIT/feature-version-fix
GyuH13 Jan 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/ros-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: CI
# Specifies the events that trigger the workflow
on:
push:
branches: [ main, humble ]
branches: [ main, humble, jazzy ]
pull_request:
branches: [ main, humble ]
branches: [ main, humble, jazzy ]

# Defines a set of jobs to be run as part of the workflow
jobs:
Expand Down Expand Up @@ -49,6 +49,23 @@ jobs:
with:
required-ros-distributions: ${{ matrix.ros_distribution }}

- name: Check and Install ROS dependencies
shell: bash
run: |
set -e
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
echo "--- Updating rosdep definitions ---"
rosdep update
echo "--- Installing system dependencies for ROS 2 ${{ matrix.ros_distribution }} ---"
rosdep install --from-paths ros_ws/src --ignore-src -y -r --rosdistro ${{ matrix.ros_distribution }}
echo "--- Performing rosdep check for ROS 2 ${{ matrix.ros_distribution }} ---"
if rosdep check --from-paths ros_ws/src --ignore-src --rosdistro ${{ matrix.ros_distribution }}; then
echo "--- rosdep check passed ---"
else
echo "--- rosdep check failed: Missing system dependencies or unresolvable keys. ---"
exit 1
fi

- name: Build and Test
uses: ros-tooling/action-ros-ci@v0.3
with:
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "DynamixelSDK c++"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 3.8.4
PROJECT_NUMBER = 4.0.3

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
22 changes: 22 additions & 0 deletions ReleaseNote.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Dynamixel SDK Release Notes

4.0.3 (2025-12-17)
------------------
* Dynamixel Easy SDK supports Linux SBC environments, Linux 32-bit platforms, and ROS 2 based build and deployment workflows
* Contributors: Hyungyu Kim

4.0.2 (2025-11-24)
------------------
* Easy SDK Python update
* Added data types.hpp
* Added error handling for cases where operation fails due to incorrect torque state or operating mode.
* Contributors: Hyungyu Kim

4.0.1 (2025-11-05)
------------------
* Fix error that cache status is not updated
* Contributors: Hyungyu Kim

4.0.0 (2025-10-14)
------------------
* Update Dynamixel Easy SDK in C++ Linux 64bit
* Contributors: Hyungyu Kim

3.8.4 (2025-05-28)
------------------
* Deprecate ament_include_dependency usage in CMakeLists.txt
Expand Down
24 changes: 21 additions & 3 deletions c++/build/linux32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ SYMLINK = ln -s
MKDIR = mkdir
CC = gcc
CX = g++
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g
FORMAT = -m32
CONTROL_TABLE_PATH_FLAG = -DCONTROL_TABLE_PATH=\"$(INSTALL_ROOT)/share/dynamixel_sdk/control_table\"
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g $(CONTROL_TABLE_PATH_FLAG)
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g $(CONTROL_TABLE_PATH_FLAG)
FORMAT = -m32 -std=c++17
INCLUDES += -I$(DIR_DXL)/include/dynamixel_sdk
INCLUDES += -I$(DIR_DXL)/include

#---------------------------------------------------------------------
# Required external libraries
Expand All @@ -60,6 +62,11 @@ SOURCES = src/dynamixel_sdk/group_bulk_read.cpp \
src/dynamixel_sdk/protocol1_packet_handler.cpp \
src/dynamixel_sdk/protocol2_packet_handler.cpp \
src/dynamixel_sdk/port_handler_linux.cpp \
src/dynamixel_easy_sdk/connector.cpp \
src/dynamixel_easy_sdk/control_table.cpp \
src/dynamixel_easy_sdk/motor.cpp \
src/dynamixel_easy_sdk/dynamixel_error.cpp \
src/dynamixel_easy_sdk/group_executor.cpp


OBJECTS=$(addsuffix .o,$(addprefix $(DIR_OBJS)/,$(basename $(notdir $(SOURCES)))))
Expand Down Expand Up @@ -88,6 +95,12 @@ install: $(TARGET)
# copy the headers into the include directory
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/include/dynamixel_sdk || $(MKDIR) $(INSTALL_ROOT)/include/dynamixel_sdk
$(CP_ALL) $(DIR_DXL)/include/dynamixel_sdk/* $(INSTALL_ROOT)/include/dynamixel_sdk/
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/include/dynamixel_easy_sdk || $(MKDIR) $(INSTALL_ROOT)/include/dynamixel_easy_sdk
$(CP_ALL) $(DIR_DXL)/include/dynamixel_easy_sdk/* $(INSTALL_ROOT)/include/dynamixel_easy_sdk

# copy the control_table directory into the share directory
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/share/dynamixel_sdk || $(MKDIR) -p $(INSTALL_ROOT)/share/dynamixel_sdk
$(CP_ALL) $(DIR_DXL)/../control_table $(INSTALL_ROOT)/share/dynamixel_sdk/

$(LD_CONFIG)

Expand All @@ -99,6 +112,8 @@ uninstall:

$(RM) $(INSTALL_ROOT)/include/dynamixel_sdk/dynamixel_sdk.h
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_sdk/*
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_easy_sdk/*
$(RM_ALL) $(INSTALL_ROOT)/share/dynamixel_sdk/control_table

reinstall: uninstall install

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

$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_easy_sdk/%.cpp
$(CX) $(CXFLAGS) -c $? -o $@

#---------------------------------------------------------------------
# END OF MAKEFILE
#---------------------------------------------------------------------
25 changes: 22 additions & 3 deletions c++/build/linux64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ SYMLINK = ln -s
MKDIR = mkdir
CC = gcc
CX = g++
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g
FORMAT = -m64
CONTROL_TABLE_PATH_FLAG = -DCONTROL_TABLE_PATH=\"$(INSTALL_ROOT)/share/dynamixel_sdk/control_table\"
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g $(CONTROL_TABLE_PATH_FLAG)
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) $(FORMAT) -fPIC -g $(CONTROL_TABLE_PATH_FLAG)
FORMAT = -m64 -std=c++17
INCLUDES += -I$(DIR_DXL)/include/dynamixel_sdk
INCLUDES += -I$(DIR_DXL)/include

#---------------------------------------------------------------------
# Required external libraries
Expand All @@ -60,6 +62,11 @@ SOURCES = src/dynamixel_sdk/group_bulk_read.cpp \
src/dynamixel_sdk/protocol1_packet_handler.cpp \
src/dynamixel_sdk/protocol2_packet_handler.cpp \
src/dynamixel_sdk/port_handler_linux.cpp \
src/dynamixel_easy_sdk/connector.cpp \
src/dynamixel_easy_sdk/control_table.cpp \
src/dynamixel_easy_sdk/motor.cpp \
src/dynamixel_easy_sdk/dynamixel_error.cpp \
src/dynamixel_easy_sdk/group_executor.cpp


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

@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/include/dynamixel_easy_sdk || $(MKDIR) $(INSTALL_ROOT)/include/dynamixel_easy_sdk
$(CP_ALL) $(DIR_DXL)/include/dynamixel_easy_sdk/* $(INSTALL_ROOT)/include/dynamixel_easy_sdk

# copy the control_table directory into the share directory
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/share/dynamixel_sdk || $(MKDIR) -p $(INSTALL_ROOT)/share/dynamixel_sdk
$(CP_ALL) $(DIR_DXL)/../control_table $(INSTALL_ROOT)/share/dynamixel_sdk/

$(LD_CONFIG)

uninstall:
Expand All @@ -99,6 +113,8 @@ uninstall:

$(RM) $(INSTALL_ROOT)/include/dynamixel_sdk/dynamixel_sdk.h
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_sdk/*
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_easy_sdk/*
$(RM_ALL) $(INSTALL_ROOT)/share/dynamixel_sdk/control_table

reinstall: uninstall install

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

$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_easy_sdk/%.cpp
$(CX) $(CXFLAGS) -c $? -o $@

#---------------------------------------------------------------------
# END OF MAKEFILE
#---------------------------------------------------------------------
25 changes: 22 additions & 3 deletions c++/build/linux_sbc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ SYMLINK = ln -s
MKDIR = mkdir
CC = gcc
CX = g++
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) -fPIC -g
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) -fPIC -g
CONTROL_TABLE_PATH_FLAG = -DCONTROL_TABLE_PATH=\"$(INSTALL_ROOT)/share/dynamixel_sdk/control_table\"
CCFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) -fPIC -g $(CONTROL_TABLE_PATH_FLAG)
CXFLAGS = -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c $(INCLUDES) -fPIC -g $(CONTROL_TABLE_PATH_FLAG)
INCLUDES += -I$(DIR_DXL)/include/dynamixel_sdk
INCLUDES += -I$(DIR_DXL)/include

#---------------------------------------------------------------------
# Required external libraries
Expand All @@ -59,6 +61,11 @@ SOURCES = src/dynamixel_sdk/group_bulk_read.cpp \
src/dynamixel_sdk/protocol1_packet_handler.cpp \
src/dynamixel_sdk/protocol2_packet_handler.cpp \
src/dynamixel_sdk/port_handler_linux.cpp \
src/dynamixel_easy_sdk/connector.cpp \
src/dynamixel_easy_sdk/control_table.cpp \
src/dynamixel_easy_sdk/motor.cpp \
src/dynamixel_easy_sdk/dynamixel_error.cpp \
src/dynamixel_easy_sdk/group_executor.cpp


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

# copy the headers into the include directory
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/include/dynamixel_sdk || $(MKDIR) $(INSTALL_ROOT)/include/dynamixel_sdk
$(CP_ALL) $(DIR_DXL)/include/dynamixel_sdk/* $(INSTALL_ROOT)/include/dynamixel_sdk/
$(CP_ALL) $(DIR_DXL)/include/dynamixel_sdk/* $(INSTALL_ROOT)/include/dynamixel_sdk

@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/include/dynamixel_easy_sdk || $(MKDIR) $(INSTALL_ROOT)/include/dynamixel_easy_sdk
$(CP_ALL) $(DIR_DXL)/include/dynamixel_easy_sdk/* $(INSTALL_ROOT)/include/dynamixel_easy_sdk

# copy the control_table directory into the share directory
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/share/dynamixel_sdk || $(MKDIR) -p $(INSTALL_ROOT)/share/dynamixel_sdk
$(CP_ALL) $(DIR_DXL)/../control_table $(INSTALL_ROOT)/share/dynamixel_sdk/

$(LD_CONFIG)

Expand All @@ -98,6 +112,8 @@ uninstall:

$(RM) $(INSTALL_ROOT)/include/dynamixel_sdk/dynamixel_sdk.h
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_sdk/*
$(RM_ALL) $(INSTALL_ROOT)/include/dynamixel_easy_sdk/*
$(RM_ALL) $(INSTALL_ROOT)/share/dynamixel_sdk/control_table

reinstall: uninstall install

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

$(DIR_OBJS)/%.o: $(DIR_DXL)/src/dynamixel_easy_sdk/%.cpp
$(CX) $(CXFLAGS) -c $? -o $@

#---------------------------------------------------------------------
# END OF MAKEFILE
#---------------------------------------------------------------------
63 changes: 63 additions & 0 deletions c++/include/dynamixel_easy_sdk/connector.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Copyright 2025 ROBOTIS CO., LTD.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Hyungyu Kim

#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_EASY_SDK_CONNECTOR_HPP_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_EASY_SDK_CONNECTOR_HPP_

#include <memory>
#include <string>
#include <vector>

#include "dynamixel_sdk/dynamixel_sdk.h"
#include "dynamixel_easy_sdk/dynamixel_error.hpp"
#include "dynamixel_easy_sdk/motor.hpp"
#include "dynamixel_easy_sdk/group_executor.hpp"

namespace dynamixel
{
class Connector
{
public:
Connector(const std::string & port_name, int baud_rate);

virtual ~Connector();

std::unique_ptr<Motor> createMotor(uint8_t id);
std::vector<std::unique_ptr<Motor>> createAllMotors(int start_id = 0, int end_id = 252);
std::unique_ptr<GroupExecutor> createGroupExecutor();

Result<void, DxlError> write1ByteData(uint8_t id, uint16_t address, uint8_t value);
Result<void, DxlError> write2ByteData(uint8_t id, uint16_t address, uint16_t value);
Result<void, DxlError> write4ByteData(uint8_t id, uint16_t address, uint32_t value);
Result<uint8_t, DxlError> read1ByteData(uint8_t id, uint16_t address);
Result<uint16_t, DxlError> read2ByteData(uint8_t id, uint16_t address);
Result<uint32_t, DxlError> read4ByteData(uint8_t id, uint16_t address);

Result<void, DxlError> reboot(uint8_t id);
Result<uint16_t, DxlError> ping(uint8_t id);
Result<std::vector<uint8_t>, DxlError> broadcastPing();
Result<void, DxlError> factoryReset(uint8_t id, uint8_t option);
void closePort() {port_handler_->closePort();}

PortHandler * getPortHandler() const {return port_handler_.get();}
PacketHandler * getPacketHandler() const {return packet_handler_;}

private:
std::unique_ptr<PortHandler> port_handler_;
PacketHandler * packet_handler_;
};
} // namespace dynamixel
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_EASY_SDK_CONNECTOR_HPP_ */
40 changes: 40 additions & 0 deletions c++/include/dynamixel_easy_sdk/control_table.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright 2025 ROBOTIS CO., LTD.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: Hyungyu Kim

#ifndef DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_EASY_SDK_CONTROL_TABLE_HPP_
#define DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_EASY_SDK_CONTROL_TABLE_HPP_

#include <cstdint>
#include <fstream>
#include <iostream>
#include <map>
#include <sstream>
#include <string>

#include "dynamixel_easy_sdk/data_types.hpp"
#include "dynamixel_easy_sdk/dynamixel_error.hpp"

namespace dynamixel
{
class ControlTable
{
public:
static const std::map<uint16_t, std::string> ParsingModelList();
static const std::string getModelName(uint16_t model_number);
static const std::map<std::string, ControlTableItem> & getControlTable(uint16_t model_number);
};
} // namespace dynamixel
#endif /* DYNAMIXEL_SDK_INCLUDE_DYNAMIXEL_EASY_SDK_CONTROL_TABLE_HPP_ */
Loading