Closed Sefibrah closed 3 months ago
What's running on the rover? PX4 or ArduRover?
ArduRover! e.g. I use cd ~/ardupilot/Rover && sim_vehicle.py --map --console --model JSON -D --out udpin:192.168.1.100:14550 -f gazebo-rover
to boot it up.
Ok, do you get the mavsdk_server log output? If so, can you set the env variable MAVSDK_MISSION_TRANSFER_DEBUGGING=1
? That might give you more info.
Where do I put that @julianoes? Tried searching for it, couldn't find explanations or examples of it...
Are you perhaps talking about these logs from LogCat:
2024-06-24 12:27:44.572 7994-8173 Mavsdk io.ionic.starter W timeout: retries exceeded
2024-06-24 12:27:44.605 7994-8186 LOG_RoverM...munication io.ionic.starter E Failed to upload the mission
io.mavsdk.mission_raw.MissionRaw$MissionRawException: TIMEOUT: Timeout
at io.mavsdk.mission_raw.MissionRaw$1.onNext(MissionRaw.java:497)
at io.mavsdk.mission_raw.MissionRaw$1.onNext(MissionRaw.java:490)
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage(ClientCalls.java:468)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInternal(ClientCallImpl.java:667)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:654)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
2024-06-24 12:27:52.886 7994-8175 Mavsdk io.ionic.starter D MAVLink: warning: Mission upload timeout
2024-06-24 12:27:52.886 7994-8120 Mavsdk io.ionic.starter D MAVLink: warning: Mission upload timeout
or perhaps these logs from the sim_vehicle.py --console
thing:
Got MISSION_ACK: TYPE_MISSION: OPERATION_CANCELLED
AP: Mission upload timeout
or perhaps I just need to put that environment variable in my .zshrc
or .bashrc
?
I've noticed that it could be due to connection issues. Apparently, receiving data is not the same as sending data, right? They have their separate ports, or addresses? Does that mean that when I do this combination:
private void initializeServerAndRover(@NonNull String systemAddress) {
MavsdkEventQueue.executor().execute(() -> {
mMavsdkServer = new MavsdkServer();
int mavsdkServerPort = mMavsdkServer.run("udp://192.168.1.100:14550");
mRover = new io.mavsdk.System("localhost", mavsdkServerPort);
Log.d(TAG, "Rover is initialized!");
// other stuff
});
}
followed by
sim_vehicle.py -D -f gazebo-rover --model JSON --out udpin:192.168.1.100:14550 --map --console
I only really account for the RECEPTION of data, but when I try to send data (like my mission), I get TIMEOUT: Timeout
very quickly. Could this be it? Or am I completely misinterpreting this...
EDIT:
I don't think this is the issue, I was able to send mRover.getAction().arm().subscribe()
and it armed my rover... So the connection is both ways, but not for bloody missions...
MAVSDK_MISSION_TRANSFER_DEBUGGING=1
Is this a Docker env? I am not using Docker? Just ArduRover, my laptop, and my phone.
I think I have the same issue as this guy did here, but he says that it's fixed for him?
I explictly wrote what I've done - I've updated MAVSDK as https://github.com/mavlink/MAVSDK/commit/30d2693417fe2afdfe494ace3e0f5b8ee5331f03 fixes the issue...
But I am using implementation 'io.mavsdk:mavsdk-server:2.0.0'
instead of mavsdk_server
from brew install mavsdk
like you... I guess I need to wait for the update here as well? @julianoes @JonasVautherin when's the update? Or maybe you can guide me on helping you push this fix that @chehrlic mentioned? Or maybe it's already inside, I just don't know how to access it?
I posted a PR @julianoes @JonasVautherin, please check it 😭
Tried running the mavsdk_server
locally on v2.12.2, and the mission got through! So I guess that the issue is fixed. Please accept my PR.
All that's left is just for the maintainers to push the PR to Maven, so I'll close this issue...
I am losing hope. I've been desperately searching about this, but nothing useful is coming up.
I have a SITL ArduRover, and my Android device (Redmi Note 8) running my own lil' Android app, and I manage to connect them through UDP perfectly. I am subscribing to the SITL Rover's position and battery value changes, and I display them on the device screen reactively. That's running smoothly.
The problem is this: I can't upload a damn mission! I am getting timeout errors after roughly 1-3 seconds passing! Is this normal?
To make matters worse, I used QGC to upload a mission to my SITL Rover, and that worked smoothly. I downloaded the mission plan file, tried to copy it to the best of my abilities, but it's failing too...
Anyway, I hope that the information below will give you enough context to help me...
Here are my dependencies:
Here's my code, heavily inspired by this method from source code:
Here's the error message I receive:
I am writing this in hopes of help, as I am genuinely on the edge of losing my mind! Thanks to anyone who helps, and I apologise for tagging you @JonasVautherin, but you did mention that you have a lot of experience with
MissionRaw
and that you know people who use it, so I wanted to bring this to your attention first. Please forgive me.Best Regards, Ibrahim Sefer