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

Walksnail Serial gimbal and headtracker support #10109

Merged
merged 72 commits into from
Jun 20, 2024
Merged

Conversation

mmosca
Copy link
Collaborator

@mmosca mmosca commented Jun 5, 2024

Support for Walksnail serial gimbal and headtracker.

Headtracker can be used with serial gimbal or in the mixer.

Saves a few pwm outputs in exchange for a UART.

Headtracker information can be read from VTX via UART and gimbal can be controlled via uart.

serial 5 67108864 115200 115200 0 115200

set gimbal_sensitivity = 0
set gimbal_pan_channel = 15
set gimbal_tilt_channel = 16
set gimbal_roll_channel = 0

set headtracker_type = SERIAL
set headtracker_pan_ratio =  1.000
set headtracker_tilt_ratio =  1.000
set headtracker_roll_ratio =  1.000

Configurator changes:
iNavFlight/inav-configurator#2106

Features for a follow up PR:

  • trims for at least the pitch axis to allow "X degree up angle on camera", like quad pilots are used to.
  • Implement headtracker_type = SERVO and refactor osd pan compensation to use headtracker common, instead of mixer channels.

Demo:
https://youtu.be/GDTD14OQr-c

Needs plumbing so we have a gimbal task running to send gumbal updates
Keep it out of F722 for testing builds, for now.
Start plumbing task. Still need initialization
Time to wire things up and test.
@mmosca mmosca removed the Don't merge label Jun 6, 2024
@mmosca mmosca added this to the 8.0 milestone Jun 6, 2024
@mmosca mmosca marked this pull request as ready for review June 6, 2024 21:29
@mmosca mmosca merged commit ca6921b into master Jun 20, 2024
22 checks passed
@mmosca mmosca changed the title Serial gimbal and headtracker support Walksnail Serial gimbal and headtracker support Jun 28, 2024
@ltwin8
Copy link
Contributor

ltwin8 commented Jul 12, 2024

hi, does this also support the HEQUAV G-Port gimbal?

@ltwin8
Copy link
Contributor

ltwin8 commented Jul 12, 2024

are you aware of some headtracker to use with ELRS? afaik the ELRS Backpack can support headtrack only missing part is a sensor for googles

@mmosca
Copy link
Collaborator Author

mmosca commented Jul 12, 2024

hi, does this also support the HEQUAV G-Port gimbal?

The gimbal control over serial, probably not. The protocol is probably different.

I don't have a HEQ gimbal to test.

@mmosca
Copy link
Collaborator Author

mmosca commented Jul 12, 2024

are you aware of some headtracker to use with ELRS? afaik the ELRS Backpack can support headtrack only missing part is a sensor for googles

for INAV, that shows up as data on a rc channel. No need to do anything special

@ltwin8
Copy link
Contributor

ltwin8 commented Jul 12, 2024

are you aware of some headtracker to use with ELRS? afaik the ELRS Backpack can support headtrack only missing part is a sensor for googles

for INAV, that shows up as data on a rc channel. No need to do anything special

I meant hardware to do headtracking? Like anything that communicates with the radio (wirelessly maybe) to mix it into the rc link

@elmerthecat
Copy link

Will this work on any gimbal with a UART? I would like to use this one.

@mmosca
Copy link
Collaborator Author

mmosca commented Jul 15, 2024

Will this work on any gimbal with a UART? I would like to use this one.

I have only tested the walksnail one. If it is is the same, it should work.

@elmerthecat
Copy link

Will this work on any gimbal with a UART? I would like to use this one.

I have only tested the walksnail one. If it is is the same, it should work.

Okay, thanks. Just out of curiosity and since I cant find this information elsewhere, how do the goggles transmit the head tracking data to the aircraft? I am assuming it is through the vtx? Can the vtx transmit the pwm signal to the FC so that you can just use pwm signal instead?

@Jonbuckles
Copy link

Jonbuckles commented Jul 22, 2024

Will this work on any gimbal with a UART? I would like to use this one.

I have only tested the walksnail one. If it is is the same, it should work.

Okay, thanks. Just out of curiosity and since I cant find this information elsewhere, how do the goggles transmit the head tracking data to the aircraft? I am assuming it is through the vtx? Can the vtx transmit the pwm signal to the FC so that you can just use pwm signal instead?

The built in head tracking is sent from the goggles to the VTX, VTX has a cable that goes to the gimbal and the commands are passed. The goggles also have head tracking out via 3.5mm jack, that can be used like normal head tracking sent to the FC via radio link, and in return can be sent to the gimbal if you directly connect the pwm cables, bypassing the VTX option.

Adding the option for UART control instead of pwm would simplify the wiring as well as allow you to set parameters via CLI and a host of other possibilities.

@Jonbuckles
Copy link

Are you on firmware 3.2 for the GM3 gimbal? I’m curious if this has been tested since they released the new firmware. I’ve have this working on the old firmware but don’t know if upgrading will still work. There is a parameter settings file on the gimbal that may need backed up and restored after upgrading.

@mmosca
Copy link
Collaborator Author

mmosca commented Aug 14, 2024

Upgrading to 3.2 will break it. We are working with walksnail for a solution.

@mmosca
Copy link
Collaborator Author

mmosca commented Aug 14, 2024

@Jonbuckles if anyone comes across this, you can track progress of the fix here #10302

We expect this to be fixed by caddx, but we may eventually need to do small changes on INAV's side before 8.0 release.

@kasatka60
Copy link

XF C-20T FPV GIMBAL supports "Carrier AHRS Fusion". Is it possible to implement this on inav?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants