{"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":"2026-11-17T15:27:31","modified_gmt":"2026-11-17T07:27:31","slug":"navigation","status":"publish","type":"lsvr_kba","link":"https:\/\/doc.orionstar.com\/en\/knowledge-base\/navigation\/","title":{"rendered":"Navigation"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>Introduction<\/strong><\/p>\n\n\n\n<p>Navigation refers to the robot&#8217;s ability to move: the robot can travel from point A to point B, automatically plan its route along the way, and effectively avoid obstacles.<\/p>\n\n\n\n<p>Robot navigation relies on many sensors, including the bottom LiDAR, the RGBD camera and the head IR sensor (on some models). Do not block these sensors during navigation; otherwise the robot may refuse to move or path planning may fail.<\/p>\n\n\n\n<p class=\"has-vivid-red-color has-text-color\">The robot can only navigate if a map has been created, the robot has been successfully localized on that map, and the LiDAR is turned on. Be sure to keep this in mind!<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Navigation Status and Error Code Definitions<\/strong><\/p>\n\n\n\n<p>Reference table of the status and error codes that may occur in the navigation APIs<\/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=\"\">\/\/============================================================\nNavigation status definitions (correspond to onStatusUpdate of navigationListener)\nSTATUS_START_NAVIGATION = 1014; \/\/Navigation started\nSTATUS_START_CRUISE = 1015; \/\/Cruise started\nSTATUS_NAVI_AVOID = 1018; \/\/Obstacle avoidance started\nSTATUS_NAVI_AVOID_END = 1019; \/\/Obstacle avoidance ended\nSTATUS_NAVI_OUT_MAP = 1020; \/\/Moved out of the map; we recommend calling stopNavigation to stop navigation\nSTATUS_NAVI_MULTI_ROBOT_WAITING = 1034; \/\/Waiting for multi-robot dispatching\nSTATUS_NAVI_MULTI_ROBOT_WAITING_END = 1035; \/\/Multi-robot dispatching wait ended\nSTATUS_NAVI_GO_STRAIGHT = 1036; \/\/Started going straight\nSTATUS_NAVI_TURN_LEFT = 1037; \/\/Started turning left\nSTATUS_NAVI_TURN_RIGHT = 1038; \/\/Started turning right\nSTATUS_NAVI_GLOBAL_PATH_FAILED = 1025; \/\/Path planning failed and navigation failed; handle the error. We recommend calling stopNavigation to stop navigation\n\/\/============================================================\nNavigation error code definitions (correspond to onError of navigationListener)\nERROR_DESTINATION_NOT_EXIST = -108; \/\/Destination does not exist\nERROR_DESTINATION_CAN_NOT_ARRAIVE = -109; \/\/Obstacle avoidance timed out; destination unreachable\nERROR_IN_DESTINATION = -113; \/\/Already near the destination\nERROR_NOT_ESTIMATE = -116; \/\/Not localized\nERROR_MULTI_ROBOT_WAITING_TIMEOUT = -125; \/\/Multi-robot dispatching wait timed out\nERROR_NAVIGATION_FAILED = -120; \/\/Navigation failed for other reasons (catch-all failure)\nACTION_RESPONSE_ALREADY_RUN = -1; \/\/This API has already been called; stop it before calling it again\nACTION_RESPONSE_REQUEST_RES_ERROR = -6; \/\/Another API that controls the chassis has already been called; stop it before continuing\n\/\/============================================================<\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Navigate to a Specified Location<\/strong><\/p>\n\n\n\n<p>Method name: startNavigation. 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 succeeded\n                    } else {\n                        \/\/Navigation failed\n                    }\n                    break;\n               case Definition.ACTION_RESPONSE_STOP_SUCCESS:\/\/Navigation task canceled successfully\n                    break;\n            }\n        }\n        @Override public void onError(int errorCode, String errorString) throws RemoteException     {\n            switch (errorCode) {\n                case Definition.ERROR_NOT_ESTIMATE:              \/\/Not localized\n                    break;\n                case Definition.ERROR_IN_DESTINATION:              \/\/The robot is already within the destination range\n                    break;\n                case Definition.ERROR_DESTINATION_NOT_EXIST:              \/\/The navigation destination does not exist\n                    break;\n                case Definition.ERROR_DESTINATION_CAN_NOT_ARRAIVE:\/\/Obstacle avoidance timed out and the destination cannot be reached; the timeout is set by a parameter\n                    break;\n                case Definition.ACTION_RESPONSE_ALREADY_RUN:           \/\/This API has already been called; stop it before calling it again\n                    break;\n                case Definition.ACTION_RESPONSE_REQUEST_RES_ERROR:\/\/Another API that controls the chassis has already been called; stop it before continuing\n                    break;\n            }\n        }\n\n        @Override\n        public void onStatusUpdate(int status, String data, String extraData) {\n            switch (status) {\n                case Definition.STATUS_NAVI_AVOID:               \/\/The current route is blocked by obstacles\n                    break;\n                case Definition.STATUS_NAVI_AVOID_END:               \/\/The obstacle has been removed\n                    break;\n            }\n        }\n}<\/pre>\n\n\n\n<p>How to call:<\/p>\n\n\n\n<ol>\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<p>2. Default navigation speed with a specified obstacle avoidance distance (if this value is set to 0, the robot uses the default value of 0.75) &lt;***This call is supported from V10&gt;***<\/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, navigationListener);<\/pre>\n\n\n\n<p>3. Specified navigation speed &lt;***This call is supported from V4.12&gt;***<\/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, navigationListener);<\/pre>\n\n\n\n<p>4. Specified navigation speed with a specified obstacle avoidance distance (if this value is set to 0, the robot uses the default value of 0.75) &lt;***This call is supported from V10&gt;***<\/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. Specified coordinates &lt;***This call is supported from V4.12&gt;***<\/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. Specified coordinates with a specified obstacle avoidance distance (if this value is set to 0, the robot uses the default value of 0.75) &lt;***This call is supported from V10&gt;***<\/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. Specified navigation acceleration &lt;***This call is supported from V4.12&gt;***<\/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>Parameters:<\/p>\n\n\n\n<div class=\"is-layout-flex wp-container-2 wp-block-columns\">\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:100%\">\n<blockquote class=\"wp-block-quote has-small-font-size\">\n<ul>\n<li><strong>destName<\/strong>: name of the navigation destination (must be set first with setLocation)<\/li>\n\n\n\n<li><strong>pose<\/strong>: coordinates of the navigation destination<\/li>\n\n\n\n<li><strong>obsDistance<\/strong>: maximum obstacle avoidance distance. When an obstacle is closer than this value, the robot stops. The value must be greater than 0. <strong>Default: 0.75<\/strong>. Unit: meters.<\/li>\n\n\n\n<li><strong>coordinateDeviation<\/strong>: pre-check range applied before the navigation API runs. It takes effect only once, at the moment the navigation command is issued. If the robot&#8217;s current position is closer to the destination than this value, it is considered to have arrived, does not actually start moving, and the API returns success immediately. If the distance is greater than or equal to this value, navigation starts normally and the robot travels to the destination (how close counts as arrival is determined by destinationRange). Recommended value: 0.2 meters. Unit: meters.<\/li>\n\n\n\n<li><strong>time<\/strong>: obstacle avoidance timeout. If the robot moves no more than 0.1 m within this time, navigation fails. Unit: milliseconds. <strong>Recommended: 30*1000<\/strong>.<\/li>\n\n\n\n<li><strong>linearSpeed<\/strong>: navigation linear speed. Range: 0.1 ~ 1.2 m\/s\u00a0<strong>Default: 0.7 m\/s<\/strong>.<\/li>\n\n\n\n<li><strong>angularSpeed<\/strong>: navigation angular speed. Range: 0.2 ~ 1.8 rad\/s\u00a0<strong>Default: 1.2 rad\/s<\/strong>\u00a0The final navigation speed is derived from both the linear speed and the angular speed. Different linear and angular speeds affect how the robot moves during navigation, so we recommend keeping them in this relationship: angularSpeed = 0.4 + (linearSpeed &#8211; 0.1) \/ 3 * 4<\/li>\n\n\n\n<li><strong>isAdjustAngle<\/strong>: whether to keep the heading the robot has when navigation ends. If false is passed, the robot turns back to the angle set for the map point.<\/li>\n\n\n\n<li><strong>destinationRange<\/strong>: arrival range for navigation. While actually moving, the robot is considered to have arrived and ends navigation as soon as it is within this distance of the destination (default 0.0, meaning it must reach the center of the map point). When the destination is occupied or its center cannot be reached exactly, this value also determines how far from the destination the robot finally stops. Unit: meters.<\/li>\n\n\n\n<li><strong>wheelOverCurrentRetryCount<\/strong>: number of retries when a wheel stalls during navigation<\/li>\n\n\n\n<li><strong>multipleWaitTime<\/strong>: multi-robot waiting during navigation<\/li>\n\n\n\n<li><strong>priority<\/strong>: 0 by default is fine. Range: 0~30; the larger the value, the higher the priority. Generally used for giving way when multiple robots are navigating<\/li>\n\n\n\n<li><strong>linearAcceleration<\/strong>: navigation linear acceleration. Range: <strong>0.4 ~ 0.8 m\/s\u00b2.<\/strong>\u00a0<strong>Default: 0.7 m\/s\u00b2.<\/strong><\/li>\n\n\n\n<li><strong>angularAcceleration<\/strong>: navigation angular acceleration. Range: <strong>0.4 ~ 0.9 rad\/s\u00b2.<\/strong> <strong>Default: 0.8 rad\/s\u00b2.<\/strong> The final navigation angular acceleration is derived from the linear speed<\/li>\n\n\n\n<li>by conversion. Different linear and angular accelerations affect how the robot moves during navigation, so we recommend keeping them in this relationship: angularAcceleration= (linearSpeed \/ 0.8)<\/li>\n<\/ul>\n<\/blockquote>\n<\/div>\n<\/div>\n\n\n\n<p>Supported platforms:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>GreetingBot<\/td><td>GreetingBot 2<\/td><td>GreetingBot Mini<\/td><td>LuckiBot<\/td><td>LuckiBot Pro<\/td><td>BigScreenBot<\/td><\/tr><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Note: Make sure the robot is localized before calling this API.<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Stop Navigating to a Specified Location<\/strong><\/p>\n\n\n\n<p>Method name: stopNavigation. How to call:<\/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>Supported platforms:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>GreetingBot<\/td><td>GreetingBot 2<\/td><td>GreetingBot Mini<\/td><td>LuckiBot<\/td><td>LuckiBot Pro<\/td><td>BigScreenBot<\/td><\/tr><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Note: This API can only stop navigation started with startNavigation.<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Navigate to Specified Coordinates<\/strong><\/p>\n\n\n\n<p>Note: This method is deprecated. We recommend using startNavigation; the goPosition API is no longer maintained.<\/p>\n\n\n\n<p>Method name: goPosition. 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 succeeded\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                \/\/This API has already been called; stop it before calling it again\n                break;\n            case Definition.ACTION_RESPONSE_REQUEST_RES_ERROR:\n                \/\/Another API that controls the chassis has already been called; stop it before continuing\n                break;\n        }\n    }\n    @Override public void onStatusUpdate(int status, String data) {\n        switch (status) {\n            case Definition.STATUS_NAVI_AVOID:\n            \/\/The current route is blocked by obstacles\n            break;\n            case Definition.STATUS_NAVI_AVOID_END:\n            \/\/The obstacle has been removed\n            break;\n        }\n    }\n}<\/pre>\n\n\n\n<p>How to call:<\/p>\n\n\n\n<ol>\n<li>Default 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=\"\">try {\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}<\/pre>\n\n\n\n<p>2. Specified speed*&lt;***This call is supported from V4.12&gt;****<\/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=\"\">try {\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>Parameters<\/p>\n\n\n\n<div class=\"is-layout-flex wp-container-4 wp-block-columns\">\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:100%\">\n<blockquote class=\"wp-block-quote has-small-font-size\">\n<ul>\n<li><strong>position<\/strong>: coordinates 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><strong>linearSpeed<\/strong>: navigation linear speed. Range: 0.1 ~ 0.85 m\/s. Default: 0.7 m\/s<\/li>\n\n\n\n<li><strong>angularSpeed<\/strong>: navigation angular speed. Range: 0.4 ~ 1.4 m\/s. Default: 1.2 m\/s. The final navigation speed is derived from both the linear speed and the angular speed. Different linear and angular speeds affect how the robot moves during navigation, so we recommend keeping them in this relationship: angularSpeed = 0.4 + (linearSpeed &#8211; 0.1) \/ 3 * 4<\/li>\n<\/ul>\n<\/blockquote>\n<\/div>\n<\/div>\n\n\n\n<p>Supported platforms:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>GreetingBot<\/td><td>GreetingBot 2<\/td><td>GreetingBot Mini<\/td><td>LuckiBot<\/td><td>LuckiBot Pro<\/td><td>BigScreenBot<\/td><\/tr><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Note: Make sure the robot is localized before calling this API.<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Stop Navigating to Specified Coordinates<\/strong><\/p>\n\n\n\n<p>Method name: stopGoPosition. How to call:<\/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>Supported platforms:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>GreetingBot<\/td><td>GreetingBot 2<\/td><td>GreetingBot Mini<\/td><td>LuckiBot<\/td><td>LuckiBot Pro<\/td><td>BigScreenBot<\/td><\/tr><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Note: The two APIs that start navigation, goPosition and startNavigation, each have a corresponding stop API. Always use the matching pair; do not mix them.<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Turn Toward a Target Point<\/strong><\/p>\n\n\n\n<p>Method name: resumeSpecialPlaceTheta<\/p>\n\n\n\n<p>Description: This API only turns the robot left or right to face the target point; it does not actually move to the target point.<\/p>\n\n\n\n<p>How to call:<\/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,\n    placeName,\n    new CommandListener() {\n        @Override\n        public void onResponse(int result, String message) {\n        }\n  });<\/pre>\n\n\n\n<p>Parameters<\/p>\n\n\n\n<div class=\"is-layout-flex wp-container-6 wp-block-columns\">\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:100%\">\n<blockquote class=\"wp-block-quote has-small-font-size\">\n<ul>\n<li><strong>reqId<\/strong>: int, command ID<\/li>\n\n\n\n<li><strong>placeName<\/strong>: String, target point name<\/li>\n\n\n\n<li><strong>listener<\/strong>: CommandListener, message callback<\/li>\n<\/ul>\n<\/blockquote>\n<\/div>\n<\/div>\n\n\n\n<p>Return value<\/p>\n\n\n\n<div class=\"is-layout-flex wp-container-8 wp-block-columns\">\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:100%\">\n<blockquote class=\"wp-block-quote has-small-font-size\">\n<ul>\n<li>int result 0: command executed \/ -1: not executed<\/li>\n<\/ul>\n<\/blockquote>\n<\/div>\n<\/div>\n\n\n\n<p>Supported platforms:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>GreetingBot<\/td><td>GreetingBot 2<\/td><td>GreetingBot Mini<\/td><td>LuckiBot<\/td><td>LuckiBot Pro<\/td><td>BigScreenBot<\/td><\/tr><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Note: Make sure the robot is localized before calling this API.<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Calculate the Distance Between Two Points in Line-Following Mode<\/strong><\/p>\n\n\n\n<p>Use this API to get the distance between two points (only for calculating the distance between two points on the line-following path in line-following mode).<\/p>\n\n\n\n<p>Method name: getNaviPathInfo<\/p>\n\n\n\n<p>Description: Calculates the distance between two points on the line-following path in line-following mode. The points passed in can be any points on the line-following path. You can get information about the points marked on the map through the map point APIs.<\/p>\n\n\n\n<p>How to call:<\/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=\"\">\/\/Both the start point and the end point must be on the line-following path, and line-following mode must be enabled on the robot\nPose 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);\n\/\/Use this API to get the path length, in meters\nRobotApi.getInstance().getNaviPathInfo(reqID,\n    startPos,\n    endPos,\n    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<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>GreetingBot<\/td><td>GreetingBot 2<\/td><td>GreetingBot Mini<\/td><td>LuckiBot<\/td><td>LuckiBot Pro<\/td><td>BigScreenBot<\/td><\/tr><tr><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>Yes<\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Set the Robot&#8217;s Acceleration and Deceleration Mode<\/strong><\/p>\n\n\n\n<p>When developing for LuckiBot, you can globally configure the robot&#8217;s acceleration and braking deceleration to suit your current business needs. Configure it as follows:<\/p>\n\n\n\n<p>1. Add the following permission to your app<\/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=\"\">&lt;uses-permission android:name=\"com.ainirobot.coreservice.robotSettingProvider\" \/><\/pre>\n\n\n\n<p>2. Use this method in your code to change the setting<\/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=\"\">public class NavigationSettings {\n    \/\/value \"1\" - \"3\"  1 gentle, 2 normal, 3 urgent\n    public static final String ROBOT_SETTING_NAVIGATION_BREAK_MODE_LEVEL = \"robot_setting_navigation_break_mode_level\";\n    \/\/value \"1\" - \"3\" 1 gentle, 2 normal, 3 urgent\n    public static final String ROBOT_SETTING_NAVIGATION_START_MODE_LEVEL = \"robot_setting_navigation_start_mode_level\";\n    public NavigationSettings(){\n    }\n    public void setBreakModeLevel(int i){\n        i = i > 3 ? 3 : Math.max(i, 1);\n        putString(ROBOT_SETTING_NAVIGATION_BREAK_MODE_LEVEL,\"\"+i);\n    }\n    public void setStartModeLevel(int i){\n        i = i > 3 ? 3 : Math.max(i, 1);\n        putString(ROBOT_SETTING_NAVIGATION_START_MODE_LEVEL,\"\"+i);\n    }\n    private void  putString(String key ,String value) {\n        if(value == \"\"){\n            return;\n        }\n        try {\n            sendSettingBroadcast(key, value);\n            \/\/Settings.Global.putString(mContext.getContentResolver(), key, value);\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n    private void sendSettingBroadcast(String key,String value) {\n        RobotSettingApi.getInstance().setRobotString(key,value);\n    }\n}<\/pre>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>GreetingBot<\/td><td>GreetingBot 2<\/td><td>GreetingBot Mini<\/td><td>LuckiBot<\/td><td>LuckiBot Pro<\/td><td>BigScreenBot<\/td><\/tr><tr><td>No<\/td><td>No<\/td><td>No<\/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 robot&#8217;s ability to move: the robot can travel from point A to point B, automatically plan its route along the way, and effectively avoid obstacles. Robot navigation relies on many sensors, including the bottom LiDAR, the RGBD camera and the head IR sensor (on some models). Do not block these [&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":10,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/547\/revisions"}],"predecessor-version":[{"id":978,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/547\/revisions\/978"}],"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}]}}