Conversation
…ng with the new release. Enhancements include safer dynamic storage in C++ SDK and unified versioning.
…install targets for clarity.
….0 and SOVERSION 3 for ROS 2 shared library, and updated uninstall process to remove SDK-owned paths by name.
…local buffers, replacing them with stack-allocated vectors for improved memory management and performance.
Contributor
There was a problem hiding this comment.
Code Review
This pull request upgrades the Dynamixel SDK to version 5.0.0, transitioning from manual memory management to std::vector for group and packet buffers in both the standalone C++ SDK and ROS 2 wrappers. The update also includes modernizing casts to static_cast, replacing bzero with memset, and refactoring the CMake uninstall logic. Review feedback focuses on enhancing robustness by using std::vector::size() instead of manual length calculations during packet transmission, which prevents potential buffer over-reads if parameter population is incomplete.
…r for improved input handling.
…ite classes to prevent transmission errors. Return COMM_TX_ERROR for invalid parameter sizes before executing write operations.
…lecting the new release. Changes include enhancements in the C++ SDK and consistent versioning across C, C++, Python, and ROS 2 packages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the C++ SDK and ROS 2 C++ wrapper internals to use RAII-based buffer management instead of manual
new[]/delete[]andmalloc/free. Dynamic packet, group read/write, and error buffers are migrated tostd::vector<uint8_t>, reducing manual memory handling and making ownership clearer across the packet handlers, group handlers, and fast read paths.In addition, the PR updates package and library versioning for the 5.0.0 release. The standalone C++ library and ROS 2 shared library now declare VERSION 5.0.0 and SOVERSION 3 to reflect the C++ ABI change caused by public class layout updates. Related version metadata was also aligned across C, C++, Python, documentation, Arduino metadata, and ROS package manifests/changelogs.
The PR also revises the standalone C++ uninstall flow. Instead of relying on install_manifest.txt, the uninstall script now removes SDK-owned install paths by name under the configured install prefix, including headers, libraries, CMake package files, and shared data such as the control table.