From 7c147cb03254dd6fe43f2f422a4f28b6085f64b6 Mon Sep 17 00:00:00 2001 From: J Sugihara <56066868+sugihara-16@users.noreply.github.com> Date: Mon, 13 May 2024 16:34:18 +0900 Subject: [PATCH] [Spinal][servo] Create README for servo interface --- .../mcu_project/lib/Jsk_Lib/servo/README.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/servo/README.md diff --git a/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/servo/README.md b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/servo/README.md new file mode 100644 index 000000000..6d2eb73ae --- /dev/null +++ b/aerial_robot_nerve/spinal/mcu_project/lib/Jsk_Lib/servo/README.md @@ -0,0 +1,40 @@ +# Spinal: Direct servo control +## What is this +This is a universal interface for servo motor drivers. +## How to use +### Dynamixel +#### Setting +Please follow these steps **in order**. +##### 1. Connect Spinal and a power source to servo motors. +##### 2. Reboot Spinal to find and initialize servo motors. +- Just after this reboot, you can see the LEDs of the servos blink once. +##### 3. Set basic parameters +- TTL - RS485 mixed flag + - Flag on existence of mixed TTL and RS485 communication within the entire system. + - ``rosservice call /direct_servo_config "command: 6 data: [value (0 or 1)]" `` +- Send data flag + - Flag on reading of servo data + - ``rosservice call /direct_servo_config "command: 4 data: [servo id, value (0 or 1)]" `` +- External encoder flag + - Flag on the existence of external encoders. + - ``rosservice call /direct_servo_config "command: 7 data: [servo id, value (0 or 1)]" `` +- Servo resolution ratio + - The ratio of joint resolution to servo resolution + - ``rosservice call /direct_servo_config "command: 8 data: [servo id, value (joint resolution), value (servo resolution)]" `` +##### 4. Set Control parameters +- Homing offset + - Homing offset of servo position. + - Range: -1,044,479 ~ 1,044,479 + - ``rosservice call /direct_servo_config "command: 1 data: [servo id, value(offset)]" `` +- PID gains + - PID gains for positional control + - Range: 0 ~ 16,383 + - ``rosservice call /direct_servo_config "command: 2 data: [servo id, value(p gain), value(d gain), value(i gain)]" `` +- Profile velocity + - Maximum velocity of servo + - Range: 0 ~ 32767 (0 represents infinity) + - ``rosservice call /direct_servo_config "command: 3 data: [servo id, value(velocity)]" `` +- Current limit + - Limitation of servo current + - Range: 0 ~ 1,193 + - ``rosservice call /direct_servo_config "command: 5 data: [servo id, value(current)]" ``