feat: add the LiteGrip C++ SDK - #5
Merged
Merged
Conversation
added 2 commits
September 28, 2026 16:17
Add the ROS-agnostic C++ SDK for the LiteGrip adaptive two-finger gripper: the SocketCAN transport, the Damiao DM4310 MIT protocol codec, GripperBus, the LiteGrip high-level API, the SafetyGuard red-line gate, the calibration and json layer, and the 200 Hz ControlLoop. The library is C++17 with no third-party dependencies beyond the stdlib, pthread and the Linux SocketCAN headers. It installs both into a ROS workspace (plain-cmake package.xml) and into a normal prefix (find_package + pkg-config), so ros2_control can link it without ament. Replace the placeholder README with the SDK's own documentation and add its Chinese translation. Update the CI gate to build and run the real toolchain instead of the documentation-only placeholder, as the workflow instructed once source landed. The suite needs no hardware: the transport test is deliberately non-transmitting, and the rest cover behaviour that must hold while disconnected.
test_calibration wrote its fixtures with std::fopen, which creates the file but not its parent directory. The suite therefore passed only where an earlier run had already left /tmp/litegrip_calib_test behind, and failed with "FAIL: write fixture" on a fresh checkout. CI caught it. Create the directory in main, as test_safety already does, and build the fixture paths from that one constant. No library code changes.
|
🎉 This PR is included in version 0.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
Lands the LiteGrip C++ SDK source: until now this repository held only the
bootstrapped standards. This is layer 1 of the litegrip stack — the
ROS-agnostic library that
litegrip_ros2_controllinks, and the layerlitegrip_moveit_configsits above.The suite starts running on every pull request from here on. Merging publishes
as a minor (
v0.0.0->v0.1.0). Nothing consumes this repository yet, so noexisting consumer breaks.
Changes
GripperBus, theLiteGriphigh-level API, theSafetyGuardred-line gate, the calibration and json layer, and the 200 HzControlLoop.test/generate_golden.py).find_package(litegrip_cpp)plus pkg-config, and a plain-cmakepackage.xmlso a ROS workspace builds it without ament.calibration/, which the read-only fallback inload_calibration()needs..github/workflows/ci.ymlto configure, build and test the real toolchain in place of the documentation-only placeholder, as the workflow instructed once source landed.Testing
Fresh out-of-tree Release build, exactly as CI runs it:
Result: 12/12 tests pass, 0 failures, 2.60 s.
Repository lint, under the committed
.markdownlint.json:Result: 0 issues in 2 files.
No hardware or CAN interface is required:
test_transportis deliberatelynon-transmitting, and the remaining tests cover behaviour that must hold while
disconnected. Motion, calibration and the transport send/receive path still
need the real device and are not covered here.
Issues
No tracking issue — the repository has none open. Nothing is closed by this
pull request.