I am trying to use Daniel Kalicki’s TWAI library to connect to my actuators. Where i will then implement IMU and EMG data to estimate human gait and locomotion, with the actuators providing the plantarflexion and dorsiflexion in the ankle and knee.
Running the code and opening the serial moniter leads to this message:
Failed to queue message for transmission
Alert: TWAI controller has become error passive.
Alert: A (Bit, Stuff, CRC, Form, ACK) error has occurred on the bus.
Bus error count: 15
Alert: The Transmission failed.
TX buffered: 0 TX error: 128 TX failed: 6
POS:0.000000 V:0.000000 T:0.000000 temp:0
Failed to queue message for transmission
This is followed with the last two lines of the message repeating indefinetly.
My thoughts were maybe my microcontroller or can-bus unit were incompatible in some way, but as a novice at all this, i really have no clue.
I am sorry, but this is probably the wrong forum for your question since the software you are requesting help for is not related to SimpleFOC. I do have some limited experience with CAN bus on the ESP32 though and from the debug output you posted, I would conclude that there is a hardware problem. The sender is unable to access the bus and transmit its data. This may happen if the wiring is wrong or another device blocks the bus. Anyway, very difficult to say without detailed knowledge, so don’t take my statement for granted!
Ciao a tutti, sto iniziando ad utilizzare i Xiaomi Cybergear, chi mi può spiegare la modalità MIT, dovrebbe coincidere con la modalità 0 come da manuale???
was anyone able to determine what the can id and can frame structure of the encoder calibration command through the gui, as its undocumented? looking to run the calibration through code. maybe @hansihe? saw you accidentally ran it?
HI All,
I am new to the topic, i bought the cyber gear motor and also two usb to can connectors , but not able to connect to the motor with the software that is downloaded from xiaomi site.
i have - usb2canfd v1 from we act
and also
Hi!, i have been working with these motors lately, but i have noticed that in case of a power failure or turning off the power supply, the motor loses its 0 position, how have you dealt with it, how could i recover the initial position?.
Idk if this is the right place to ask this, but i would be very grateful if any of you can help me
Has anyone been able to read feedback from the motor that is more than 4*pi or 12.5 radians. I need to instruck my motor connected to a worm gearbox to do 100 rotation. The xiaomi app shows the correct mechanical position but i cant read it with my esp32. I can also not set the position mode with the esp32. I start the position mode with the xiaomi app the motor makes a faint buzz sound then then i can control it with the esp32. i can instruct it to do 100 rotations but the feedback gets stuck at 12.5. Any ideas around how to fix this will be great. To update the mechanical position you have to uninitialized position mode in xiaomi app and update parameters. Then reinitialize the position mode move, uninitialized the position mode, update to get the new mechanical position.
Based on the motor command sheet the 2 byte uint for target angle is mapped to -4pi to 4pi so I don’t think you can get around that. Are you moving the motor 100 rotations at a set velocity every time? You might be able to use speed or current mode and figure out how much movement time correlates to 100 rotations. If you don’t mind stops you could move 4*pi rads at a time in position mode, then reset the zero position before moving again. Let’s see if anyone chimes in with more ideas.
A friend mentioned a while back that there is another version of the firmware which supports > 4pi position reporting. I think they contacted the seller to get it. I’ll check in with my friend and see if I can find out more, but reaching out to the seller might be faster.
Thanks that’s good to know, I’ve been looking for updated firmware. I reached out to the Aliexpress seller I purchased from as well as Xiaomi directly. Hopefully I get a response from someone.
Here is a video I made of my progress with the cyber gear motor. could be a great little motor if we can fully control via esp32 or similar. Cant get the mode to initialize correctly. Cant read feedback past 4*Pi yet. Mabey someone with a can sniffer experience figure out how to read some of the addresses via ESP32 or similar. I will keep on trying and updating progress if I make any…
Remove the dropbox before links to view video or download code i couldnt get it to work otherwise
link with mod code, thanks to the people that put all the initial work with this code and share it.
To update the parameter list on video at 7:30 I wasn’t clear. When I say switch the motor off, I toggled the motion position slider button on and then off again off camera. This will switch the motor off (stop motor humming) the parameter list will then update with new corrected values.
That’s frustrating and I share your pain. I’m currently using a python-CAN based library to control the CyberGear from a Jetson Orin and definitely feel like the provided documentation does not cover all the commands Xiaomi’s cybergear host computer software is using.
I haven’t used the CyberGear Arduino library you’re using but you might want to look at this line:
Although I managed to brute-force my way into writing a library for the motor a few months ago, it bugged me that I didn’t fully understand the documentation. I decided to feed it to DeepSeek R1 and it appears as confused as I was:
Hello to everyone.
Let to me to fastly introduce myself.
My Name is Leonardo, I’m Italian and living in Shenzhen.
I have discovered the CyberGear of Xiami few days abo and I have ordered one this morning one directly on teh Xuiaomi web site and waiting that arrive in a short time.
Also I buy the USB adapter and cable on Taobao.
As I’m a member of THEREMINO SYSTEM (www.theremino.com) we would like to use this motor to be used with our language called THEREMINO AUTOMATION (look like a sort of BASIC, made by us to be easy and simple to use for persons that are not a professional programmer).
The Theremino System is OPEN SOURCE.
To have idea about our system, do a goggling with the word “theremino”.
We have one entire complete system to interact with sensor and actuators.
We would like to add a software interface to manage simply this joint motor.
CyberGear seem perfect to interact with Theremino Automation.
The Theremino system is running under Windows and all are written in Visual studio, tipically in VBnet.
When the motor arrive I begin to share here my progress and if I found difficult, I ask support here and I say thanks in advance for your future kindness…
Ciao