robotdotnet / NetworkTables

FRC NetworkTables for .NET. This is all old code and should not be used anymore.
3 stars 5 forks source link

NetworkTables in Unity on Linux #85

Open kinahawi opened 3 years ago

kinahawi commented 3 years ago

More of a question than an issue (sorry). Have you integrated your c# NetworkTables into Unity3D? I'm a mentor for a team in CT and am trying to build a simulation environment in Unity given that we can't meet in person due to the pandemic. I'm using WPIs robot simulation that relies on Network tables underneath the HAL and want to read/write the network tables from C# code in Unity. I'm using a Linux (Ubuntu) platform ATM and have been able to build your code in VSCode and have brought enough of the DLLs into Unity as plugins so that it doesn't complain when building. When I run in Unity, I can create an instance and ask it for tables/entries, but no Joy on actually getting data. Thanks in advance for any suggestions you have. I really appreciate all you've done here!

ThadHouse commented 3 years ago

I've never tested it, and all of this code in this repo is a few years old, and I'm not planning on updating it. The cost to maintain a completely managed implementation is just too high for me currently.

If you want to test, you'd have to step through with a debugger to see if any data is getting received.

The newest copy of the wrappers around the native code are located here. https://github.com/robotdotnet/WPILib/tree/d53fdc27fdd887169d56d83cf436fb82ebe6c157

You need to use that specific commit, as newer commits 100% will never work in unity.

kinahawi commented 3 years ago

Thanks for the quick reply. I'll dig in a little deeper and see what I can do.

ThadHouse commented 3 years ago

I'll work this weekend on making a binary of just NT that should work across platforms.

kinahawi commented 3 years ago

I got it to work. Turns out I need to wait a short time after the start client call before trying to get entries. Let me know if you want more details on what I had to do to integrate with Unity. I’ll be trying the same thing on windows for other team members shortly.

Thanks for all you do and sharing it with the community!

Sent from my iPad

On Nov 20, 2020, at 4:56 PM, Thad House notifications@github.com wrote:

 I'll work this weekend on making a binary of just NT that should work across platforms.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.