{"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":"2023-05-24T11:02:53","modified_gmt":"2023-05-24T03:02:53","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<h3 id=\"api-reference-map-and-position-introduction\"><strong>Introduction<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-introduction\"><\/a><\/h3>\n\n\n\n<p>Maps and positioning are the prerequisites for robot navigation. Creating a new map is equivalent to telling the robot&#8217;s walking range, and positioning is equivalent to telling the robot&#8217;s current location. The robot comes with a &#8220;map tool&#8221; that can complete all map and point operations, of course, you can also use the api to complete the function yourself.<\/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=\"\">Set point:inform robot the name of the current point, and then you can use the interface to navigate to this point<\/pre>\n\n\n\n<h3 id=\"api-reference-map-and-position-mapping-and-positioning\"><strong>Mapping and positioning<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-mapping-and-positioning\"><\/a><\/h3>\n\n\n\n<p>Mapping and positioning can be operated with the integrated map tool on the robot.<\/p>\n\n\n\n<h3 id=\"api-reference-map-and-position-positioning-set-the-initial-coordinate-point-of-the-robot\"><strong>Positioning (set the initial coordinate point of the robot)<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-positioning-set-the-initial-coordinate-point-of-the-robot\"><\/a><\/h3>\n\n\n\n<p>Method name: setPoseEstimate<\/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=\"\">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                \/\/Successful positioning            \n            }        \n        }    \n    });\n} catch (JSONException e) {    \n    e.printStackTrace();\n}<\/pre>\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-map-and-position-determine-whether-it-is-currently-located\"><strong>Determine whether it is currently located<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-determine-whether-it-is-currently-located\"><\/a><\/h3>\n\n\n\n<p>Method name: isRobotEstimate<\/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().isRobotEstimate(reqId, new CommandListener() {    \n    @Override \n    public void onResult(int result, String message) {        \n        if (!\"true\".equals(message)) {            \n            \/\/currently not located        \n        } else {            \n            \/\/currently located        \n        }    \n    }\n});<\/pre>\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-map-and-position-set-current-location-name\"><strong>Set current location name<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-set-current-location-name\"><\/a><\/h3>\n\n\n\n<p>Method name: setLocation<\/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().setLocation(reqId, placeName, new CommandListener() {    \n    @Override \n    public void onResult(int result, String message) {        \n        if (\"succeed\".equals(message)) {            \n            \/\/save the location point successfully        \n        } else {            \n            \/\/failed to save location point        \n        }    \n    }\n});<\/pre>\n\n\n\n<p>Parameter Description:<\/p>\n\n\n\n<ul>\n<li>placeName : location name<\/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-map-and-position-get-coordinate-points-based-on-location-name\"><strong>Get coordinate points based on location name<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-get-coordinate-points-based-on-location-name\"><\/a><\/h3>\n\n\n\n<p>Method name: getLocation<\/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().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 exist            \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                \/\/z coordinate                \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>Parameter Description:<\/p>\n\n\n\n<ul>\n<li>placeName : location name<\/li>\n<\/ul>\n\n\n\n<p><em>Note: The location saved by setLocation will be associated with the map, and the same map should be maintained when getting via getLocation, otherwise getLocation fails to get<\/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-map-and-position-remove-location-point\"><strong>Remove location point<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-remove-location-point\"><\/a><\/h3>\n\n\n\n<p>Method name: removeLocation<\/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().removeLocation(reqId, placeName, new CommandListener() {    \n    @Override \n    public void onResult(int result, String message) {        \n        if (\"succeed\".equals(message)) {            \n            \/\/removeLocation successful        \n        } else {            \n            \/\/removeLocation failed        \n        }    \n    }\n});<\/pre>\n\n\n\n<p>Parameter Description:<\/p>\n\n\n\n<ul>\n<li>placeName: place name<\/li>\n<\/ul>\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-map-and-position-get-all-location-points-on-the-current-map\"><strong>Get all location points on the current map<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-get-all-location-points-on-the-current-map\"><\/a><\/h3>\n\n\n\n<p>Method name: getPlaceList<\/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().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                json.getDouble(\"x\"); \n                \/\/x coordinate                \n                json.getDouble(\"y\"); \n                \/\/y coordinate                \n                json.getDouble(\"theta\"); \n                \/\/z coordinate                \n                json.getString(\"name\"); \n                \/\/position name            \n            }        \n        } catch (JSONException | NullPointerException e) {            \n            e.printStackTrace();        \n        }    \n    }\n});<\/pre>\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-map-and-position-get-the-current-coordinate-point-of-the-robot\"><strong>Get the current coordinate point of the robot<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-get-the-current-coordinate-point-of-the-robot\"><\/a><\/h4>\n\n\n\n<p>Method name: getPosition<\/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().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            \/\/z coordinate            \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><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-map-and-position-determine-whether-the-robot-is-at-the-position\"><strong>Determine whether the robot is at the position<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-determine-whether-the-robot-is-at-the-position\"><\/a><\/h3>\n\n\n\n<p>Method name: isRobotInLocations<\/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=\"\">try {    \n    JSONObject params = new JSONObject();    \n    params.put(Definition.JSON_NAVI_TARGET_PLACE_NAME, placeName); \/\/position name        \n    params.put(Definition.JSON_NAVI_COORDINATE_DEVIATION, range); \/\/position range        \n    RobotApi.getInstance().isRobotInlocations(reqId, params.toString(), new CommandListener() {                    \n    @Override \n    public void onResult(int result, String message) {                    \n            try {                        \n                JSONObject json = new JSONObject(message);                        \n                \/\/whether or not 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>Parameter Description:<\/p>\n\n\n\n<ul>\n<li>placeName : location name<\/li>\n\n\n\n<li>range : position range, unit m<\/li>\n<\/ul>\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-map-and-position-get-the-current-map-name\"><strong>Get the current map name<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-get-the-current-map-name\"><\/a><\/h3>\n\n\n\n<p>Method name: getMapName<\/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().getMapName(reqId, new CommandListener() {    \n    @Override \n    public void onResult(int result, String message) {        \n        if (!TextUtils.isEmpty(message)) {            \n            \/\/\"message\" means map name            \n            String mapName = message;        \n        }    \n    }\n});<\/pre>\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-map-and-position-pose-listener\"><strong>Pose listener<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-pose-listener\"><\/a><\/h3>\n\n\n\n<p>This is a listener about post event, when post change or pose status change, it will trigger this listener.<\/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     * SAFE = 0;      \/\/ normal area     \n     * NOT_SAFE = 1;  \/\/ dangerous area     \n     * OBSTACLE = 2;  \/\/ forbidden area     \n     * OUTSIDE = 3;   \/\/ out of the map     \n     *\/    \n    public int status;    \n    public float distance;\n}\nRobotApi.getInstance().registerStatusListener(Definition.STATUS_POSE,    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<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-map-and-position-switch-map\"><strong>Switch map<\/strong><a href=\"https:\/\/ainirobot.gatsbyjs.io\/docs\/apk\/apk-development\/#api-reference-map-and-position-switch-map\"><\/a><\/h3>\n\n\n\n<p>Method name: switchMap<\/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().switchMap(reqId, mapName, new CommandListener(){    \n    @Override \n    public void onResult(int result, String message) {        \n        if (\"succeed\".equals(message)) {            \n            \/\/switch map succeed        \n        }    \n    }\n});<\/pre>\n\n\n\n<p>Parameter Description:<\/p>\n\n\n\n<ul>\n<li>mapName : the name of the map<\/li>\n<\/ul>\n\n\n\n<p><em>Note: You need to relocate after switching the map<\/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<p>Note: Relocation is required after switching maps<\/p>\n\n\n\n<h3><strong>Read the PGM file of the map and display it (including point coordinate conversion)<\/strong><\/h3>\n\n\n\n<p>Reading maps and coordinate conversion are supported by a complete set of map tools, all of which are located in the following locations in the sample code.<\/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=\"\">    \/*\n     * getMap\n     * Get the current map\n     * The map has current robot position information, direction coordinates and clickable navigation positions\n     * Get map.pgm file in shared memory\n     * *\/\n    private void getMap(final String name) {\n        Log.d(TAG, \"getMapPgmPFD: mapName=\" + name);\n        \/\/Get 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 (this logic is the same as before)\n        mRoverMap = MapppUtils.loadPFD2RoverMap(fileInputStream);\n        \n        \/\/TODO Custom Actions\n        \n        \/\/Release service layer resources\n        ShareMemoryApi.getInstance().releaseGetMapPgmPFD();\n    }\n\n    \/**\n     * Modify the map.pgm file in shared memory and test the 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 there are any related requirements, please copy or refer to the NavFragment section of the example code. Finally, the map and point information in the robot can be read out and displayed in the following form. <a href=\"https:\/\/github.com\/OrionStarGIT\/RobotSample\">Download Code<\/a><\/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 Maps and positioning are the prerequisites for robot navigation. Creating a new map is equivalent to telling the robot&#8217;s walking range, and positioning is equivalent to telling the robot&#8217;s current location. The robot comes with a &#8220;map tool&#8221; that can complete all map and point operations, of course, you can also use the api [&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":3,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/545\/revisions"}],"predecessor-version":[{"id":607,"href":"https:\/\/doc.orionstar.com\/en\/wp-json\/wp\/v2\/lsvr_kba\/545\/revisions\/607"}],"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}]}}