edgetx icon indicating copy to clipboard operation
edgetx copied to clipboard

HeadTracker Reset Center

Open r1000ru opened this issue 1 year ago • 18 comments

Is there an existing issue for this feature request?

  • [X] I have searched the existing issues

Is your feature request related to a problem?

Any headtracker has drift. To reset the headtracker to zero, you usually press a button on it. This is not convenient, since you need to remove your hand from the remote control. It would be great to reset the headtracker by pressing a remote control button or a toggle switch.

Describe the solution you'd like

Connection can be made via:

  1. Coach port - reset is not possible, since it is one-way.
  2. Sbus via serial port (ble or wire) - send rc channels and headtracker can be configured to reset at a certain value of a certain channel.

When using a headtracker, it is common to set one switch to center the camera in one position, or use the headtracker values in another. As one option, you can transmit rc channels to headtracker. This will allow you to combine the position of the camera, head and reset by certain value of a certain channel. Other channals can be used for extended functionality. To implement it, just add the Trainer menu item “Send trainer channels to the student” and send them back via e-art, for example, with a frequency of 5-10 hertz.

Describe alternatives you've considered

No alternative

Additional context

No response

r1000ru avatar Feb 14 '24 04:02 r1000ru

What HeadTracker are you specifically referring to? Is it this one? https://github.com/dlktdr/HeadTracker

As I've not used it myself, but I believe it supports SBUS and serial/BT, and has support for "remote" centering, so it may be worth joining the Discord to see how the folks there use it.

pfeerick avatar Feb 14 '24 10:02 pfeerick

i use headtracker 2.21 with nano33 ble sense2, and wanna have this function as well

arthurson avatar Feb 14 '24 10:02 arthurson

See option 3: https://headtracker.gitbook.io/head-tracker-v2.2/getting-started/wiring#option-3-bluetooth-bridge

rotorman avatar Feb 14 '24 17:02 rotorman

See option 3: https://headtracker.gitbook.io/head-tracker-v2.2/getting-started/wiring#option-3-bluetooth-bridge

Do you propose to drill a hole in the control equipment and add a button? Or cut the wires from one of the existing switches and solder them to the bluetooth module?

r1000ru avatar Feb 15 '24 09:02 r1000ru

Depends on your radio. E.g. TX16S mkII can have an additional button attached to the back case, where you could route out it's wires below one of the handgrips - or even better - just mount your second Arduino Nano 33 BLE that acts as Bluetooth receiver - internally into the radio. This will result very neat and clean setup. Internally you can then wire up the S.BUS signal to internal USART6/AUX2 header.

See: https://www.radiomasterrc.com/collections/tx16s-mkii-accessories/products/diy-upgrade-button-for-tx16s-mkii-radio

rotorman avatar Feb 15 '24 10:02 rotorman

I created the task so that this functionality is available to everyone. I am able to both install the button and modify the software for myself. But it seems to me that the software implementation will be more convenient than the hardware one. And Walksnail also released glasses with a built-in headtracker and bluetooth. And standardization of the interaction of equipment and glasses - I think it will be very useful.

r1000ru avatar Feb 15 '24 12:02 r1000ru

Would you have more info regarding Walksnail Goggles X head tracker? I read the advertisement, but have zero details about it.

rotorman avatar Feb 15 '24 12:02 rotorman

Depends on your radio. E.g. TX16S mkII can have an additional button attached to the back case, where you could route out it's wires below one of the handgrips - or even better - just mount your second Arduino Nano 33 BLE that acts as Bluetooth receiver - internally into the radio. This will result very neat and clean setup. Internally you can then wire up the S.BUS signal to internal USART6/AUX2 header.

See: https://www.radiomasterrc.com/collections/tx16s-mkii-accessories/products/diy-upgrade-button-for-tx16s-mkii-radio

i now use this method to reset gyro, it works but hard to use as i use two fingers to control gimbal, i would like to use SH to reset if software support it.

arthurson avatar Feb 15 '24 13:02 arthurson

Update issue. Proposed a simpler and more functional solution.

r1000ru avatar Feb 15 '24 14:02 r1000ru

So if I understand correctly, nothing needs doing you can already output channels using SBUS, and you can set any chanel to any specific value of your willing using mixer or SF

3djc avatar Feb 15 '24 14:02 3djc

So if I understand correctly, nothing needs doing you can already output channels using SBUS, and you can set any chanel to any specific value of your willing using mixer or SF

at the moment when headtracker use sbus to send gyro data to radio like option3, radio can't reset centre by itself, we need to add hardware button to send signal to nana33 ble

arthurson avatar Feb 15 '24 15:02 arthurson

The updated description above suggests

"send rc channels and headtracker can be configured to reset at a certain value of a certain channel."

3djc avatar Feb 15 '24 16:02 3djc

on trainer menu we have calibration, but thats is not a solution, like you turn left, calibrate, then turn left, calibrate, repeat serval times, the gyro will not work , only reset button from headtracter can be reliable

arthurson avatar Feb 15 '24 16:02 arthurson

So if I understand correctly, nothing needs doing you can already output channels using SBUS, and you can set any chanel to any specific value of your willing using mixer or SF

Need return channels after mixing to uart->headteacker

r1000ru avatar Feb 15 '24 17:02 r1000ru

So if I understand correctly, nothing needs doing you can already output channels using SBUS, and you can set any chanel to any specific value of your willing using mixer or SF

Wrong way around JC, headtracker outputs SBUS to handset, which reads it as a trainer input and sends it out via RC link. Headtracker is basically another input. What they are after is a two way link, so that the handset can give instruction to the headtracker.

I wonder if perhaps a Lua script/widget would do this job? As Lua can send serial commands, and monitor switches... meaning nothing is needed in the firmware at all.

And we can't do anything for walksnail system until there is documentation as to that sort of API they provide for working with it.

pfeerick avatar Feb 15 '24 21:02 pfeerick

And we can't do anything for walksnail system until there is documentation as to that sort of API they provide for working with it.

They claim that they cannot start implementing a headtracker because they do not understand which protocol they should support. I suggested that they support two options:

  • emulate FrSky Para trainer (hardware connects to glasses)
  • send SBUS to the WriteNoResponse characteristic of the service 0x0006 of any connected device (connection is carried out with glasses, when searching for available devices, a filter is used for the presence of the service)

r1000ru avatar Feb 16 '24 06:02 r1000ru

They claim that they cannot start implementing a headtracker because they do not understand which protocol they should support. I suggested that they support two options:

Can you please point us to this discussion. Where did you read about this?

rotorman avatar Feb 16 '24 07:02 rotorman

Can you please point us to this discussion. Where did you read about this?

I have a Wolksnail representative in our local language chat. He explained the current situation with the head tracker this way. You can write to him via Telegram after China New year holidays: https://t.me/caddx_lex

r1000ru avatar Feb 16 '24 07:02 r1000ru