mavlink / MAVSDK-Java

MAVSDK client for Java.
68 stars 40 forks source link

Update to mavsdk_server v0.48.0 #78

Closed JonasVautherin closed 2 years ago

JonasVautherin commented 2 years ago

@divyanshu1234: Would you mind trying with those changes? If it works I'll push a new artifact 0.11.0 :+1:.

Resolves #71.

divyanshupundir commented 2 years ago

The mavsdk jar that I am building is not working with the mavsdk-server 0.48.0 or even older ones.

new System(host, port) just doesn't seem to create the channels because the program gets stuck there. I have even updated the proto submodule to the lastest version.

I can't figure out what's wrong because there doesn't seem to be any change in the sdk module code or the protoc code.

JonasVautherin commented 2 years ago

Are you using mavsdk_server at all? Because the changes I've made were there, and I could imagine a segmentation fault or something. But on the sdk side it should be the same as always...

divyanshupundir commented 2 years ago

Oh sorry, I forgot to mention that before trying the mavsdk-server android library, I was just testing the mavsdk jar. For that, I am just running a stand-alone Java program with the mavsdk_server_manylinux2010-x64 binary running separately and connected to SITL (the setting that I normally use for software testing). Maybe I am not building it properly (But it used to work before :confused:).

I could imagine a segmentation fault or something.

Yes, I tried to build and use the mavsdk-server.aar file with the mavsdk-0.10.0 release just now, and I am getting the following when I run it on my phone:

A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 31615 (.android.client), pid 31615 (.android.client)
divyanshupundir commented 2 years ago

I have been trying to make it work, but I am constantly getting NoClassDefFoundError for the grpc and slf4j dependencies, that have been added in the SDK. I'm not sure why they aren't being added to the runtime classpath when the exact same code used to work for earlier versions of mavsdk. Any ideas @JonasVautherin?

divyanshupundir commented 2 years ago

https://github.com/mavlink/MAVSDK-Java/issues/79#issue-1052887840

JonasVautherin commented 2 years ago

A/libc: Fatal signal 11 (SIGSEGV)

ahem I was not initializing the mavsdkServerHandle. Would you mind trying with these changes? Otherwise I'll do it as soon as I can.

I don't really get why the sdk module does not work anymore, though... I haven't changed anything there :thinking:

divyanshupundir commented 2 years ago

ahem I was not initializing the mavsdkServerHandle. Would you mind trying with these changes? Otherwise I'll do it as soon as I can.

Just tried it out. Looks like it is working fine on SITL. It'll take me a few days to try on hardware but that shouldn't be an issue.

I don't really get why the sdk module does not work anymore, though... I haven't changed anything there thinking

I figured out what was wrong (strangely, that program would just get stuck without giving any crash/failure message), and I have documented it in this issue: https://github.com/mavlink/MAVSDK-Java/issues/79 You can label it as documentation if you want, because I remember someone on Slack having a similar problem.

Thanks for making the changes!

divyanshupundir commented 2 years ago

Also, before creating the release, I have opened a PR. Please review it and add it to the release as well.

JonasVautherin commented 2 years ago

Should be out in a few hours :+1: