{"id":545,"date":"2023-03-30T17:43:06","date_gmt":"2023-03-30T09:43:06","guid":{"rendered":"https:\/\/doc.orionstar.com\/en\/?post_type=lsvr_kba&#038;p=545"},"modified":"2026-11-03T11:00:55","modified_gmt":"2026-11-03T03:00:55","slug":"map-and-position","status":"publish","type":"lsvr_kba","link":"https:\/\/doc.orionstar.com\/en\/knowledge-base\/map-and-position\/","title":{"rendered":"Map and Position"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>Introduction<\/strong><\/p>\n\n\n\n<p>Maps and localization are prerequisites for robot navigation. Creating a map tells the robot the area it can move in, and localization tells the robot where it currently is. The robot&#8217;s built-in &#8220;Map Tool&#8221; can perform all map and map point operations, but you can also implement these functions yourself with the API.<\/p>\n\n\n\n<p>Setting a point: telling the robot the name of its current location, so that you can later navigate to this map point using the API.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Mapping and Localization<\/strong><\/p>\n\n\n\n<p>You can perform mapping and localization with the map tool built into the system.<\/p>\n\n\n\n<p>In map coordinates, x and y are the robot&#8217;s position on the map, and theta is the direction the robot is facing (in radians).<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Localization (Set the Robot&#8217;s Initial Coordinates)<\/strong><\/p>\n\n\n\n<p>Method name:setPoseEstimate<\/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=\"\">try {\n    JSONObject params = new JSONObject();\n    \/\/x coordinate\n    params.put(Definition.JSON_NAVI_POSITION_X, x);\n    \/\/y coordinate\n    params.put(Definition.JSON_NAVI_POSITION_Y, y);\n    \/\/z coordinate\n    params.put(Definition.JSON_NAVI_POSITION_THETA, theta);\n    RobotApi.getInstance().setPoseEstimate(reqId, params.toString(), new CommandListener() {\n        @Override\n        public void onResult(int result, String message) {\n            if (\"succeed\".equals(message)) {\n                \/\/Localization succeeded\n            }\n        }\n    });\n} catch (JSONException e) {\n    e.printStackTrace();\n}<\/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 class=\"has-medium-font-size\"><strong>Check Whether the Robot Is Localized<\/strong><\/p>\n\n\n\n<p>Method name:isRobotEstimate<\/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().isRobotEstimate(reqId, new CommandListener() {\n    @Override\n    public void onResult(int result, String message) {\n        if (!\"true\".equals(message)) {\n            \/\/Not localized\n        } else {\n            \/\/Localized\n        }\n    }\n});<\/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 class=\"has-medium-font-size\"><strong>Set the Name of the Current Location<\/strong><\/p>\n\n\n\n<p>Method name:setLocation<\/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().setLocation(reqId, placeName, new CommandListener() {\n    @Override\n    public void onResult(int result, String message) {\n        if (\"succeed\".equals(message)) {\n            \/\/Location point saved\n        } else {\n            \/\/Failed to save location point\n        }\n    }\n});<\/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>placeName<\/strong>: location name<\/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>Get Coordinates by Location Name<\/strong><\/p>\n\n\n\n<p>Method name: getLocation Usage:<\/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().getLocation(reqId, placeName, new CommandListener() {\n    @Override\n    public void onResult(int result, String message) {\n        try {\n            JSONObject json = new JSONObject(message);\n            \/\/Whether the location exists\n            boolean isExist = json.getBoolean(Definition.JSON_NAVI_SITE_EXIST);\n            if (isExist) {\n                \/\/x coordinate\n                double x = json.getDouble(Definition.JSON_NAVI_POSITION_X);\n                \/\/y coordinate\n                double y = json.getDouble(Definition.JSON_NAVI_POSITION_Y);\n                \/\/Facing direction\n                double z = json.getDouble(Definition.JSON_NAVI_POSITION_THETA);\n            }\n        } catch (JSONException | NullPointerException e) {\n            e.printStackTrace();\n        }\n    }\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>placeName<\/strong>: location name<\/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 class=\"has-vivid-red-color has-text-color\">Note: Locations saved with setLocation are associated with the map. When you retrieve them with getLocation, the same map must be in use; otherwise getLocation fails.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Get All Location Points on the Current Map<\/strong><\/p>\n\n\n\n<p>Method name:getPlaceList<\/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().getPlaceList(reqId, new CommandListener() {\n    @Override\n    public void onResult(int result, String message) {\n        try {\n            JSONArray jsonArray = new JSONArray(message);\n            int length = jsonArray.length();\n            for (int i = 0; i &lt; length; i++) {\n                JSONObject json = jsonArray.getJSONObject(i);\n                \/\/Commonly used\n                json.getString(\"name\"); \/\/Location name\n                json.getDouble(\"x\"); \/\/x coordinate\n                json.getDouble(\"y\"); \/\/y coordinate\n                \/\/Less commonly used\n                json.getDouble(\"theta\"); \/\/Facing direction\n                json.getString(\"id\"); \/\/Location id\n                json.getLong(\"time\");\/\/Update time\n                json.getInt(\"status\"); \/\/0: normal area, reachable 1: no-go area, unreachable 2: outside the map, unreachable\n            }\n        } catch (JSONException | NullPointerException e) {\n            e.printStackTrace();\n        }\n    }\n});<\/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 class=\"has-medium-font-size\"><strong>Get the Robot&#8217;s Current Coordinates<\/strong><\/p>\n\n\n\n<p>Method name:getPosition<\/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().getPosition(reqId, new CommandListener() {\n    @Override\n    public void onResult(int result, String message) {\n        try {\n            JSONObject json = new JSONObject(message);\n            \/\/x coordinate\n            double x = json.getDouble(Definition.JSON_NAVI_POSITION_X);\n            \/\/y coordinate\n            double y = json.getDouble(Definition.JSON_NAVI_POSITION_Y);\n            \/\/Facing direction\n            double z = json.getDouble(Definition.JSON_NAVI_POSITION_THETA);\n        } catch (JSONException | NullPointerException e) {\n            e.printStackTrace();\n        }\n    }\n});<\/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: Make sure the robot is localized before calling this API.<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Check Whether the Robot Is at a Location Point<\/strong><\/p>\n\n\n\n<p>Method name: isRobotInLocations Usage:<\/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 params = new JSONObject();\n    params.put(Definition.JSON_NAVI_TARGET_PLACE_NAME, placeName); \/\/Location name\n    params.put(Definition.JSON_NAVI_COORDINATE_DEVIATION, range); \/\/Location range\n    RobotApi.getInstance().isRobotInlocations(reqId,\n            params.toString(), new CommandListener() {\n                @Override\n                public void onResult(int result, String message) {\n                    try {\n                        JSONObject json = new JSONObject(message);\n                        \/\/Whether the robot is at the target point\n                        json.getBoolean(Definition.JSON_NAVI_IS_IN_LOCATION);\n                    } catch (JSONException e) {\n                        e.printStackTrace();\n                    }\n                }\n            });\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-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>placeName<\/strong>: location name<\/li>\n\n\n\n<li><strong>range<\/strong>: location range, in meters<\/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 class=\"has-medium-font-size\"><strong>Get the Current Map Name<\/strong><\/p>\n\n\n\n<p>Method name: getMapName Usage:<\/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().getMapName(reqId, new CommandListener() {\n    @Override\n    public void onResult(int result, String message) {\n        if (!TextUtils.isEmpty(message)) {\n            \/\/message is the map name\n            String mapName = message;\n        }\n    }\n});<\/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 class=\"has-medium-font-size\"><strong>Listen for Position Status Changes<\/strong><\/p>\n\n\n\n<p>Starts a listener whose callback is triggered when the position or position status changes.<\/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 Pose {\n    public float px, py, theta;\n    public final long time;\n    public String name;\n    \/**\n     * FREE = 0;      \/\/ normal area, reachable\n     * OBSTACLE = 1;  \/\/ no-go area, unreachable\n     * OUTSIDE = 2;   \/\/ outside the map, unreachable\n     *\/\n    public int status;\n    public float distance;\n}\nRobotApi.getInstance().registerStatusListener(Definition.STATUS_POSE,\n    new StatusListener(){\n        @Override\n        public void onStatusUpdate(String type, String value) {\n            Pose pose = GsonUtil.fromJson(value, Pose.class);\n        }\n    });<\/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 class=\"has-medium-font-size\"><strong>Switch Maps<\/strong><\/p>\n\n\n\n<p>Method name: switchMap Usage:<\/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().switchMap(reqId, mapName, new CommandListener(){\n    @Override\n    public void onResult(int result, String message) {\n        if (\"succeed\".equals(message)) {\n            \/\/Map switched successfully\n        }\n    }\n});<\/pre>\n\n\n\n<p>Parameters<\/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><strong>mapName<\/strong>: map name<\/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: You need to relocalize after switching maps.<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Read and Display the Map PGM File (Including Map Point Coordinate Conversion)<\/strong><\/p>\n\n\n\n<p>Reading maps and converting coordinates rely on a complete set of map tools. Sample code:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    \/*\n     * getMap\n     * Get the current map\n     * The map contains the robot's current position, direction coordinates and location points that can be clicked to navigate\n     * Get the current map\n     * The map has current robot position information, direction coordinates and clickable navigation positions\n     * Get the map.pgm file through shared memory\n     * *\/\n    private void getMap(final String name) {\n        Log.d(TAG, \"getMapPgmPFD: mapName=\" + name);\n        \/\/Get the map.pgm file descriptor\n        ParcelFileDescriptor mapPgmPFD = ShareMemoryApi.getInstance().getMapPgmPFD(name);\n        FileDescriptor fd = mapPgmPFD.getFileDescriptor();\n        FileInputStream fileInputStream = new FileInputStream(fd);\n        \/\/Read the data stream from the file descriptor and parse it into a RoverMap (same logic as before)\n        mRoverMap = MapppUtils.loadPFD2RoverMap(fileInputStream);\n        \n        \/\/TODO Custom operations\n        \n        \/\/Release service-layer resources\n        ShareMemoryApi.getInstance().releaseGetMapPgmPFD();\n    }\n\n    \/**\n     * Modify the map.pgm file through shared memory (test code)\n     *\/\n    private void setMapPgmPFD(String mapName\uff0cRoverMap roverMap) {\n        byte[] bytes = MapUtils.saveRoverMapToPFDData(roverMap);\n        boolean result = ShareMemoryApi.getInstance().setMapPgmPFD(mapName, bytesT);\n        Log.d(TAG, \"setMapPgmPFD: result=\" + result);\n    }<\/pre>\n\n\n\n<p>If you need this, copy or refer to the NavFragment code in the sample code. With it, you can read the map and map point information from the robot and display it as shown below.<a href=\"https:\/\/github.com\/OrionStarGIT\/RobotSample\" target=\"_blank\" rel=\"noreferrer noopener\">Download the code<\/a><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/orion-base-test-1256573505.cos.ap-beijing.myqcloud.com\/cn_docs_file\/2022-07-22_15%3A49%3A19_8051658476021_.pic.jpg\" alt=\"\" \/><\/figure><\/div>\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>Enable\/Disable  LiDAR Data Reporting<\/strong><\/p>\n\n\n\n<p>Method name: setNavigationLineData Usage:<\/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().setNavigationLineData(reqId, enabled);<\/pre>\n\n\n\n<p>Parameters<\/p>\n\n\n\n<div class=\"is-layout-flex wp-container-10 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>enabled<\/strong>: true enables LiDAR data reporting; false disables it<\/li>\n<\/ul>\n<\/blockquote>\n<\/div>\n<\/div>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Listen for LiDAR Data<\/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().registerStatusListener(Definition.STATUS_LINE_DATA,\n    new StatusListener(){\n        @Override\n        public void onStatusUpdate(String type, String value) {\n            List&lt;Pose&gt; list = GsonUtil.getGson().fromJson(data, new TypeToken&lt;List&lt;Pose&gt;&gt;() {\n            }.getType());\n        }\n    });<\/pre>\n\n\n\n<p>Note: Data is only reported after you <strong>enable LiDAR data reporting with setNavigationLineData<\/strong>. <strong>When you are done<\/strong>, disable LiDAR data reporting and call unregisterStatusListener to release resources.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Maps and localization are prerequisites for robot navigation. Creating a map tells the robot the area it can move in, and localization tells the robot where it currently is. The robot&#8217;s built-in &#8220;Map Tool&#8221; can perform all map and map point operations, but you can also implement these functions yourself with the API. Setting [&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\/545"}],"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=545"}],"version-history":[{"count":4,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/545\/revisions"}],"predecessor-version":[{"id":965,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/545\/revisions\/965"}],"wp:attachment":[{"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/media?parent=545"}],"wp:term":[{"taxonomy":"lsvr_kba_cat","embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba_cat?post=545"},{"taxonomy":"lsvr_kba_tag","embeddable":true,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba_tag?post=545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}