Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spinal][cybergear][WIP] implement interface for xiaomi cybergear #645

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sugikazu75
Copy link
Member

@sugikazu75 sugikazu75 commented Dec 29, 2024

What is this

Enabled to use xiaomi cybergear.
I transplanted demo firmware to spinal firmware and implement ros interface.

Details

  • add can message filter with extended id
  • implement cybergear interface

TODO

  • count rotation
  • enable to use standard message filter too (used for spinal-neuron system). This is temporaly disabled in 87963af because can rx callback is not called (I dont know the reason now).
  • support multiple motors
  • Integrate ros message

Usage

  • set cybergear can id as 0x7F (factory default)
roslaunch spinal bridge.launch

to free motor (set all gain and FF torque as 0)

rostopic pub -1 /servo/extended_cmd spinal/XiaomiCybergearCmd "{position: 0.0, speed: 0.0, torque: 0.0, kp: 0.0, kd: 0.0}" 

to position control (set p-gain and target position)

rostopic pub -1 /servo/extended_cmd spinal/XiaomiCybergearCmd "{position: 3.0, speed: 0.0, torque: 0.0, kp: 10.0, kd: 2.0}" 

to velocity control (set d-gain and target velocity)

rostopic pub /servo/extended_cmd spinal/XiaomiCybergearCmd "{position: 0.0, speed: 1.0, torque: 0.0, kp: 0.0, kd: 1.0}" 

to torque control (set target torque)

rostopic pub /servo/extended_cmd spinal/XiaomiCybergearCmd "{position: 0.0, speed: 0.0, torque: 0.1, kp: 0.0, kd: 0.0}" 

@sugikazu75
Copy link
Member Author

sugikazu75 commented Dec 29, 2024

Local diff to set NERVE_COMM as 0 may be required.

@sugikazu75 sugikazu75 force-pushed the develop/spinal/servo_motor/xiaomi_cybergear branch from e55bafa to 87963af Compare December 29, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants