Combining Single Antenna GPS + IMU

UDP is unreliable !!!

1 Like

UDP shield cost more then nano it self, and other network infra thats makes things complex for end user as ip adress settings for modules ading ruter box, combining packets to push all at once and other network related problems. But its open sorce you can fix up serial :smiley:

1 Like

Can you elaborate a bit?
Does it look easy to fix?

I’m developing my own program (from a blank page) in C#.
And I am also facing the same problem as AOG.
My serial port is not following. Every time I want to increase my update rate, the buffer doesn’t empty fast enough and I can’t synchronize the IMU!

I did some research and came across a few articles about this response time issue.

https://www.codeproject.com/Articles/110670/Improving-the-Performance-of-Serial-Ports-Using-C

I don’t have all the articles here, I’ll let you know, I think it’s something doable.

How so? many many hours of flawless UDP already.

Also have re written panda to accept GGA over UDP.

I understand they use “unreliable” as a talking point describing tcp vs udp, but reality is very different. UDP is fast, as long as data is full speed chance of collision on small network is close to zero even without adding timing management.

2 Likes

I agree, even in an article I read, it was mentioned that UDP would be more useful instead of the CAN protocol used in cars.

That’s where I’m at. Got Panda working but no GGA . Can you shine some light on how you went about that?

In normal PANDA GGA is fed in over serial Uart1, so the F9P has to be fairy close to the teensy4.1 or right beside it on the board. You need to configure the F9P to do this.

Ive modified Panda to take GGA over UDP, works on the bench still needs to be tested on tractor.

Learned how to program the UDP connection by comparing how it was done in a program @CommonRail sent me.

1 Like

Unreliable is a bit of a misnomer. UDP originally stood for “unreliable datagram protocol” which really means there is no underlying connection protocol. There’s no serial number on the packet so no guaranteed order, no acknowledgement of receipt and retransmission. Thus UDP has very little overhead and is quite fast with low latency. As far as “reliability” is concerned, UDP is no less reliable than serial. In fact, from a programmer’s point of view, CAN and j1939 is not really all that different than UDP. Both have the advantage of using one bus to allow many nodes to communicate, unlike serial.

The nice thing about breaking out AgIO to its own service is that it’s much easier to modify it to fit your needs, be it going back to serial, or maybe talking to a USB to CAN interface and communicating directly with a tractor’s built-in autosteer hardware and GPS receiver without any Teensy at all.

2 Likes

Sounds like I’ve been spoiled by Qt. Never had any issues with event-driven serial port handling in Qt. Functionally identical to UDP handling as well.

Now I got you. In my case T got Panda working and have everything in one enclosure. AOGF is getting NDA messages but no GGA messages. Does the vehicle need to be in motion for GGA messages or do they still need to feed to AOG via USB from the F9P?

If your approach works that would be pretty cool, though.

The F9P needs to be configured to output GGA at 10hz on uart1 in your case.

it does, used the config file that was shared. GGA is still empty. Used the Panda 5.5 version. 5.6 would not show up on UDP at all.

Does the teensy blink?

GGA will be empty with PANDA, it strips the info out and sends the new PANDA sentence to AgIO. GGA does not leave the teensy.

Yes, it blinks. I get the NDA sentence. For some reason I thought I need the GGA message as well.
I saw it one of Brains Videos that he had both going.
Thanks Bud!

1 Like

Chance of collision is zero in a wired and switched ethernet environment, switched ethernet is full duplex, thus allowing simultaneous transmits and receives. WiFi however, may be vulnerable for collisions.

1 Like

Where do you set theese settings?I cant find it in ino file.
I have chinese bno and i want to try to set like this to try.

Thanks.

That is the delay to read Bno from last gga, in Panda teensy code using I2C to read Bno.

The timing if using RVC and 100hz imu is around 40ms.

But i cant find it in code,i open teensy ino and searched but i do not see it

Here is the location from the V5.5 Teensy Panda firmware, on the autosteer main tab.

1 Like