Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
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 = 4.0.4
PROJECT_NUMBER = 5.0.0

# 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
9 changes: 9 additions & 0 deletions ReleaseNote.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Dynamixel SDK Release Notes

5.0.0 (2026-04-09)
------------------
* Updated the standalone C++ SDK and ROS 2 C++ wrappers to use safer dynamic storage for group and packet buffers
* Bumped the C++ shared library ABI to SOVERSION 3 due to public C++ class layout changes
* Added VERSION 5.0.0 and SOVERSION 3 to the ROS 2 shared library target for consistent ABI versioning
* Changed the C++ uninstall step to remove SDK-owned install paths by name instead of relying on the install manifest
* Unified package versioning to 5.0.0 across C, C++, Python, and ROS 2 packaging metadata
* Contributors: Hyungyu Kim

4.0.4 (2026-03-27)
------------------
* Added CMakeLists.txt for unified build system in c, c++
Expand Down
17 changes: 14 additions & 3 deletions c++/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.10)

# Standalone C++ SDK: configure/build from the c++/ directory (paths below are relative to c++/).
project(dynamixel_sdk VERSION 4.0.4 LANGUAGES CXX)
project(dynamixel_sdk VERSION 5.0.0 LANGUAGES CXX)

set(_dxl_pkg "dynamixel_sdk")

Expand Down Expand Up @@ -73,7 +73,7 @@ target_include_directories(dynamixel_sdk PRIVATE

set_target_properties(dynamixel_sdk PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION 2
SOVERSION 3
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
OUTPUT_NAME "dxl_cpp"
Expand Down Expand Up @@ -161,10 +161,21 @@ endif()
# --------------------------------------------------------
# 4. Uninstall / Reinstall Targets
# --------------------------------------------------------
if(UNIX AND NOT APPLE)
set(DXL_UNINSTALL_EASY_SDK 1)
else()
set(DXL_UNINSTALL_EASY_SDK 0)
endif()
if(WIN32)
set(DXL_UNINSTALL_WIN32 1)
else()
set(DXL_UNINSTALL_WIN32 0)
endif()

configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY
@ONLY
)

if(NOT TARGET uninstall)
Expand Down
2 changes: 1 addition & 1 deletion c++/build/linux32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DIR_OBJS = ./.objects

INSTALL_ROOT = /usr/local

MAJ_VERSION = 2
MAJ_VERSION = 3
MIN_VERSION = 0
REV_VERSION = 0

Expand Down
2 changes: 1 addition & 1 deletion c++/build/linux64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DIR_OBJS = ./.objects

INSTALL_ROOT = /usr/local

MAJ_VERSION = 2
MAJ_VERSION = 3
MIN_VERSION = 0
REV_VERSION = 0

Expand Down
2 changes: 1 addition & 1 deletion c++/build/linux_sbc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DIR_OBJS = ./.objects

INSTALL_ROOT = /usr/local

MAJ_VERSION = 2
MAJ_VERSION = 3
MIN_VERSION = 0
REV_VERSION = 0

Expand Down
2 changes: 1 addition & 1 deletion c++/build/mac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DIR_OBJS = ./.objects

INSTALL_ROOT = /usr/local

MAJ_VERSION = 2
MAJ_VERSION = 3
MIN_VERSION = 0
REV_VERSION = 0

Expand Down
93 changes: 48 additions & 45 deletions c++/cmake/cmake_uninstall.cmake.in
Original file line number Diff line number Diff line change
@@ -1,53 +1,56 @@
# Uninstall files listed in install_manifest.txt (created by cmake --install).
# Configured from cmake_uninstall.cmake.in via configure_file(... IMMEDIATE @ONLY).

if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR
"Cannot find @CMAKE_BINARY_DIR@/install_manifest.txt\n"
"Run: cmake --install <build-dir> (or make install) at least once so the manifest exists."
)
endif()
# Name-based uninstall for Dynamixel SDK (C++), under CMAKE_INSTALL_PREFIX.
# Removes the same layout as install(): headers, libdxl_cpp.*, CMake package config,
# share/dynamixel_sdk (incl. control_table), and dynamixel_easy_sdk headers on Linux.

file(STRINGS "@CMAKE_BINARY_DIR@/install_manifest.txt" _dxl_installed_files)
set(_dxl_prefix "@CMAKE_INSTALL_PREFIX@")
string(REGEX REPLACE "/+$" "" _dxl_prefix "${_dxl_prefix}")

foreach(_dxl_file IN LISTS _dxl_installed_files)
string(STRIP "${_dxl_file}" _dxl_file)
if(_dxl_file STREQUAL "")
continue()
endif()
message(STATUS "Uninstalling: ${_dxl_file}")
# EXISTS is false for broken symlinks, so also check IS_SYMLINK.
if(EXISTS "${_dxl_file}" OR IS_SYMLINK "${_dxl_file}")
file(REMOVE "${_dxl_file}")
endif()
endforeach()

# Remove installed directories (manifest only removes files).
# Derive prefix from install_manifest.txt paths so --prefix overrides work.
set(_dxl_prefix "")
foreach(_dxl_file IN LISTS _dxl_installed_files)
string(STRIP "${_dxl_file}" _dxl_file_stripped)
if(_dxl_file_stripped STREQUAL "")
continue()
endif()
set(_dxl_inc "@CMAKE_INSTALL_INCLUDEDIR@")
set(_dxl_lib "@CMAKE_INSTALL_LIBDIR@")
set(_dxl_share "@CMAKE_INSTALL_DATAROOTDIR@")
set(_dxl_bin "@CMAKE_INSTALL_BINDIR@")

# Example:
# ${prefix}/include/dynamixel_sdk/dynamixel_sdk.h
if(_dxl_file_stripped MATCHES "^(.*)/@CMAKE_INSTALL_INCLUDEDIR@/dynamixel_sdk/.*$")
set(_dxl_prefix "${CMAKE_MATCH_1}")
break()
endif()
endforeach()
message(STATUS "Dynamixel SDK (C++) uninstall from prefix: ${_dxl_prefix}")

if(NOT _dxl_prefix STREQUAL "")
file(REMOVE_RECURSE "${_dxl_prefix}/@CMAKE_INSTALL_INCLUDEDIR@/dynamixel_sdk")
if(NOT APPLE)
file(REMOVE_RECURSE "${_dxl_prefix}/@CMAKE_INSTALL_INCLUDEDIR@/dynamixel_easy_sdk")
macro(_dxl_remove_tree _path)
if(EXISTS "${_path}")
file(REMOVE_RECURSE "${_path}")
message(STATUS "Removed ${_path}")
endif()
endmacro()

if(NOT APPLE)
file(REMOVE_RECURSE "${_dxl_prefix}/@CMAKE_INSTALL_DATAROOTDIR@/dynamixel_sdk/control_table")
endif()
# Headers: dynamixel_sdk (all platforms)
_dxl_remove_tree("${_dxl_prefix}/${_dxl_inc}/dynamixel_sdk")

# dynamixel_easy_sdk: same condition as install() (Linux, not Apple)
if(@DXL_UNINSTALL_EASY_SDK@)
_dxl_remove_tree("${_dxl_prefix}/${_dxl_inc}/dynamixel_easy_sdk")
endif()

file(REMOVE_RECURSE "${_dxl_prefix}/@CMAKE_INSTALL_LIBDIR@/cmake/dynamixel_sdk")
# Shared library / import lib
if(@DXL_UNINSTALL_WIN32@)
file(GLOB _dxl_dlls LIST_DIRECTORIES false "${_dxl_prefix}/${_dxl_bin}/dxl_cpp.dll")
foreach(_f IN LISTS _dxl_dlls)
message(STATUS "Uninstalling: ${_f}")
file(REMOVE "${_f}")
endforeach()
foreach(_name "dxl_cpp.lib" "dxl_cpp.exp")
set(_f "${_dxl_prefix}/${_dxl_lib}/${_name}")
if(EXISTS "${_f}")
message(STATUS "Uninstalling: ${_f}")
file(REMOVE "${_f}")
endif()
endforeach()
else()
file(GLOB _dxl_libs LIST_DIRECTORIES false "${_dxl_prefix}/${_dxl_lib}/libdxl_cpp.*")
foreach(_f IN LISTS _dxl_libs)
message(STATUS "Uninstalling: ${_f}")
file(REMOVE "${_f}")
endforeach()
endif()

# CMake package files
_dxl_remove_tree("${_dxl_prefix}/${_dxl_lib}/cmake/dynamixel_sdk")

# share (e.g. control_table)
_dxl_remove_tree("${_dxl_prefix}/${_dxl_share}/dynamixel_sdk")
4 changes: 2 additions & 2 deletions c++/include/dynamixel_sdk/group_bulk_read.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class WINDECLSPEC GroupBulkRead : public GroupHandler
protected:
std::map<uint8_t, uint16_t> address_list_; // <id, start_address>
std::map<uint8_t, uint16_t> length_list_; // <id, data_length>
std::map<uint8_t, uint8_t *> error_list_; // <id, error>
std::map<uint8_t, std::vector<uint8_t>> error_list_; // <id, error>

bool last_result_;

Expand Down Expand Up @@ -135,7 +135,7 @@ class WINDECLSPEC GroupBulkRead : public GroupHandler
/// @error error of Dynamixel
/// @return true
/// @return when Dynamixel returned specific error byte
/// @return or false
/// @return or false
////////////////////////////////////////////////////////////////////////////////
bool getError (uint8_t id, uint8_t* error);
};
Expand Down
1 change: 1 addition & 0 deletions c++/include/dynamixel_sdk/group_fast_bulk_read.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class WINDECLSPEC GroupFastBulkRead : public GroupBulkRead

private:
void makeParam();
std::vector<uint8_t> rxpacket_;
};

}
Expand Down
3 changes: 3 additions & 0 deletions c++/include/dynamixel_sdk/group_fast_sync_read.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class WINDECLSPEC GroupFastSyncRead : public GroupSyncRead
int txPacket();
int rxPacket();
int txRxPacket();

private:
std::vector<uint8_t> rxpacket_;
};

}
Expand Down
4 changes: 2 additions & 2 deletions c++/include/dynamixel_sdk/group_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ class WINDECLSPEC GroupHandler
PacketHandler *ph_;

std::vector<uint8_t> id_list_;
std::map<uint8_t, uint8_t *> data_list_; // <id, data>
std::map<uint8_t, std::vector<uint8_t>> data_list_; // <id, data>

bool is_param_changed_;

uint8_t *param_;
std::vector<uint8_t> param_;
};

}
Expand Down
4 changes: 2 additions & 2 deletions c++/include/dynamixel_sdk/group_sync_read.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace dynamixel
class WINDECLSPEC GroupSyncRead : public GroupHandler
{
protected:
std::map<uint8_t, uint8_t *> error_list_; // <id, error>
std::map<uint8_t, std::vector<uint8_t>> error_list_; // <id, error>

bool last_result_;

Expand Down Expand Up @@ -140,7 +140,7 @@ class WINDECLSPEC GroupSyncRead : public GroupHandler
/// @error error of Dynamixel
/// @return true
/// @return when Dynamixel returned specific error byte
/// @return or false
/// @return or false
////////////////////////////////////////////////////////////////////////////////
bool getError (uint8_t id, uint8_t* error);
};
Expand Down
12 changes: 6 additions & 6 deletions c++/include/dynamixel_sdk/packet_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
#define MAX_ID 0xFC // 252

/* Macro for Control Table Value */
#define DXL_MAKEWORD(a, b) ((uint16_t)(((uint8_t)(((uint64_t)(a)) & 0xff)) | ((uint16_t)((uint8_t)(((uint64_t)(b)) & 0xff))) << 8))
#define DXL_MAKEDWORD(a, b) ((uint32_t)(((uint16_t)(((uint64_t)(a)) & 0xffff)) | ((uint32_t)((uint16_t)(((uint64_t)(b)) & 0xffff))) << 16))
#define DXL_LOWORD(l) ((uint16_t)(((uint64_t)(l)) & 0xffff))
#define DXL_HIWORD(l) ((uint16_t)((((uint64_t)(l)) >> 16) & 0xffff))
#define DXL_LOBYTE(w) ((uint8_t)(((uint64_t)(w)) & 0xff))
#define DXL_HIBYTE(w) ((uint8_t)((((uint64_t)(w)) >> 8) & 0xff))
#define DXL_MAKEWORD(a, b) (static_cast<uint16_t>((static_cast<uint8_t>(static_cast<uint64_t>(a) & 0xff)) | (static_cast<uint16_t>(static_cast<uint8_t>(static_cast<uint64_t>(b) & 0xff))) << 8))
#define DXL_MAKEDWORD(a, b) (static_cast<uint32_t>((static_cast<uint16_t>(static_cast<uint64_t>(a) & 0xffff)) | (static_cast<uint32_t>(static_cast<uint16_t>(static_cast<uint64_t>(b) & 0xffff))) << 16))
#define DXL_LOWORD(l) (static_cast<uint16_t>(static_cast<uint64_t>(l) & 0xffff))
#define DXL_HIWORD(l) (static_cast<uint16_t>((static_cast<uint64_t>(l) >> 16) & 0xffff))
#define DXL_LOBYTE(w) (static_cast<uint8_t>(static_cast<uint64_t>(w) & 0xff))
#define DXL_HIBYTE(w) (static_cast<uint8_t>((static_cast<uint64_t>(w) >> 8) & 0xff))

/* Instruction for DXL Protocol */
#define INST_PING 1
Expand Down
2 changes: 1 addition & 1 deletion c++/library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=DynamixelSDK
version=4.0.4
version=5.0.0
author=ROBOTIS
maintainer=ROBOTIS
sentence=DynamixelSDK for Arduino
Expand Down
Loading
Loading