### Run Python Examples Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/linux/aarch64/python/demo/README.md Check that the omnihand package is installed and run example scripts for each hand model. Use the appropriate script path for your device. ```bash # Make sure omnihand package is installed pip list | findstr omnihand # Run examples python omnihand_2025\demo_get_hardware_info.py python omnihand_pro_2025\demo_get_hardware_info.py python omnihand_3_lite\demo_get_hardware_info.py python omnihand_dex_umi\demo_get_hardware_info.py ``` -------------------------------- ### Install SDK on Linux Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/QUICK_START.md Run the install script and configure USB permissions on Linux. The udev setup is required only once for both CANFD adapters and RS485 serial ports; log out and back in after running it. ```bash cd linux/x64 ./install.sh # Configure USB permissions (first time only, required for both CANFD adapters and RS485 serial ports) sudo ./setup_udev.sh # Then log out and log back in ``` -------------------------------- ### Configure USB Permissions (Linux) Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/TROUBLESHOOTING.md Run the udev setup script, then log out and back in (required). Verify permissions on /dev/ttyACM0 show rw-rw-rw-. ```bash # Run setup script sudo ./setup_udev.sh # Log out and log back in (required!) # Verify permissions ls -la /dev/ttyACM0 # Should show rw-rw-rw- ``` -------------------------------- ### Install Test Dependencies (Bash) Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/TROUBLESHOOTING.md Install pytest and numpy for running tests. ```bash pip install pytest numpy ``` -------------------------------- ### Complete Example Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_CPP_O10.md A complete example demonstrating how to create an OmniHand 2025 instance, initialize it, retrieve vendor information, set joint angles, and get tactile sensor data. ```APIDOC ## Complete Example ### Description A complete example demonstrating how to create an OmniHand 2025 instance, initialize it, retrieve vendor information, set joint angles, and get tactile sensor data. ### Code ```cpp #include "omnihand/omnihand_2025.h" #include int main() { // Create hand instance auto hand = OmniHand2025::createHandByZlgcan( HandType::LEFT, 1, // hand_device_id 0, // canfd_device_id 0 // canfd_channel_id ); if (!hand || !hand->Init()) { std::cerr << "Failed to initialize OmniHand 2025" << std::endl; return -1; } // Get vendor information auto vendor = hand->GetVendorInfo(); std::cout << vendor.toString() << std::endl; // Set joint angles std::vector angles{0.0, 0.0, 0.5, 0.0, 0.8, 0.8, 0.0, 0.8, 0.0, 0.8}; // 10 joint angles (in radians) hand->SetAllActiveJointAngles(angles); std::cout << "Set joint angles: "; for (size_t i = 0; i < angles.size(); ++i) { std::cout << angles[i]; if (i < angles.size() - 1) std::cout << ", "; } std::cout << " (rad)" << std::endl; // Get tactile sensor data auto thumb_data = hand->GetTactileSensorData(Finger::THUMB); std::cout << "Thumb sensor data: " << thumb_data.size() << " points" << std::endl; return 0; } ``` ``` -------------------------------- ### Run setup_socketcan.sh helper script Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/SOCKETCAN_SETUP.md The bundled helper `setup_socketcan.sh` enumerates every `canN` under `/sys/class/net/` and applies the three `ip link` commands for each. Run once after driver install or whenever the interface is re-created. Use `--dry-run` to preview without changes. ```bash sudo ./setup_socketcan.sh # every canN on the system ``` ```bash sudo ./setup_socketcan.sh can0 can3 # only the listed interfaces ``` ```bash ./setup_socketcan.sh --dry-run # preview, no changes ``` -------------------------------- ### Install SDK on Windows Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/QUICK_START.md Run the install batch file as Administrator on Windows. ```cmd cd windows\x64 install.bat ``` -------------------------------- ### Fix Permission Denied (Linux) Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/TROUBLESHOOTING.md Run the udev setup script and manually add the user to dialout and plugdev groups. Log out and back in, then verify group membership includes both groups. ```bash # Run udev setup sudo ./setup_udev.sh # Manually add user to groups sudo usermod -aG dialout $USER sudo usermod -aG plugdev $USER # Log out and log back in # Verify group membership groups # Should include 'dialout' and 'plugdev' ``` -------------------------------- ### Complete usage example Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_KINEMATICS_PYTHON_O10.md Example demonstrating how to create a solver for a right hand, enable logging, set a gesture, convert joint angles to actuator input, and get all joint angles. ```python from omnihand.omnihand_2025 import OmniHand2025Solver # Create solver for right hand solver = OmniHand2025Solver(hand_type=False) # Enable logging solver.show_log(True) # Set a gesture from omnihand import OmniHand2025Gesture actuator_input = solver.set_hand_gesture(OmniHand2025Gesture.OMNIHAND_2025_GESTURE_FIST1) # Convert joint positions to actuator input active_joint_angles = [0.5, -0.3, 0.6, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 1.0] input_values = solver.active_joint_angles_to_actuator_input(active_joint_angles) # Get all joint positions (including passive joints) all_joints = solver.get_all_joint_angles(active_joint_angles) ``` -------------------------------- ### Directory Structure of x64 Installation Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/windows/x64/README.md Shows the layout of the x64 directory after installation, including C++ and Python components, demos, tests, and scripts. ```text x64/ ├── cpp/ │ ├── share/cmake/omnihand/ # CMake config │ ├── include/omnihand/ # Header files │ ├── lib/ # C++ libraries │ ├── demo/ # C++ demo source code (not installed) │ ├── test/ # C++ test source code (not installed) │ └── bin/omnihand/ │ ├── demo/ # Demo executables │ └── test/ # Test executables ├── python/ │ ├── *.whl # Python wheel │ ├── demo/ # Python demos (not installed) │ └── test/ # Python tests (not installed) ├── install.bat # Install script ├── uninstall.bat # Uninstall script ├── README.md # This file (English) └── README_zh_cn.md # Chinese documentation ``` -------------------------------- ### Complete example: initialize hand, get vendor info, set joint angles, get tactile data Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_CPP_O10.md Complete example that creates an OmniHand2025 instance via createHandByZlgcan, initializes it, retrieves vendor information, sets 10 joint angles, and reads tactile sensor data for the thumb. Prints failure message and returns -1 if initialization fails. ```cpp #include "omnihand/omnihand_2025.h" #include int main() { // Create hand instance auto hand = OmniHand2025::createHandByZlgcan( HandType::LEFT, 1, // hand_device_id 0, // canfd_device_id 0 // canfd_channel_id ); if (!hand || !hand->Init()) { std::cerr << "Failed to initialize OmniHand 2025" << std::endl; return -1; } // Get vendor information auto vendor = hand->GetVendorInfo(); std::cout << vendor.toString() << std::endl; // Set joint angles std::vector angles{0.0, 0.0, 0.5, 0.0, 0.8, 0.8, 0.0, 0.8, 0.0, 0.8}; // 10 joint angles (in radians) hand->SetAllActiveJointAngles(angles); std::cout << "Set joint angles: "; for (size_t i = 0; i < angles.size(); ++i) { std::cout << angles[i]; if (i < angles.size() - 1) std::cout << ", "; } std::cout << " (rad)" << std::endl; // Get tactile sensor data auto thumb_data = hand->GetTactileSensorData(Finger::THUMB); std::cout << "Thumb sensor data: " << thumb_data.size() << " points" << std::endl; return 0; } ``` -------------------------------- ### Install SDK and configure USB permissions Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/linux/aarch64/README.md Run install.sh to install the SDK, then run setup_udev.sh with sudo to configure USB permissions (first time only, then log out/in). ```bash ./install.sh # Install SDK sudo ./setup_udev.sh # Configure USB permissions (first time only, then log out/in) ``` -------------------------------- ### Complete Usage Example for OmniHand2025Solver Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_KINEMATICS_CPP_O10.md Example demonstrating how to create a solver for the right hand, enable logging, set a gesture, convert joint positions to actuator input, and get all joint angles. ```cpp #include "kinematics/omnihand_2025/omnihand_2025_solver.h" // Create solver for right hand agilink::omnihand::omnihand::o10::OmniHand2025Solver solver(false); // Enable logging solver.show_log(true); // Set a gesture std::vector actuator_input = solver.SetHandGesture( o10::OmniHand2025Gesture::OMNIHAND_2025_GESTURE_FIST1); // Convert joint positions to actuator input std::vector active_joint_angles = {0.5, -0.3, 0.6, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 1.0}; std::vector input = solver.ActiveJointPos2ActuatorInput(active_joint_angles); // Get all joint positions (including passive joints) std::vector all_joints = solver.GetAllJointAngles(active_joint_angles); ``` -------------------------------- ### Install SDK on Windows (x64) - install.bat Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/windows/x64/README.md Run as Administrator to install the AGILINK OmniHand SDK on Windows x64. This script sets up the necessary libraries, headers, and executables. ```batch install.bat ``` -------------------------------- ### Verify Python SDK Installation Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/QUICK_START.md Check that the Python SDK is installed correctly by importing the OmniHand2025 class and printing a success message. ```bash python3 -c "from omnihand import OmniHand2025; print('SDK installed successfully!')" ``` -------------------------------- ### Complete Example: Initialize and Control OmniHand 3 Lite Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_PYTHON_H3L.md Shows the full workflow: create a hand instance via ZLG CAN FD, initialize, get vendor info, set a predefined gesture, set joint positions, and read temperatures. Requires the omnihand package and a connected device. ```python from omnihand import OmniHand3Lite, HandType # Create hand instance hand = OmniHand3Lite.create_hand_by_zlgcan( hand_type=HandType.LEFT, hand_device_id=1, canfd_device_id=0, canfd_channel_id=0 ) if not hand.init(): print("Failed to initialize OmniHand 3 Lite") exit(1) # Get vendor information vendor = hand.get_vendor_info() print(vendor) # Set a predefined gesture from omnihand import OmniHand3LiteGesture hand.set_hand_gesture(OmniHand3LiteGesture.OMNI_HAND_3_LITE_GESTURE_FIST) # Set motor positions (4 joints, 0-4096) positions = [2048, 2048, 2048, 2048] echo = hand.set_all_joint_positions(positions) print(f"Motor positions: {echo}") # Get temperature temps = hand.get_all_temperature_reports() print(f"Temperature: {temps}") ``` -------------------------------- ### Continuous CSP Control Usage Example Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_CPP_H3UM.md Example of starting CSP, updating targets, and stopping. Callers only update changed targets through SetCspTarget. ```cpp if (hand->StartCsp(1000.0)) { hand->SetCspTarget(target_positions); // ...update the target as needed... hand->StopCsp(); } ``` -------------------------------- ### Complete Example: Initialize OmniHand Pro 2025 and Read Sensor Data Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_CPP_O12.md Shows full usage: create hand via ZLGCAN, initialize, get vendor info, set 12 joint angles, and read 3D tactile sensor data. Requires the omnihand_pro_2025.h header. ```cpp #include "omnihand/omnihand_pro_2025.h" #include int main() { // Create hand instance auto hand = OmniHandPro2025::createHandByZlgcan( HandType::LEFT, 1, // hand_device_id 0, // canfd_device_id 0 // canfd_channel_id ); if (!hand || !hand->Init()) { std::cerr << "Failed to initialize OmniHand Pro 2025" << std::endl; return -1; } // Get vendor information auto vendor = hand->GetVendorInfo(); std::cout << vendor.toString() << std::endl; // Set joint angles std::vector angles{0.3, -0.5, -0.3, -0.5, 0.0, 0.6, 0.7, 0.0, 0.6, 0.7, 0.7, 0.7}; // 12 joint angles (in radians) hand->SetAllActiveJointAngles(angles); std::cout << "Set joint angles: "; for (size_t i = 0; i < angles.size(); ++i) { std::cout << angles[i]; if (i < angles.size() - 1) std::cout << ", "; } std::cout << " (rad)" << std::endl; // Get 3D tactile sensor data auto thumb_data = hand->GetTactileSensor3DData(Finger::THUMB); std::cout << "Thumb normal force: " << thumb_data.normal_force << " (0.1N)" << std::endl; return 0; } ``` -------------------------------- ### Launch H3L node with omnihand_3_lite_node.launch.py Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_ROS2_H3L.md Starts the H3L node using the provided launch file. Run this before executing any of the example scripts or CLI commands. ```bash ros2 launch omnihand_node omnihand_3_lite_node.launch.py ``` -------------------------------- ### Install and run Python WebSocket client demo Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_SERVER_WS.md Install the omnihand client package and run the demo WebSocket client. Use the -d flag to select the device type: zlgcan for ZLG CAN, or rs485 with --uart-port for RS485. The example shows both zlgcan and rs485 variants. ```bash pip install "omnihand[client]" python python/demo/server/demo_ws_client.py --host 127.0.0.1 --port 8000 -d zlgcan # rs485 / usb: python python/demo/server/demo_ws_client.py --host 127.0.0.1 --port 8000 -d rs485 --uart-port /dev/ttyUSB0 ``` -------------------------------- ### Verify C++ SDK Installation Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/QUICK_START.md Run the C++ test executable with a gtest filter to verify the SDK installation on Linux. ```bash # Run test (Linux) ./cpp/bin/omnihand/test/test_omnihand_2025 --gtest_filter=*CreateHand* ``` -------------------------------- ### Complete example: initialize hand, set angles, get tactile data Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_PYTHON_O12.md Demonstrates creating an OmniHandPro2025 instance via ZLG CAN FD, initializing, retrieving vendor info, setting joint angles, and reading 3D tactile sensor data. Requires the `omnihand` package and a connected device. ```python from omnihand import OmniHandPro2025, HandType, Finger # Create hand instance hand = OmniHandPro2025.create_hand_by_zlgcan( hand_type=HandType.LEFT, hand_device_id=1, canfd_device_id=0, canfd_channel_id=0 ) if not hand.init(): print("Failed to initialize OmniHand Pro 2025") exit(1) # Get vendor information vendor = hand.get_vendor_info() print(vendor) # Set joint angles angles = [0.3, -0.5, -0.3, -0.5, 0.0, 0.6, 0.7, 0.0, 0.6, 0.7, 0.7, 0.7] # 12 joint angles (in radians) hand.set_all_active_joint_angles(angles) print(f"Set joint angles: {angles} (rad)") # Get 3D tactile sensor data thumb_data = hand.get_tactile_sensor_3d_data(Finger.THUMB) print(f"Thumb normal force: {thumb_data.normal_force} (0.1N)") ``` -------------------------------- ### Install pytest Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/linux/aarch64/python/test/README.md Install the pytest framework required to run the unit tests. ```bash pip install pytest ``` -------------------------------- ### Launch and example commands for H3UM ROS2 node Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_ROS2_H3UM.md Launch the H3UM node and run example scripts for position control, control modes, and current thresholds. The final argument selects 20/21-joint example payloads for position control. ```bash ros2 launch omnihand_node omnihand_3_ultra_m_node.launch.py # Position control: final argument selects 20/21-joint example payloads. python3 scripts/omnihand_3_ultra_m/joint_cmd.py left h3u_m t1p5 # Set all control modes or current thresholds for T1.5. python3 scripts/omnihand_3_ultra_m/joint_control_mode_pub.py 0 left h3u_m t1p5 python3 scripts/omnihand_3_ultra_m/joint_current_threshold_pub.py 500 left h3u_m t1p5 ``` -------------------------------- ### Check CAN interfaces with ip link show Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/SOCKETCAN_SETUP.md Run `ip link show` to list network interfaces and look for `can0`, `can1`, etc. If no CAN interface appears, return to Section 1 for driver installation or vendor troubleshooting. ```bash ip link show ``` -------------------------------- ### Complete usage example Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_KINEMATICS_PYTHON_O12.md Example of creating a solver for a right hand, checking joint positions, setting a gesture, converting joint positions to actuator input, and retrieving all joint angles. ```python from omnihand.omnihand_pro_2025 import OmniHandPro2025Solver # Create solver for right hand solver = OmniHandPro2025Solver(hand_type=False) # Check and validate joint positions active_joint_angles = [0.5, -0.3, 0.6, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.5, 0.3] valid = solver.check_joint_pos(active_joint_angles) # Set a gesture actuator_input = solver.set_hand_gesture(OmniHandPro2025Gesture.OMNIHAND_PRO_2025_GESTURE_PAPER) # PAPER gesture # Convert joint positions to actuator input input_values = solver.convert_joint_to_actuator(active_joint_angles) # Get all joint positions (including passive joints) all_joints = solver.get_all_joint_angles(active_joint_angles) ``` -------------------------------- ### Complete example for OmniHand Dex UMI initialization and data query Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_CPP_O10_UMI.md Initializes the OmniHand Dex UMI (O10 UMI) hand via ZLG CAN, retrieves vendor/device info, queries all joint positions (active query, values 0-4096), and gets raw tactile sensor data. Requires the omnihand/omnihand_dex_umi.h header and linking with the SDK. ```cpp #include "omnihand/omnihand_dex_umi.h" #include #include #include int main() { // Create hand instance auto hand = OmniHandDexUMI::createHandByZlgcan( HandType::LEFT, 1, // hand_device_id 0, // canfd_device_id 0 // canfd_channel_id ); if (!hand || !hand->Init()) { std::cerr << "Failed to initialize OmniHand Dex UMI (O10 UMI)" << std::endl; return -1; } // Get vendor information auto vendor = hand->GetVendorInfo(); std::cout << vendor.toString() << std::endl; // Get device information auto device_info = hand->GetDeviceInfo(); std::cout << device_info.toString() << std::endl; // Query joint positions (active query) auto positions = hand->GetAllJointMotorPosi(); std::cout << "All joint positions (" << positions.size() << " values): "; for (size_t i = 0; i < positions.size(); ++i) { std::cout << positions[i]; if (i < positions.size() - 1) std::cout << ", "; } std::cout << std::endl; // Get tactile sensor data auto tactile_data = hand->GetAllTactileSensorDataRaw(); std::cout << "Tactile sensors: " << tactile_data.size() << " sensors" << std::endl; return 0; } ``` -------------------------------- ### Enable Verbose Logging Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/TROUBLESHOOTING.md Python snippet to enable debug logging for troubleshooting. ```python import logging logging.basicConfig(level=logging.DEBUG) ``` -------------------------------- ### Complete Usage Example for OmniHandPro2025Solver Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_KINEMATICS_CPP_O12.md Example demonstrating how to create a solver for the right hand, validate joint positions, set a gesture, convert joint positions to actuator input, and retrieve all joint angles. ```cpp #include "kinematics/omnihand_pro_2025/omnihand_pro_2025_solver.h" // Create solver for right hand agilink::omnihand::omnihand::o12::OmniHandPro2025Solver solver(false); // Check and validate joint positions std::vector active_joint_angles = {0.5, -0.3, 0.6, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.5, 0.3}; bool valid = solver.CheckJointPos(active_joint_angles); // Set a gesture std::vector actuator_input = solver.SetHandGesture(OmniHandPro2025Gesture::OMNIHAND_PRO_2025_GESTURE_PAPER); // PAPER gesture // Convert joint positions to actuator input std::vector input = solver.ConvertJoint2Actuator(active_joint_angles); // Get all joint positions (including passive joints) std::vector all_joints = solver.GetAllJointAngles(active_joint_angles); ``` -------------------------------- ### Complete Example: Initialize OmniHand 2025 and Control Joints Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_PYTHON_O10.md Shows the full workflow: create a hand instance via ZLG CAN FD, initialize it, get vendor info, set joint angles, and read tactile sensor data. Requires the omnihand package and a connected OmniHand 2025 device. The angles list contains 10 joint angles in radians. ```python from omnihand import OmniHand2025, HandType, Finger # Create hand instance hand = OmniHand2025.create_hand_by_zlgcan( hand_type=HandType.LEFT, hand_device_id=1, canfd_device_id=0, canfd_channel_id=0 ) if not hand.init(): print("Failed to initialize OmniHand 2025") exit(1) # Get vendor information vendor = hand.get_vendor_info() print(vendor) # Set joint angles angles = [0.0, 0.0, 0.5, 0.0, 0.8, 0.8, 0.0, 0.8, 0.0, 0.8] # 10 joint angles (in radians) hand.set_all_active_joint_angles(angles) print(f"Set joint angles: {angles} (rad)") # Get tactile sensor data thumb_data = hand.get_tactile_sensor_data(Finger.THUMB) print(f"Thumb sensor data: {len(thumb_data)} points") ``` -------------------------------- ### Example: create_hand_by_zlgcan usage Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_PYTHON_O12.md Example call to create_hand_by_zlgcan with explicit parameters for left hand, device ID 1, CANFD device 0, and channel 0. ```python hand = OmniHandPro2025.create_hand_by_zlgcan( hand_type=HandType.LEFT, hand_device_id=1, canfd_device_id=0, canfd_channel_id=0 ) ``` -------------------------------- ### Example: createHandByZlgcan usage Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_CPP_H3L.md Example call to createHandByZlgcan with HandType::LEFT, hand_device_id=1, canfd_device_id=0, canfd_channel_id=0. ```cpp auto hand = OmniHand3Lite::createHandByZlgcan( HandType::LEFT, 1, // hand_device_id 0, // canfd_device_id 0 // canfd_channel_id ); ``` -------------------------------- ### Example: create_hand_by_zlgcan with parameters Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_PYTHON_UMI.md Example usage of the ZLG CANFD factory method, creating a left-hand instance with device ID 1, CANFD device index 0, and channel 0. ```python hand = OmniHandDexUMI.create_hand_by_zlgcan( hand_type=HandType.LEFT, hand_device_id=1, canfd_device_id=0, canfd_channel_id=0 ) ``` -------------------------------- ### Quick Start: Source, Build, and Run ROS2 Demo Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_ROS2.md Commands to set up the ROS2 environment, copy the demo package, build it with colcon, and run the joint command demo for the left hand with the 'o10' hand type. ```bash # 1. Source ROS2 and OmniHand release environment source /opt/ros/humble/setup.bash source /path/to/omnihand_sdk_release/ros2/setup.bash # 2. Create workspace and copy demo mkdir -p ~/omnihand_ws/src cp -r /path/to/omnihand_sdk_release/ros2/humble/share/omnihand_node/demo \ ~/omnihand_ws/src/omnihand_ros2_demo # 3. Build and run cd ~/omnihand_ws colcon build --packages-select omnihand_ros2_demo source install/setup.bash ros2 run omnihand_ros2_demo ros2_joint_cmd_demo left o10 ``` -------------------------------- ### Python Tests Command Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_SERVER_REST.md Install dependencies and run Python tests. No device required. ```bash pip install fastapi httpx pytest pytest python/test/test_rest_client.py -v ``` -------------------------------- ### Source ROS2 setup.bash Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/linux/aarch64/README.md Before using the ROS2 nodes, source the setup.bash file to set up the environment. ```bash source ros2/setup.bash ``` -------------------------------- ### Python First Program Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/QUICK_START.md Create a hand instance using the ZLG USBCANFD adapter, initialize it, read device info and joint angles, and move to a target position. The example uses HandType.LEFT and default device IDs; note that the USBCANFD 200U has two channels (can0/can1) while 100U or MINI always use channel zero. ```python from omnihand import OmniHand2025, HandType # Create hand instance (ZLG USBCANFD) hand = OmniHand2025.create_hand_by_zlgcan( hand_type=HandType.LEFT, # or HandType.RIGHT hand_device_id=1, # Hand device ID (factory default: 1) canfd_device_id=0, # CANFD adapter index (default start from zero) canfd_channel_id=0 # USBCANFD 200U has 2 channels (can0 or can1), while channel id for 100U or MINI is always zero. ) # Initialize if not hand.init(): print("Failed to initialize hand") exit(1) print("Hand initialized successfully!") # Get device info info = hand.get_device_info() print(f"Device ID: {info.hand_device_id}") # Read current joint angles (radians) angles = hand.get_all_active_joint_angles() print(f"Current angles: {angles}") # Move to a position (all fingers open, 10 joints in radians) target_angles = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] hand.set_all_active_joint_angles(target_angles) print("Moved to target position") ``` -------------------------------- ### Health endpoint response 200 Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_SERVER_REST.md Example JSON response from the GET /health endpoint, showing server status and active hand count. ```json { "status": "ok", "hands": 2 } ``` -------------------------------- ### ROS2 Launch Commands Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/QUICK_START.md Source ROS2 and OmniHand, then launch the node using either the launch file (recommended, defaults to single left hand) or ros2 run with default parameters. Linux only. ```bash # Source ROS2 and OmniHand source /opt/ros/humble/setup.bash source ros2/setup.bash # Launch node using launch file (recommended, defaults to single left hand) ros2 launch omnihand_node omnihand_2025_node.launch.py # Or use ros2 run (uses default parameters) ros2 run omnihand_node omnihand_2025_node ``` -------------------------------- ### Launch commands for omnipicker_3_node Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_ROS2_OP3.md Shows how to launch the node with default or custom configuration. The default config is `share/omnihand_node/config/omnipicker_3_node.yaml`; configure only the required `left_hand` and/or `right_hand`, and a side with empty `connection_type` is skipped. ```bash # Default configuration ros2 launch omnihand_node omnipicker_3_node.launch.py ``` ```bash # Custom configuration ros2 launch omnihand_node omnipicker_3_node.launch.py \ config_file:=/path/to/omnipicker_3_node.yaml ``` -------------------------------- ### GET /v1/hands/{hand_id}/methods response 200 Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_SERVER_REST.md Example response listing callable methods for a hand session, including categories like info, sensing, and control. ```json { "methods": [ { "name": "get_vendor_info", "category": "info", "description": "..." }, { "name": "get_joint_names", "category": "info", "description": "..." }, { "name": "get_all_joint_positions", "category": "sensing", "description": "..." }, { "name": "set_all_active_joint_angles", "category": "control", "description": "..." } ] } ``` -------------------------------- ### Reinstall Package (Bash) Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/TROUBLESHOOTING.md Uninstall and reinstall the omnihand package from the wheel file. ```bash # Uninstall and reinstall pip uninstall omnihand pip install python/omnihand-*.whl ``` -------------------------------- ### OmniHand Dex UMI Quick Start with Position Callback Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_PYTHON.md Create a Dex UMI hand instance, initialize, and register a position report callback at 100 Hz. ```python from omnihand import OmniHandDexUMI, HandType # Create hand instance hand = OmniHandDexUMI.create_hand_by_zlgcan( hand_type=HandType.LEFT, hand_device_id=1, canfd_device_id=0, canfd_channel_id=0, ) if not hand.init(): print("Failed to initialize") exit(1) # Register position report callback def position_callback(positions): print(f"Position report: {len(positions)} values") hand.set_position_report_callback(position_callback, frequency=100) # 100 Hz ``` -------------------------------- ### Python SocketCAN hand creation and control Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/SOCKETCAN_SETUP.md Python example to create an OmniHand 2025 via SocketCAN, initialize it, and set all active joint angles to zero. Requires `can0` configured and UP. ```python from omnihand import OmniHand2025, HandType hand = OmniHand2025.create_hand_socketcan( hand_type=HandType.LEFT, hand_device_id=1, can_interface="can0") if not hand.init(): ... hand.set_all_active_joint_angles([0.0] * 10) # O10, radians ``` -------------------------------- ### C++ SocketCAN hand creation and control Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/SOCKETCAN_SETUP.md C++ example to create an OmniHand 2025 via SocketCAN, initialize it, and set all active joint angles to zero. Requires `can0` configured and UP. ```cpp #include "omnihand/omnihand_2025.h" #include // ... auto hand = OmniHand2025::createHandSocketCan(HandType::LEFT, 1, "can0"); if (!hand || !hand->Init()) { /* verify Sections 2–3 */ } hand->SetAllActiveJointAngles(std::vector(10, 0.0)); // O10, radians ``` -------------------------------- ### Source ROS2 and Verify omnihand Node Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/TROUBLESHOOTING.md Commands to fix 'Package 'omnihand_node' not found' and node communication failures on Linux. Sources ROS2 and omnihand setup scripts, then verifies package and runs the node. ```bash # Source ROS2 first source /opt/ros/humble/setup.bash # Then source omnihand source ros2/setup.bash # Verify package ros2 pkg list | grep omnihand # Check node ros2 run omnihand_node omnihand_2025_node ``` -------------------------------- ### Launch ROS2 nodes for different hand models Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_ROS2.md Use ros2 launch to start the ROS2 node for each hand model. Replace the launch file name according to the product: O10, O12, H3L, H3U_M, or OP3. ```bash # O10 ros2 launch omnihand_node omnihand_2025_node.launch.py # O12 ros2 launch omnihand_node omnihand_pro_2025_node.launch.py # H3L ros2 launch omnihand_node omnihand_3_lite_node.launch.py # H3U_M ros2 launch omnihand_node omnihand_3_ultra_m_node.launch.py # OP3 ros2 launch omnihand_node omnipicker_3_node.launch.py ``` -------------------------------- ### Control and state APIs for joint positions and modes Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_PYTHON_H3UM.md Set and get joint positions, active joint angles, and control modes. T1.3 uses 20 values; T1.5 uses 21 values. The example shows both single-joint and all-joint variants. ```python hand.set_joint_position(joint_motor_index, posi) position = hand.get_joint_position(joint_motor_index) positions = hand.set_all_joint_positions(values) # T1.3: 20; T1.5: 21 positions = hand.get_all_joint_positions() echo = hand.set_all_active_joint_angles(angles) # T1.3: 20; T1.5: 21 angles = hand.get_all_active_joint_angles() all_angles = hand.get_all_joint_angles() hand.set_control_mode(joint_motor_index, int(ControlMode.POSITION)) mode = hand.get_control_mode(joint_motor_index) hand.set_all_control_modes(modes) modes = hand.get_all_control_modes() ``` -------------------------------- ### C++ main.cpp Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/QUICK_START.md C++ example that creates a hand via ZLG CANFD, initializes it, reads joint angles, and sets a target position. The comment explains the parameter types and ranges for createHandByZlgcan. ```cpp #include "omnihand/omnihand_2025.h" using namespace agilink::omnihand; #include int main() { // createHandByZlgcan(hand_type, hand_device_id, canfd_device_id, canfd_channel_id) // hand_type: eLeft or eRight // hand_device_id: Hand CAN ID (1-254, usually 1) // canfd_device_id: ZLG adapter index (0 = first adapter) // canfd_channel_id: Channel (0 or 1 for dual-channel adapters) // (In omnihand_2025.h, hand_device_id / canfd_device_id / canfd_channel_id are std::uint8_t.) auto hand = OmniHand2025::createHandByZlgcan(HandType::LEFT, 1, 0, 0); if (!hand || !hand->Init()) { std::cerr << "Failed to initialize hand" << std::endl; return -1; } std::cout << "Hand initialized successfully!" << std::endl; // Read current joint angles (radians) auto angles = hand->GetAllActiveJointAngles(); std::cout << "Current angles: "; for (auto a : angles) std::cout << a << " "; std::cout << std::endl; // Move to target position (10 joints in radians) std::vector target_angles(10, 0.0); hand->SetAllActiveJointAngles(target_angles); return 0; } ``` -------------------------------- ### YAML configuration for left_hand parameters Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_ROS2.md Example YAML configuration for the left_hand namespace. Parameters include hand_device_id, connection_type, canfd_serial_number, and canfd_channel_id. If connection_type is empty or commented out, the hand is skipped. ```yaml /**: ros__parameters: left_hand: hand_device_id: 1 connection_type: "hcan" canfd_serial_number: "12345678" canfd_channel_id: 0 ``` -------------------------------- ### Check Position Range (Python) Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/TROUBLESHOOTING.md Valid range is typically 0-4096, but some motors cannot reach extreme values due to finger mechanical limits; using them may cause stalling or protection. Start with safe middle positions or use joint angle interface (recommended, handles limits automatically). ```python # Valid range is typically 0-4096 # WARNING: Some motors cannot reach extreme values (0 or 4096) due to finger mechanical limits # Using extreme values may cause the motor to stall or trigger protection # Start with safe middle positions (tested values from demo) safe_pos = [2048, 2048, 4096, 2048, 4096, 4096, 2048, 4096, 2048, 4096] hand.set_all_joint_motor_posi(safe_pos) # Or use joint angle interface (recommended, handles limits automatically) angles = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] hand.set_all_active_joint_angles(angles) ``` -------------------------------- ### Initialize OmniHand Dex UMI and register position report callback Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_CPP.md Creates an OmniHand Dex UMI instance using ZLGCAN, initializes it, and registers a position report callback at 100 Hz. Requires a valid CAN FD device and channel. Returns -1 if initialization fails. ```cpp #include "omnihand/omnihand_dex_umi.h" // Create hand instance auto hand = OmniHandDexUMI::createHandByZlgcan( HandType::LEFT, 1, // hand_device_id 0, // canfd_device_id 0 // canfd_channel_id ); if (!hand || !hand->Init()) { std::cerr << "Failed to initialize" << std::endl; return -1; } // Register position report callback hand->SetPositionReportCallback([](const std::vector& positions) { std::cout << "Position report received: " << positions.size() << " values" << std::endl; }, 100); // 100 Hz frequency ``` -------------------------------- ### Call hand methods via curl (get_all_joint_positions and set_all_active_joint_angles) Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_SERVER_REST.md Use POST /v1/hands/{hand_id}/methods?method= to invoke a method on a live session. The request body is a JSON object of method parameters; use {} for methods with no parameters. The example shows getting joint positions and setting joint angles. ```bash curl -X POST "http://127.0.0.1:8000/v1/hands/1/methods?method=get_all_joint_positions" \ -H "Content-Type: application/json" -d "{}" # Set joint angles curl -X POST "http://127.0.0.1:8000/v1/hands/1/methods?method=set_all_active_joint_angles" \ -H "Content-Type: application/json" \ -d '{"angles": [0.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.0]}' ``` -------------------------------- ### Directory Structure Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/linux/x64/README.md Shows the layout of the x64 directory, including C++ and Python demos, ROS2 packages, and install scripts. ```text x64/ ├── cpp/ │ ├── share/cmake/omnihand/ # CMake config │ ├── include/omnihand/ # Header files │ ├── lib/ # C++ libraries │ ├── demo/ # C++ demo source code (not installed) │ ├── test/ # C++ test source code (not installed) │ └── bin/omnihand/ │ ├── demo/ # Demo executables │ └── test/ # Test executables ├── python/ │ ├── *.whl # Python wheel │ ├── demo/ # Python demos (not installed) │ └── test/ # Python tests (not installed) ├── ros2/ # ROS2 packages with bundled runtime libraries │ ├── humble/ # ROS2 distribution │ └── setup.bash # Auto-detect ROS distribution ├── install.sh # Install script ├── uninstall.sh # Uninstall script ├── README.md # This file (English) └── README_zh_cn.md # Chinese documentation ``` -------------------------------- ### OmniPicker 3 (OP3) Quick Start with Gesture and Stroke Control Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_PYTHON.md Create an OP3 picker instance via HCAN, initialize, set a half-open gesture, and perform a stroke control with specified parameters. ```python from omnihand import HandType, OmniPicker3, OmniPicker3Gesture picker = OmniPicker3.create_hand_by_hcan( hand_type=HandType.UNKNOWN, hand_device_id=OmniPicker3.kDefaultHandDeviceId, canfd_device_id=0, canfd_channel_id=0, ) if not picker.init(): raise RuntimeError("OP3 initialization failed") picker.set_hand_gesture( OmniPicker3Gesture.OMNIPICKER_3_GESTURE_HALF_OPEN ) stroke = picker.mix_control_by_stroke(5000, 3000, 2000) ``` -------------------------------- ### init Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/doc/en/API_PYTHON_H3L.md Initializes the device. Must be called after creating an instance. Returns False on failure. ```APIDOC ## init ### Description Initializes the device. Must be called after creating an instance. Returns False on failure. ### Method init() ### Parameters None ### Returns - **bool** - True on success, False on failure. ``` -------------------------------- ### Build USB demo executable (demo_omnipicker_2025_usb) Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/linux/aarch64/cpp/demo/omnipicker_2025/CMakeLists.txt Defines the CMake target for the USB demo example, linking against the OmniHand target and setting the runtime output directory. ```cmake # USB add_executable(demo_omnipicker_2025_usb OP1_demo_usb.cc) target_link_libraries(demo_omnipicker_2025_usb PRIVATE ${OMNIHAND_TARGET}) set_target_properties(demo_omnipicker_2025_usb PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${DEMO_OUTPUT_DIR}" ) ``` -------------------------------- ### Run all tests Source: https://github.com/agibottech/agilink_omnihand_sdk/blob/main/linux/aarch64/python/test/README.md Run all tests in the python/test directory with verbose output. ```bash cd python/test pytest -v ```