Comrades in Arms Discussion Board

Full Version: Arduino/GY-85 headtracker
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Geez, I'm going insane with this thing.

For the record, using the USB only variant for now, using this software: http://sourceforge.net/projects/gy80face...p_redirect

So first thing is to flash the calibration sketch, which I do. It actually works, I can see the values changing in the calibration GUI. The plot function does not show any changes, though.

Then I load the facetrack sketch, and if I just check with a serial terminal, I see a lot of unprintable characters appearing. But FaceTrack NOIR doesn't work at all....

sigh... need to look at the sketch itself
Sketch is ok. I tried simply outputting the values I receive from the gyro to serial in text form, and I see the values changing accordingly, so it should be ok.

However, the FaceTrackNoIR plugin doesn'T register it...

It's really, really fucked up -_-

Try these downloads for the sketches and a PDF guide (ignore the download links in that), as this appears to be the most recently updated sketch and the one I'm using.

https://www.dropbox.com/s/ucrsuni98as1yrn/FTR.ZIP?dl=0
http://sourceforge.net/projects/gy80facetrack/files/FTR_DIY_based_Tracker.pdf/download

Bear in mind when calibrating that the orientation of the board is important, so you might need to rotate it a different way to that shown.

After you've calibrated and are ready to flash the FTR sketch,  in config.h there's an Inter parameter and you might find it works better if you change that to 100 (it did for me anyway). Also try reducing the Serial_Baud to 57600 if it doesn't work well at 115200.

Try open track instead of FTNoIR. I found the hatire plugin buggy in the latter. On the plugin settings screen, you should see a changing value for tps.

Get the rc9 of OT from here https://github.com/opentrack/opentrack/r...ck-2.3-rc9 and the latest version of the plugin from here https://github.com/MartinJG/OpenTrackHatireTest

In the Command tab of the Hatire settings in OT, put Z in the Center box and set the Baudrate to 115200 (or 57600 if you've changed the sketch), 8, N,1, RTS/CTS.
Opentrack doesn't seem to find the plugin for whatever reason
(05-15-2015, 01:49 PM)Varanon link Wrote:Opentrack doesn't seem to find the plugin for whatever reason


Oops, crossposted. Have a look at my edited previous post.
(05-15-2015, 02:02 PM)doveman link Wrote:Oops, crossposted. Have a look at my edited previous post.

Still the same problem. Once the tracker is running, no rotation is shown. I verified with the IR tracker that opentrack/FreeTrackNoIR work, but they won't find anything.

I verified that the axis are read correctly by simply dumping the readable values to the output, and they are correct. I verified that the structure used to pass the data is correct. Everything is correct, but still it doesn't work.

I don't get it
(05-15-2015, 02:33 PM)Varanon link Wrote:Still the same problem. Once the tracker is running, no rotation is shown. I verified with the IR tracker that opentrack/FreeTrackNoIR work, but they won't find anything.

I verified that the axis are read correctly by simply dumping the readable values to the output, and they are correct. I verified that the structure used to pass the data is correct. Everything is correct, but still it doesn't work.

I don't get it


Hmm, weird. Do you still not see any plot data in HeadtrackerGUI.exe when you click Start Plot? I think you might have already seen this thread but it shows examples of what it should display http://www.rcgroups.com/forums/showthread.php?t=1677559


If not, I can only suggest you post on this thread https://github.com/opentrack/opentrack/i...-102224242 as that seems to be the most active one and there's people there who understand how it works far better than I do. If I got it working it can't be that complicated, so I'm sure you'll get there with a little help Smile
Ok, I've been snooping around in the sketch and the source code of the calibration tool, and I think the tracker itself works, I can get the tracker values and they seem to be correct. What probably does NOT work is the low-pass filtering which ultimately leads to the filtered outputs.

I suspect that I am doing something wrong in the sense that I mess up the calibration somehow...

At least I'm getting somewhere, it seems

Edit: At least I can now see the plot lines correctly in the calibration sketch. The problem was that the EEPROM was botched, the first value was '8' which does indicate the settings have been set, but in fact, this was just a random value in there and happen to be just the fucking indicator for a working settings record... go figure.

Still no luck with facetrack or opentrack, but hey, one after another
Ok, doveman, one more question: You said the HC05 should be wired like this:

Pro Micro to HC05: Pin 9 to Key, Pin 10 (RX) to TX and Pin 14 (TX) to RX

Are you sure about pins 10 and 14 ? The sketch uses Serial1, which is supposedly pins 0 and 1
(05-15-2015, 08:40 PM)Varanon link Wrote:Ok, doveman, one more question: You said the HC05 should be wired like this:

Pro Micro to HC05: Pin 9 to Key, Pin 10 (RX) to TX and Pin 14 (TX) to RX

Are you sure about pins 10 and 14 ? The sketch uses Serial1, which is supposedly pins 0 and 1

That is what I used when configuring the HC05 with this sketch:

http://www.techbitar.com/modify-the-hc-0...mands.html

In that sketch, pins 10 and 11 are defined for BTSerial but as the Pro Micro doesn't have a pin 11, I just changed it to 14 instead. I also used Serial.begin(57600) and BTSerial.begin(38400); but BTSerial.begin(57600) should work as well and it might be easier to keep them both the same.

Also, the VCC needs to be connected only after the Arduino is powered up, to get the HC05 into command mode, so use a jumper for that so that you can connect/disconnect it easily.

In the final build, with the GY-85 and HC05 connected, the HC05 does go TX to Pin1 and RX to Pin0.
(05-15-2015, 07:16 PM)Varanon link Wrote:At least I can now see the plot lines correctly in the calibration sketch. The problem was that the EEPROM was botched, the first value was '8' which does indicate the settings have been set, but in fact, this was just a random value in there and happen to be just the fucking indicator for a working settings record... go figure.

Still no luck with facetrack or opentrack, but hey, one after another


Glad to see you're making progress  Big Grin  I had my fair share of problems when I built mine, mostly due to dodgy soldering on my part, using the wrong code or the fact that the sketch was being developed at the time and wasn't really working properly when I started but it made it all the sweeter when I finally got it working  ;D
(05-15-2015, 09:00 PM)doveman link Wrote:In the final build, with the GY-85 and HC05 connected, the HC05 does go TX to Pin1 and RX to Pin0.

Ahh, so the HC-05 will need to be resoldered once it's configured ? That is the information I was missing!

Thanks a lot!

I still got no luck with the headtracking software, neither opentrack nor facetracknoir. I found it peculiar to see that the transmit led will light up every time I connect a serial terminal (which is expected) but stays off when I start headttracking....

I was thinking that maybe the USB serial is somewhat botched, hence the idea of connecting the HC-05 so that I can go through bluetooth instead.
(05-15-2015, 09:21 PM)Varanon link Wrote:Ahh, so the HC-05 will need to be resoldered once it's configured ? That is the information I was missing!

Thanks a lot!

I still got no luck with the headtracking software, neither opentrack nor facetracknoir. I found it peculiar to see that the transmit led will light up every time I connect a serial terminal (which is expected) but stays off when I start headttracking....

I was thinking that maybe the USB serial is somewhat botched, hence the idea of connecting the HC-05 so that I can go through bluetooth instead.

Definitely sounds like it would be worth trying. It doesn't seem like there's a hardware fault with your Pro Micros but maybe your motherboard USB ports are having issues with it, or the driver's conflicting with something, so if you use the BT instead that will eliminate that as a potential problem. Just make sure you've configured the HC05 with the same baud rate you set in the sketch and in OT/FT. 115200 is working for me, so probably try that first but I think it should still work at lower settings and I did use 57600 for a while when it was being developed and we were trying to iron out some issues.

I just tested and with mine I get a red light on the Pro Micro and green on the GY-85 when it's powered and they don't change when I start OT. The BT blue light flashes when OT isn't started and blinks twice every 2-3s when it is. I can't recall if the lights were any different when I was using the USB instead of the BT and my memory's clouded by testing with MPU's as well as GY-85's, so any recollection I might have is probably unhelpful.

This is what I read when I was building that clued me into the fact I had to change Serial to Serial1 to get it working with BT, which you might find helps you to understand the two different interfaces on the Pro Micro, if you don't already know all this that is.

[color=rgb(85, 85, 85)]"You appear to have a "pro micro" style board in which the USB communication is directly sourced from the main ATmega32u4 processor, rather than generated as serial data and then forwarded to a distinct USB-serial converter as on traditional Arduinos.
According to the documentation for the official Arduino Pro Micro:
[/color]

[color=rgb(85, 85, 85)]Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data using the ATmega32U4 hardware serial capability. Note that on the Micro, the Serial class refers to USB (CDC) communication; for TTL serial on pins 0 and 1, use the Serial1 class."[/color]
You could also try asking for help on these forums if you still can't get it working.


https://forum.sparkfun.com/viewforum.php?f=32
http://forum.arduino.cc/index.php


You could also try the drivers from here in case to see if they work any better. There's two downloads halfway down the page under "Installing the Arduino Addon", one for Arduino 1.5+ and one for earlier versions.
https://learn.sparkfun.com/tutorials/pro...okup-guide



I'm a bit further now, I've reprogrammed the HC-05 and rewired it, so now I am using this for serial communication and USB only to upload sketches (gonna replace the USB wire with a USB battery soon).

I get reaction from the headtracker now, luckily. Unfortunately, I get a lot of jittering, where the real axis value is present in one frame, and zero in the next. Only in opentrack, though, it works perfectly in Ftnoir, so I stick with that for the moment.

So bottom line, it works!

Thanks a lot for the help, doveman!
Pages: 1 2 3