{"id":547,"date":"2023-03-30T17:44:33","date_gmt":"2023-03-30T09:44:33","guid":{"rendered":"https:\/\/doc.orionstar.com\/en\/?post_type=lsvr_kba&#038;p=547"},"modified":"2024-08-19T18:01:40","modified_gmt":"2024-08-19T10:01:40","slug":"navigation","status":"publish","type":"lsvr_kba","link":"https:\/\/doc.orionstar.com\/en\/knowledge-base\/navigation\/","title":{"rendered":"Navigation"},"content":{"rendered":"\n<h3 id=\"api-reference-navigation-introduction\"><strong>Introduction<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-navigation-introduction\"><\/a><\/h3>\n\n\n\n<p>Navigation refers to the walking ability of the robot. The robot can move from point A to point B. It can automatically plan a route during the walking process, which can effectively avoid obstacles.<\/p>\n\n\n\n<p>There are many sensors used in robot navigation, including bottom lidar, RGBD, head IR sensor (some models), etc., so please do not block these sensors during navigation to avoid problems such as robot not walking, path planning failure, etc.<\/p>\n\n\n\n<p>The premise that the robot can perform navigation actions is that the robot has created a map, and has successfully positioned on the map, and the radar is turned on.&nbsp;Please pay attention to this.<\/p>\n\n\n\n<h3 id=\"api-reference-navigation-navigate-to-the-specified-location\"><strong>Navigate to the specified location<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-navigation-navigate-to-the-specified-location\"><\/a><\/h3>\n\n\n\n<p>Method name: startNavigation<\/p>\n\n\n\n<p>Result callback:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ActionListener navigationListener = new ActionListener() {    \n    @Override \n    public void onResult(int status, String response) throws RemoteException {        \n        switch (status) {            \n            case Definition.RESULT_OK:                \n                if (\"true\".equals(response)) {                    \n                    \/\/navigation is successful                \n                } else {                    \n                    \/\/navigation is failed                \n                }                \n                break;        \n        }    \n    }    \n    @Override \n    public void onError(int errorCode, String errorString) throws RemoteException {\n        switch (errorCode) {            \n            case Definition.ERROR_NOT_ESTIMATE:                \n                \/\/ not currently located                \n                break;            \n            case Definition.ERROR_IN_DESTINATION:                \n                \/\/ robot is already within the destination range                \n                break;            \n            case Definition.ERROR_DESTINATION_NOT_EXIST:                \n                \/\/ navigation destination not exist                \n                break;            \n            case Definition.ERROR_DESTINATION_CAN_NOT_ARRAIVE:                \n                \/\/ obstacle avoidance timeout, so the destination cannot be reached. timeout period can be set through parameter                \n                break;            \n            case Definition.ACTION_RESPONSE_ALREADY_RUN:                \n                \/\/  current api has been called, please stop before calling again                \n                break;            \n            case Definition.ACTION_RESPONSE_REQUEST_RES_ERROR:                \n                \/\/ API that needs to control the chassis has already been called .Please stop first, then continue to call                \n                break;            \n            case Definition.ERROR_MULTI_ROBOT_WAITING_TIMEOUT:                \n                \/\/ one robot waiting for other waiting time out.                \n                break;            \n            case Definition.ERROR_NAVIGATION_FAILED:                \n                \/\/ the other problem caused failed.                \n                break;        \n        }    \n    }    \n    @Override \n    public void onStatusUpdate(int status, String data, String extraData) {\n        switch (status) {            \n            case Definition.STATUS_NAVI_AVOID:                \n                \/\/ the current route has been blocked by obstacles                \n                break;            \n            case Definition.STATUS_NAVI_AVOID_END:                \n                \/\/ obstacle disappeared                \n                break;            \n            case Definition.STATUS_START_NAVIGATION:                \n                \/\/ start navigation                \n                break;            \n            case Definition.STATUS_START_CRUISE:                \n                \/\/ start cruise                \n                break;            \n            case Definition.STATUS_NAVI_OUT_MAP:                \n                \/\/ run out of map                \n                break;            \n            case Definition.STATUS_NAVI_MULTI_ROBOT_WAITING:                \n                \/\/ start waiting for other robots                \n                break;            \n            case Definition.STATUS_NAVI_MULTI_ROBOT_WAITING_END:                \n                \/\/ waiting end                \n                break;            \n            case Definition.STATUS_NAVI_GO_STRAIGHT:                \n                \/\/ start go straight                \n                break;            \n            case Definition.STATUS_NAVI_TURN_LEFT:                \n                \/\/ start turn left                \n                break;            \n            case Definition.STATUS_NAVI_TURN_RIGHT:                \n                \/\/ start turn right                \n                break;        \n        }    \n    }\n};<\/pre>\n\n\n\n<p><strong>How to use the methods:<\/strong><\/p>\n\n\n\n<ol start=\"1\">\n<li>Default navigation speed<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().startNavigation(reqId, destName, coordinateDeviation, time, navigationListener);<\/pre>\n\n\n\n<ol start=\"2\">\n<li>Default navigation speed, specify obstacle avoidance distance (if this value is set to 0, the robot will default to using a value of 0.75). (<strong><em><strong>This calling method is supported in<\/strong> V10<\/em><\/strong>)<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().startNavigation(reqId, destName, coordinateDeviation, obsDistance, time, navigationListener);<\/pre>\n\n\n\n<ol start=\"3\">\n<li>Specify navigation speed (<strong><em><strong>This calling method is supported in V4.12<\/strong><\/em><\/strong>)<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().startNavigation(reqId, destName, coordinateDeviation, time, linearSpeed, angularSpeed, navigationListener);<\/pre>\n\n\n\n<p>4. Specify navigation speed , specify obstacle avoidance distance (if this value is set to 0, the robot will default to using a value of 0.75). (<strong><em><strong>This calling method is supported in<\/strong> V10<\/em><\/strong>)<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().startNavigation(reqId, destName, coordinateDeviation, obsDistance, time, linearSpeed, angularSpeed, navigationListener);<\/pre>\n\n\n\n<p>5. Specify the coordinate point (<strong><em><strong>This calling method is supported in V4.12<\/strong><\/em><\/strong>)<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().startNavigation(reqId, pose, coordinateDeviation, time, navigationListener);<\/pre>\n\n\n\n<p>6. Specify the coordinate point , specify obstacle avoidance distance (if this value is set to 0, the robot will default to using a value of 0.75). (<strong><em><strong>This calling method is supported in<\/strong> V10<\/em><\/strong>)<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().startNavigation(reqId, pose, coordinateDeviation, obsDistance, time, navigationListener);<\/pre>\n\n\n\n<p>7. Specify navigation acceleration (<strong><em><strong>This calling method is supported in V4.12<\/strong><\/em><\/strong>)(This interface only supports Lucki for the time being)<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().startNavigation(reqId, destName, coordinateDeviation, time, linearSpeed, angularSpeed, isAdjustAngle, destinationRange, wheelOverCurrentRetryCount, multipleWaitTime, priority, linearAcceleration, angularAcceleration, navigationListener);<\/pre>\n\n\n\n<p>Parameter Description:<\/p>\n\n\n\n<ul>\n<li>destName: Navigation destination name (must be set by setLocation first)<\/li>\n\n\n\n<li>pose: the coordinate point of the navigation destination<\/li>\n\n\n\n<li>obsDistance: Maximum obstacle avoidance distance, when obstacles are less than this value away from the target, the robot stops. Default is 0.75 meters.<\/li>\n\n\n\n<li>coordinateDeviation: the range of the destination, if the distance to the destination is within this range, it is considered to have been reached<\/li>\n\n\n\n<li>time : Obstacle avoidance timeout time. If the robot&#8217;s moving distance does not exceed 0.1m within this time, the navigation will fail, in milliseconds.<\/li>\n\n\n\n<li>linearSpeed : navigation linear speed, range: 0.1 ~ 0.85 m\/s default value: 0.7 m\/s<\/li>\n\n\n\n<li>angularSpeed : Navigation angular speed, range: 0.4 ~ 1.4 m\/s Default value: 1.2 m\/s The final navigation speed is obtained by combining linear speed and angular speed. Different linear speeds and angular speeds have an impact on the navigation movement mode. It is recommended that the linear speed and Angular speed keeps a certain law: angularSpeed = 0.4 + (linearSpeed-0.1) \/ 3 * 4<\/li>\n\n\n\n<li>isAdjustAngle : Whether to adapt to the angle of the heading at the end of the navigation. If false is passed, it will return to the angle when the point is set<\/li>\n\n\n\n<li>destinationRange : When the target point cannot be reached, the navigation is considered as successful as the distance from the target point<\/li>\n\n\n\n<li>wheelOverCurrentRetryCount: Number of wheel stall attempts during navigation<\/li>\n\n\n\n<li>multipleWaitTime : If there are multiple machines waiting during the navigation process, how long will it time out?<\/li>\n\n\n\n<li>priority : Is 0<\/li>\n\n\n\n<li>linearAcceleration : Navigation line acceleration, range: 0.4 ~ 0.8 m\/s2 Default value: 0.7 m\/s2<\/li>\n\n\n\n<li>angularAcceleration : Navigation angular acceleration, range: 0.4 ~ 0.9 m\/s2 Default value: 0.8 m\/s2 The final navigation angular acceleration velocity is obtained after linear velocity conversion. Different linear accelerations and angular accelerations have an impact on the navigation motion mode. It is recommended that linear acceleration and Angular acceleration maintains a certain law: angularAcceleration= (linearSpeed \/ 0.8)<\/li>\n<\/ul>\n\n\n\n<p><em>Note: Before calling this interface, you need to make sure that it has been located<\/em><\/p>\n\n\n\n<p>Applicable Platform:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>GreetBot<\/th><th>Mini<\/th><th>Lucki<\/th><th>DeliverBot<\/th><th>BigScreenBot<\/th><\/tr><\/thead><tbody><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 id=\"api-reference-navigation-stop-navigating-to-the-specified-location\"><strong>Stop navigating to the specified location<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-navigation-stop-navigating-to-the-specified-location\"><\/a><\/h3>\n\n\n\n<p>Method name: stopNavigation<\/p>\n\n\n\n<p>Calling method:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().stopNavigation(reqId);<\/pre>\n\n\n\n<p><em>Note: This interface can only be used to stop the navigation started by startNavigation<\/em><\/p>\n\n\n\n<p>Applicable Platform:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>GreetBot<\/th><th>Mini<\/th><th>Lucki<\/th><th>DeliverBot<\/th><th>BigScreenBot<\/th><\/tr><\/thead><tbody><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 id=\"api-reference-navigation-navigate-to-the-specified-coordinate-point\"><strong>Navigate to the specified coordinate point<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-navigation-navigate-to-the-specified-coordinate-point\"><\/a><\/h3>\n\n\n\n<p>Note: This method has been deprecated. It is recommended to use the startNavigation interface. The goPosition interface will no longer be maintained.<\/p>\n\n\n\n<p>Method name: goPosition<\/p>\n\n\n\n<p>Result callback:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">CommandListener goPositionListener = new CommandListener() {    \n    @Override\n    public void onResult(int status, String response) {        \n        switch (status) {            \n            case Definition.RESULT_OK:                \n                if (\"true\".equals(response)) {                    \n                    \/\/navigation succeed                \n                } else {                    \n                    \/\/navigation failed                \n                }                \n                break;        \n        }    \n    }\n    @Override\n    public void onError(int errorCode, String errorString) throws RemoteException {    \n        switch (errorCode) {                        \n            case Definition.ACTION_RESPONSE_ALREADY_RUN:            \n                \/\/api has been called, please stop before calling again            \n                break;        \n            case Definition.ACTION_RESPONSE_REQUEST_RES_ERROR:            \n                \/\/ already has an interface call that needs to control the chassis, please stop first, then continue to call            \n                break;    \n        }\n    }\n    @Override\n    public void onStatusUpdate(int status, String data) {    \n        switch (status) {        \n            case Definition.STATUS_NAVI_AVOID:            \n                \/\/the current route has been blocked by obstacles            \n                break;        \n            case Definition.STATUS_NAVI_AVOID_END:            \n                \/\/obstacle disappeared            \n                break;    \n        }\n    }<\/pre>\n\n\n\n<p>Calling method:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Default speed\ntry {    \n    JSONObject position = new JSONObject();    \n    \/\/x coordinate    \n    position.put(Definition.JSON_NAVI_POSITION_X, x);    \n    \/\/y coordinate    \n    position.put(Definition.JSON_NAVI_POSITION_Y, y);    \n    \/\/z coordinate    \n    position.put(Definition.JSON_NAVI_POSITION_THETA, theta);    \n    RobotApi.getInstance().goPosition(reqId, position.toString(), goPositionListener);\n} catch (JSONException e) {    \n    e.printStackTrace();\n} \nSpecify speed &lt;***This calling method is supported in V4.12****&gt;\ntry {    \n    JSONObject position = new JSONObject();    \n    \/\/x coordinate    \n    position.put(Definition.JSON_NAVI_POSITION_X, x);    \n    \/\/y coordinate    \n    position.put(Definition.JSON_NAVI_POSITION_Y, y);    \n    \/\/z coordinate    \n    position.put(Definition.JSON_NAVI_POSITION_THETA, theta);    \n    RobotApi.getInstance().goPosition(reqId, position.toString(),  linearSpeed, angularSpeed, goPositionListener);\n} catch (JSONException e) {    \n    e.printStackTrace();\n}<\/pre>\n\n\n\n<p>Parameter Description:<\/p>\n\n\n\n<ul>\n<li>position : The parameter is the coordinate point in json format {&#8220;x&#8221;: &#8220;x coordinate&#8221;, &#8220;y&#8221;: &#8220;y coordinate&#8221;, &#8220;theta: &#8220;z coordinate&#8221;,}<\/li>\n\n\n\n<li>linearSpeed : navigation linear speed, range: 0.1 ~ 0.85 m\/s default value: 0.7 m\/s<\/li>\n\n\n\n<li>angularSpeed\uff1aNavigation angular speed, range: 0.4 ~ 1.4 m\/s Default value: 1.2 m\/s The final navigation speed is obtained by combining linear speed and angular speed. Different linear speeds and angular speeds have an impact on the navigation movement mode. It is recommended that the linear speed and Angular speed keeps a certain law: angularSpeed \u200b\u200b= 0.4 + (linearSpeed-0.1) \/ 3 * 4<\/li>\n<\/ul>\n\n\n\n<p><em>Note: Before calling this interface, you need to make sure that it has been located<\/em><\/p>\n\n\n\n<p>Applicable Platform:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>GreetBot<\/th><th>Mini<\/th><th>Lucki<\/th><th>DeliverBot<\/th><th>BigScreenBot<\/th><\/tr><\/thead><tbody><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 id=\"api-reference-navigation-stop-navigating-to-the-specified-coordinate-point\"><strong>Stop navigating to the specified coordinate point<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-navigation-stop-navigating-to-the-specified-coordinate-point\"><\/a><\/h3>\n\n\n\n<p>Method name: stopGoPosition<\/p>\n\n\n\n<p>Calling method:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().stopGoPosition(reqId);<\/pre>\n\n\n\n<p><em>Note:&nbsp;<code>goPosition<\/code>&nbsp;and&nbsp;<code>startNavigation<\/code>&nbsp;have a corresponding stop interface, both of which start navigation interfaces, which must be one-to-one correspondence, and cannot be mixed.<\/em><\/p>\n\n\n\n<p>Applicable Platform:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>GreetBot<\/th><th>Mini<\/th><th>Lucki<\/th><th>DeliverBot<\/th><th>BigScreenBot<\/th><\/tr><\/thead><tbody><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 id=\"api-reference-navigation-turn-to-the-direction-of-the-target-point\"><strong>Turn to the direction of the target point<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-navigation-turn-to-the-direction-of-the-target-point\"><\/a><\/h3>\n\n\n\n<p>Method name: resumeSpecialPlaceTheta<\/p>\n\n\n\n<p>Method description: The interface will only rotate left and right to the direction of the target point, and will not actually move to the target point.<\/p>\n\n\n\n<p>Calling method:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RobotApi.getInstance().resumeSpecialPlaceTheta(reqId,    placeName,    new CommandListener() {            \n    @Override \n    public void onResponse(int result, String message) {        \n    }  \n});<\/pre>\n\n\n\n<p>Parameter Description:<\/p>\n\n\n\n<ul>\n<li>reqId : int type command id<\/li>\n\n\n\n<li>placeName : String type target point name<\/li>\n\n\n\n<li>listener : CommandListener type message callback<\/li>\n<\/ul>\n\n\n\n<p>Return value:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">int result 0 command executed \/ -1 not executed<\/pre>\n\n\n\n<p><em>Note: Before calling this interface, you need to make sure that it has been located<\/em><\/p>\n\n\n\n<p>Applicable Platform:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>GreetBot<\/th><th>Mini<\/th><th>Lucki<\/th><th>DeliverBot<\/th><th>BigScreenBot<\/th><\/tr><\/thead><tbody><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 id=\"api-reference-navigation-calculate-path-distance-following-the-route\"><strong>Calculate path distance following the route<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-navigation-calculate-path-distance-following-the-route\"><\/a><\/h4>\n\n\n\n<p>Method name: getNaviPathInfo<\/p>\n\n\n\n<p>Method description: To calculate the path distance between two points under the route navigation mode. Both of the points must in the cruise line.<\/p>\n\n\n\n<p>Calling method:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Pose startPos = new Pose();\nstartPos.setX(-0.22329703f);\nstartPos.setY(1.1073834f);\nstartPos.setTheta(-1.2297891f);\nPose endPos = new Pose();\nendPos.setX(0.09533833f);\nendPos.setY(-0.7406802f);\nendPos.setTheta(-2.886187f);\nRobotApi.getInstance().getNaviPathInfo(reqID, startPos, endPos, new CommandListener() {        \n    @Override \n    public void onResult(int status, String response, String extraData) {            \n        try {                \n            JSONObject json = new JSONObject(response);                \n            double pathLength = json.getDouble(\"pathLength\");            \n        } catch (JSONException e) {                \n            e.printStackTrace();            \n        }        \n    }        \n    @Override \n    public void onError(int errorCode, String errorString, String extraData) {                \n        Log.d('OnError',errorCode);        \n    }    \n});<\/pre>\n\n\n\n<p>Parameter Description:<\/p>\n\n\n\n<ul>\n<li>reqId : int type command id<\/li>\n\n\n\n<li>startPos,endPos : the input points<\/li>\n\n\n\n<li>listener : CommandListener type message callback<\/li>\n<\/ul>\n\n\n\n<p>Return value:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">int result 0 command executed \/ -1 not executed<\/pre>\n\n\n\n<p><em>Note: Before calling this interface, you need to make sure that robot has been located and in cruise mode<\/em><\/p>\n\n\n\n<p>Applicable Platform:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>GreetBot<\/th><th>Mini<\/th><th>Lucki<\/th><th>DeliverBot<\/th><th>BigScreenBot<\/th><\/tr><\/thead><tbody><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Navigation refers to the walking ability of the robot. The robot can move from point A to point B. It can automatically plan a route during the walking process, which can effectively avoid obstacles. There are many sensors used in robot navigation, including bottom lidar, RGBD, head IR sensor (some models), etc., so please [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":[],"lsvr_kba_cat":[6],"lsvr_kba_tag":[],"_links":{"self":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/547"}],"collection":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba"}],"about":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/types\/lsvr_kba"}],"author":[{"embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/comments?post=547"}],"version-history":[{"count":5,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/547\/revisions"}],"predecessor-version":[{"id":775,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/547\/revisions\/775"}],"wp:attachment":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/media?parent=547"}],"wp:term":[{"taxonomy":"lsvr_kba_cat","embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba_cat?post=547"},{"taxonomy":"lsvr_kba_tag","embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba_tag?post=547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}