mavlink / MAVSDK-Java

MAVSDK client for Java.
68 stars 40 forks source link

how to catch the simulator warning message #164

Closed wangpuxia closed 3 weeks ago

wangpuxia commented 3 weeks ago

code like this:

drone.getMission ( ).startMission ( ).doOnError ( err -> logger.info ( " mission start exception : " + err.getMessage ( ) ) ).andThen ( drone.getMission ( ).getMissionProgress ( ).doOnError ( err -> logger.info ( " mission start progress exception : " + err.getMessage ( ) ) ).map ( mission -> { return mission.getCurrent ( ).doubleValue ( ) / mission.getTotal ( ).doubleValue ( ) ;

                } ).distinctUntilChanged ( ) ).subscribe ( percent ->
                {
                    logger.info (String.valueOf ( percent ) ) ;
                } , throwable ->
                {
                    logger.error (  throwable.getMessage ( ) ) ;
                } ) ;

jmavsim simulator console warning : [mission feasibility_checker] First waypoint too far away: 1208m, 900 max

but logger is :mission start exception : UNKNOWN: Denied

how to catch the jmavsim warning message ?

JonasVautherin commented 3 weeks ago

I don't understand your question. The error is:

First waypoint too far away: 1208m, 900 max

If you set a first waypoint closer to the location of the drone, then startMission() should not return an error.

julianoes commented 3 weeks ago

Check parameter: https://docs.px4.io/v1.14/en/advanced_config/parameter_reference.html#MIS_DIST_1WP