Closed enymuss closed 4 years ago
The example runs System drone = new System();
, which will by default connect to mavsdk_server
on port 50051.
So you should run mavsdk_server -p 50051
instead. Without the -p <port>
argument, mavsdk_server
starts on a random port, in your logs above it's 51959.
[05:03:24|Info ] Server set to listen on 0.0.0.0:51959 (grpc_server.cpp:39)
If that helps, would you mind contributing to the documentation to make that clearer? Just opening a PR on the README.md would be super helpful already!
@enymuss: Thanks a lot for the PR! Can we close this issue?
@JonasVautherin Yes, thank you for the help.
Hello,
Looking for help to fix this issue, to find the bug in how the java-client has been set up on my local machine. Going through the java-client example, mavsdk_server and headless gazebo runs, but
./gradlew setRtlAltitude
comes up with an error.MAVSDK server runs and connects to Gazebo.
Running headless gazebo:
docker run --rm -it jonasvautherin/px4-gazebo-headless:v1.10.1
QGroundControl connects and I am able to Take Off and Land manually through QGroundControl. INFO output is printed for PX4 and MAVSDK server, showing take off and landing took place.
./gradlew takeoffAndLand
builds successfully, but maybe it is a silent fail, as nothing shows up in QGroundControl controller, mavsdk_server or simulator logs.Output with error from running
./gradlew setRtlAltitude
This is a clean build with the most recent git commits. Mavsdk_server was built from the master branch, with the same settings as outlined for building for macOS release in GitHub workflow main.yaml file.
Java version:
Proto version:
proto (b34da69)