Problem with test_gimbal_rotation.py
k-khosravi opened this issue · comments
Hello!
Thank you for sharing this useful repository! but I have a problem with the running test_gimbal_rotation.py.
I used the test_gimbal_rotation.py script to rotate the A8 mini gimbal but every time I set the yaw angles in degrees in this script. It always goes to 103 degrees no matter what number I give it as the yaw angle in the input. I also calibrate the camera but this doesn't work!
Hi @k-khosravi !
The last time I worked on this is a year ago, and I have not used SIYI's cameras since then. There could be modifications in the cameras software. I used their documentation at that time to write the communication protocol accordingly, but I am not sure if it is still applies. Unfortunately, I currently don't have time to test this.
Please note that I implemented a Proportional controller for the gimbal rotation function, because the camera firmware at that time didn't provide a way to request rotations. Instead, they provided rotation speed. However, I think they provided this function in later firmware versions.
You can check the camera documentation and re-implement a new function that directly requests gimbal rotations.
I hope this helps.
Hi @k-khosravi , have you manage to setup a solution for moving the gimbal by extracting the angles directly from the camera? I am working on a ZR10 and I am still stuck vs the wiggly loop caused by the proportional ctrl on the speed.
I am pretty sure there is a way to extract directly the angles in the latest firmware but I am struggling to understand the sdk from the manual of the camera.
The package is updated.
You may try the following test script
https://github.com/mzahana/siyi_sdk/blob/main/tests/test_set_angles.py