@ray-js/robot-map-sdk 0.0.3-beta-55 → 0.0.3-beta-57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constant/methods.js +1 -1
- package/dist/index.d.ts +120 -14
- package/dist/index.rjs.js +1 -1
- package/dist-app/assets/{index-CIU7VTeR.js → index-BuYDmyTb.js} +1 -1
- package/dist-app/index.html +1 -1
- package/dist-docs/404.html +2 -2
- package/dist-docs/assets/{app.BqtQqMPJ.js → app.DMzJUpqg.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.Dxh5fsqc.js +1 -0
- package/dist-docs/assets/chunks/{VPLocalSearchBox.BRiWwrmO.js → VPLocalSearchBox.HEVPP9qv.js} +1 -1
- package/dist-docs/assets/chunks/{theme.CLoQSFj4.js → theme.BwkK5uAQ.js} +2 -2
- package/dist-docs/assets/{guide_getting-started.md.Cj71jl-y.js → guide_getting-started.md.xZ4KViU0.js} +1 -1
- package/dist-docs/assets/{reference_methods.md.DxIWUIJ-.js → reference_methods.md.Cl2prV6n.js} +57 -3
- package/dist-docs/assets/reference_methods.md.Cl2prV6n.lean.js +1 -0
- package/dist-docs/guide/advanced-usage.html +3 -3
- package/dist-docs/guide/concepts.html +3 -3
- package/dist-docs/guide/getting-started.html +5 -5
- package/dist-docs/hashmap.json +1 -1
- package/dist-docs/index.html +3 -3
- package/dist-docs/reference/callbacks.html +3 -3
- package/dist-docs/reference/config.html +3 -3
- package/dist-docs/reference/data.html +3 -3
- package/dist-docs/reference/methods.html +60 -6
- package/dist-docs/reference/runtime.html +3 -3
- package/dist-docs/reference/types.html +3 -3
- package/dist-docs/reference/utils.html +3 -3
- package/package.json +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.DBKc9sEm.js +0 -1
- package/dist-docs/assets/reference_methods.md.DxIWUIJ-.lean.js +0 -1
- /package/dist-docs/assets/{guide_getting-started.md.Cj71jl-y.lean.js → guide_getting-started.md.xZ4KViU0.lean.js} +0 -0
package/dist/constant/methods.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=["areRoomsAdjacent","getForbiddenSweepZones","getForbiddenMopZones","getCleanZones","getVirtualWalls","getSpots","getWayPoints","getViewportCenterPoint","getMapCenterPoint","getWallPointsByViewportCenter","getForbiddenSweepZonePointsByViewportCenter","getForbiddenMopZonePointsByViewportCenter","getCleanZonePointsByViewportCenter","getSpotPointByViewportCenter","getEffectiveDividerPoints","getDividerEndPoints","isNearChargerOrRobot","isPointInAnyRoom","resetPanZoom","snapshot","snapshotByData"],o=["onMapFirstDrawed","onMapDrawed","onPathDrawed","onRoomPropertiesDrawed","onClickRoom","onClickRoomProperties","onRemoveForbiddenSweepZone","onRemoveForbiddenMopZone","onRemoveCleanZone","onRemoveVirtualWall","onUpdateForbiddenSweepZone","onUpdateForbiddenMopZone","onUpdateCleanZone","onUpdateVirtualWall","onUpdateSpot","onUpdateWayPoint","onUpdateDivider","onClickForbiddenSweepZone","onClickForbiddenMopZone","onClickCleanZone","onClickVirtualWall","onClickSpot","onClickWayPoint","onClickDetectedObject","onClickCustomElement","onClickMap"];export{e as MAP_API_METHODS,o as MAP_CALLBACK_METHODS};
|
|
1
|
+
const e=["areRoomsAdjacent","getForbiddenSweepZones","getForbiddenMopZones","getCleanZones","getVirtualWalls","getSpots","getWayPoints","getViewportCenterPoint","getMapCenterPoint","getWallPointsByViewportCenter","getForbiddenSweepZonePointsByViewportCenter","getForbiddenMopZonePointsByViewportCenter","getCleanZonePointsByViewportCenter","getSpotPointByViewportCenter","getEffectiveDividerPoints","getDividerEndPoints","isNearChargerOrRobot","isPointInAnyRoom","isWallIntersectsAnyRoom","isZoneIntersectsAnyRoom","resetPanZoom","snapshot","snapshotByData"],o=["onMapFirstDrawed","onMapDrawed","onPathDrawed","onRoomPropertiesDrawed","onClickRoom","onClickRoomProperties","onRemoveForbiddenSweepZone","onRemoveForbiddenMopZone","onRemoveCleanZone","onRemoveVirtualWall","onUpdateForbiddenSweepZone","onUpdateForbiddenMopZone","onUpdateCleanZone","onUpdateVirtualWall","onUpdateSpot","onUpdateWayPoint","onUpdateDivider","onClickForbiddenSweepZone","onClickForbiddenMopZone","onClickCleanZone","onClickVirtualWall","onClickSpot","onClickWayPoint","onClickDetectedObject","onClickCustomElement","onClickMap"];export{e as MAP_API_METHODS,o as MAP_CALLBACK_METHODS};
|
package/dist/index.d.ts
CHANGED
|
@@ -1593,7 +1593,7 @@ declare type Managers = {
|
|
|
1593
1593
|
roomsManager: RoomManager;
|
|
1594
1594
|
};
|
|
1595
1595
|
|
|
1596
|
-
export declare const MAP_API_METHODS: readonly ["areRoomsAdjacent", "getForbiddenSweepZones", "getForbiddenMopZones", "getCleanZones", "getVirtualWalls", "getSpots", "getWayPoints", "getViewportCenterPoint", "getMapCenterPoint", "getWallPointsByViewportCenter", "getForbiddenSweepZonePointsByViewportCenter", "getForbiddenMopZonePointsByViewportCenter", "getCleanZonePointsByViewportCenter", "getSpotPointByViewportCenter", "getEffectiveDividerPoints", "getDividerEndPoints", "isNearChargerOrRobot", "isPointInAnyRoom", "resetPanZoom", "snapshot", "snapshotByData"];
|
|
1596
|
+
export declare const MAP_API_METHODS: readonly ["areRoomsAdjacent", "getForbiddenSweepZones", "getForbiddenMopZones", "getCleanZones", "getVirtualWalls", "getSpots", "getWayPoints", "getViewportCenterPoint", "getMapCenterPoint", "getWallPointsByViewportCenter", "getForbiddenSweepZonePointsByViewportCenter", "getForbiddenMopZonePointsByViewportCenter", "getCleanZonePointsByViewportCenter", "getSpotPointByViewportCenter", "getEffectiveDividerPoints", "getDividerEndPoints", "isNearChargerOrRobot", "isPointInAnyRoom", "isWallIntersectsAnyRoom", "isZoneIntersectsAnyRoom", "resetPanZoom", "snapshot", "snapshotByData"];
|
|
1597
1597
|
|
|
1598
1598
|
export declare const MAP_CALLBACK_METHODS: readonly ["onMapFirstDrawed", "onMapDrawed", "onPathDrawed", "onRoomPropertiesDrawed", "onClickRoom", "onClickRoomProperties", "onRemoveForbiddenSweepZone", "onRemoveForbiddenMopZone", "onRemoveCleanZone", "onRemoveVirtualWall", "onUpdateForbiddenSweepZone", "onUpdateForbiddenMopZone", "onUpdateCleanZone", "onUpdateVirtualWall", "onUpdateSpot", "onUpdateWayPoint", "onUpdateDivider", "onClickForbiddenSweepZone", "onClickForbiddenMopZone", "onClickCleanZone", "onClickVirtualWall", "onClickSpot", "onClickWayPoint", "onClickDetectedObject", "onClickCustomElement", "onClickMap"];
|
|
1599
1599
|
|
|
@@ -1778,14 +1778,36 @@ export declare interface MapApi {
|
|
|
1778
1778
|
/**
|
|
1779
1779
|
* 判断一个点是否在任意房间内
|
|
1780
1780
|
*
|
|
1781
|
-
*
|
|
1781
|
+
* 接受机器坐标系的点(相对于origin的坐标),遍历所有房间,
|
|
1782
1782
|
* 判断该点是否在某个房间内。支持结构化地图和点阵地图两种协议。
|
|
1783
|
-
*
|
|
1783
|
+
* 方法内部会自动将机器坐标系转换为地图坐标系进行检测。
|
|
1784
1784
|
*
|
|
1785
|
-
* @param point -
|
|
1785
|
+
* @param point - 待检测的点坐标(机器坐标系,与Zone、VirtualWall等使用相同的坐标系)
|
|
1786
1786
|
* @returns 如果点在某个房间内,返回该房间的RoomData;否则返回null
|
|
1787
1787
|
*/
|
|
1788
1788
|
isPointInAnyRoom(point: Point): RoomData | null;
|
|
1789
|
+
/**
|
|
1790
|
+
* 判断墙体(线段)是否与任意房间有交集
|
|
1791
|
+
*
|
|
1792
|
+
* 接受机器坐标系的墙体端点(相对于origin的坐标),遍历所有房间,
|
|
1793
|
+
* 判断墙体是否与某个房间有交集。支持结构化地图和点阵地图两种协议。
|
|
1794
|
+
* 方法内部会自动将机器坐标系转换为地图坐标系进行检测。
|
|
1795
|
+
*
|
|
1796
|
+
* @param points - 墙体的两个端点坐标(机器坐标系,与VirtualWall等使用相同的坐标系)
|
|
1797
|
+
* @returns 如果有交集返回 true,否则返回 false
|
|
1798
|
+
*/
|
|
1799
|
+
isWallIntersectsAnyRoom(points: [Point, Point]): boolean;
|
|
1800
|
+
/**
|
|
1801
|
+
* 判断区域(矩形)是否与任意房间有交集
|
|
1802
|
+
*
|
|
1803
|
+
* 接受机器坐标系的区域顶点(相对于origin的坐标),遍历所有房间,
|
|
1804
|
+
* 判断区域是否与某个房间有交集。支持结构化地图和点阵地图两种协议。
|
|
1805
|
+
* 方法内部会自动将机器坐标系转换为地图坐标系进行检测。
|
|
1806
|
+
*
|
|
1807
|
+
* @param points - 区域的四个顶点坐标(机器坐标系,与Zone等使用相同的坐标系)
|
|
1808
|
+
* @returns 如果有交集返回 true,否则返回 false
|
|
1809
|
+
*/
|
|
1810
|
+
isZoneIntersectsAnyRoom(points: [Point, Point, Point, Point]): boolean;
|
|
1789
1811
|
/**
|
|
1790
1812
|
* 地图截图
|
|
1791
1813
|
*
|
|
@@ -2183,22 +2205,46 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
2183
2205
|
/**
|
|
2184
2206
|
* 判断一个点是否在任意房间内
|
|
2185
2207
|
*
|
|
2186
|
-
*
|
|
2208
|
+
* 接受机器坐标系的点(相对于origin的坐标),遍历所有房间,
|
|
2187
2209
|
* 判断该点是否在某个房间内。支持结构化地图和点阵地图两种协议。
|
|
2188
|
-
*
|
|
2210
|
+
* 方法内部会自动将机器坐标系转换为地图坐标系进行检测。
|
|
2189
2211
|
*
|
|
2190
|
-
* @param point -
|
|
2212
|
+
* @param point - 待检测的点坐标(机器坐标系,与Zone、VirtualWall等使用相同的坐标系)
|
|
2191
2213
|
* @returns 如果点在某个房间内,返回该房间的RoomData;否则返回null
|
|
2192
2214
|
*
|
|
2193
2215
|
*/
|
|
2194
2216
|
isPointInAnyRoom(point: Point): RoomData | null;
|
|
2217
|
+
/**
|
|
2218
|
+
* 判断墙体(线段)是否与任意房间有交集
|
|
2219
|
+
*
|
|
2220
|
+
* 接受机器坐标系的墙体端点(相对于origin的坐标),遍历所有房间,
|
|
2221
|
+
* 判断墙体是否与某个房间有交集。支持结构化地图和点阵地图两种协议。
|
|
2222
|
+
* 方法内部会自动将机器坐标系转换为地图坐标系进行检测。
|
|
2223
|
+
*
|
|
2224
|
+
* @param points - 墙体的两个端点坐标(机器坐标系,与VirtualWall等使用相同的坐标系)
|
|
2225
|
+
* @returns 如果有交集返回 true,否则返回 false
|
|
2226
|
+
*
|
|
2227
|
+
*/
|
|
2228
|
+
isWallIntersectsAnyRoom(points: Point[]): boolean;
|
|
2229
|
+
/**
|
|
2230
|
+
* 判断区域(矩形)是否与任意房间有交集
|
|
2231
|
+
*
|
|
2232
|
+
* 接受机器坐标系的区域顶点(相对于origin的坐标),遍历所有房间,
|
|
2233
|
+
* 判断区域是否与某个房间有交集。支持结构化地图和点阵地图两种协议。
|
|
2234
|
+
* 方法内部会自动将机器坐标系转换为地图坐标系进行检测。
|
|
2235
|
+
*
|
|
2236
|
+
* @param points - 区域的四个顶点坐标(机器坐标系,与Zone等使用相同的坐标系)
|
|
2237
|
+
* @returns 如果有交集返回 true,否则返回 false
|
|
2238
|
+
*
|
|
2239
|
+
*/
|
|
2240
|
+
isZoneIntersectsAnyRoom(points: Point[]): boolean;
|
|
2195
2241
|
/**
|
|
2196
2242
|
* 判断点、墙体或区域是否距离充电桩或机器人位置过近
|
|
2197
2243
|
*
|
|
2198
2244
|
* 根据给定的坐标集合(点1个、墙体2个点或区域4个点)和判定阈值,
|
|
2199
2245
|
* 计算其与充电桩和/或机器人位置的最小距离,判断是否在阈值范围内。
|
|
2200
2246
|
*
|
|
2201
|
-
* @param points - 点(1个)、墙体(2个点)或区域(4
|
|
2247
|
+
* @param points - 点(1个)、墙体(2个点)或区域(4个点)的坐标集合(机器坐标系)
|
|
2202
2248
|
* @param thresholdMeters - 判定阈值,单位为米
|
|
2203
2249
|
* @param options - 配置选项
|
|
2204
2250
|
* @param options.checkCharger - 是否检查与充电桩的距离,默认为 true
|
|
@@ -2210,11 +2256,6 @@ declare class MapApplication extends Application implements MapApi {
|
|
|
2210
2256
|
checkCharger?: boolean;
|
|
2211
2257
|
checkRobot?: boolean;
|
|
2212
2258
|
}): boolean;
|
|
2213
|
-
/* Excluded from this release type: calculateMinDistanceToGeometry */
|
|
2214
|
-
/* Excluded from this release type: isPointInAnyRoomStructuredInternal */
|
|
2215
|
-
/* Excluded from this release type: isPointInAnyRoomRasterInternal */
|
|
2216
|
-
/* Excluded from this release type: areStructuredRoomsAdjacentInternal */
|
|
2217
|
-
/* Excluded from this release type: areRasterRoomsAdjacentInternal */
|
|
2218
2259
|
/**
|
|
2219
2260
|
* 地图截图
|
|
2220
2261
|
*
|
|
@@ -2526,7 +2567,7 @@ export declare interface MapCallbacks {
|
|
|
2526
2567
|
* 地图点击回调
|
|
2527
2568
|
*
|
|
2528
2569
|
* 当启用地图点击捕获(enableMapClickCapture)后,用户点击地图时触发。
|
|
2529
|
-
*
|
|
2570
|
+
* 返回点击位置的地图坐标(基于机器坐标系)。
|
|
2530
2571
|
*
|
|
2531
2572
|
* @param point - 点击位置的地图坐标
|
|
2532
2573
|
*
|
|
@@ -2650,6 +2691,34 @@ declare class MapManager {
|
|
|
2650
2691
|
* 获取所有房间的几何信息
|
|
2651
2692
|
*/
|
|
2652
2693
|
getAllRooms(): Room[];
|
|
2694
|
+
/**
|
|
2695
|
+
* 判断墙体(线段)是否与任意房间有交集
|
|
2696
|
+
* @param points 墙体的两个端点坐标(机器坐标系)
|
|
2697
|
+
* @returns 如果有交集返回 true,否则返回 false
|
|
2698
|
+
*/
|
|
2699
|
+
isWallIntersectsAnyRoom(points: Point[]): boolean;
|
|
2700
|
+
/**
|
|
2701
|
+
* 判断区域(矩形)是否与任意房间有交集
|
|
2702
|
+
* @param points 区域的四个顶点坐标(机器坐标系)
|
|
2703
|
+
* @returns 如果有交集返回 true,否则返回 false
|
|
2704
|
+
*/
|
|
2705
|
+
isZoneIntersectsAnyRoom(points: Point[]): boolean;
|
|
2706
|
+
/**
|
|
2707
|
+
* 判断指定的房间是否相邻(连通)
|
|
2708
|
+
* @param roomIds 要检测的房间ID数组
|
|
2709
|
+
* @returns 是否所有指定的房间都相邻(连通)
|
|
2710
|
+
*/
|
|
2711
|
+
areRoomsAdjacent(roomIds: number[]): boolean;
|
|
2712
|
+
/* Excluded from this release type: areStructuredRoomsAdjacentInternal */
|
|
2713
|
+
/* Excluded from this release type: areRasterRoomsAdjacentInternal */
|
|
2714
|
+
/**
|
|
2715
|
+
* 判断一个点是否在任意房间内
|
|
2716
|
+
* @param point 待检测的点坐标(机器坐标系)
|
|
2717
|
+
* @returns 如果点在某个房间内,返回该房间的RoomData;否则返回null
|
|
2718
|
+
*/
|
|
2719
|
+
isPointInAnyRoom(point: Point): RoomData | null;
|
|
2720
|
+
/* Excluded from this release type: isPointInAnyRoomStructuredInternal */
|
|
2721
|
+
/* Excluded from this release type: isPointInAnyRoomRasterInternal */
|
|
2653
2722
|
/**
|
|
2654
2723
|
* 清空地图组件
|
|
2655
2724
|
*/
|
|
@@ -3249,6 +3318,43 @@ declare class RoomFill extends Container {
|
|
|
3249
3318
|
* 获取地图宽度(用于像素索引转换)
|
|
3250
3319
|
*/
|
|
3251
3320
|
getMapWidth(): number;
|
|
3321
|
+
/**
|
|
3322
|
+
* 判断墙体(线段)是否与任意房间有交集
|
|
3323
|
+
* @param points 墙体的两个端点坐标(机器坐标系)
|
|
3324
|
+
* @returns 如果有交集返回 true,否则返回 false
|
|
3325
|
+
*/
|
|
3326
|
+
isWallIntersectsAnyRoom(points: Point[]): boolean;
|
|
3327
|
+
/**
|
|
3328
|
+
* 判断区域(矩形)是否与任意房间有交集
|
|
3329
|
+
* @param points 区域的四个顶点坐标(机器坐标系)
|
|
3330
|
+
* @returns 如果有交集返回 true,否则返回 false
|
|
3331
|
+
*/
|
|
3332
|
+
isZoneIntersectsAnyRoom(points: Point[]): boolean;
|
|
3333
|
+
/**
|
|
3334
|
+
* 栅格地图:判断线段是否与任意房间有交集
|
|
3335
|
+
*/
|
|
3336
|
+
private isWallIntersectsAnyRoomRaster;
|
|
3337
|
+
/**
|
|
3338
|
+
* 结构化地图:判断线段是否与任意房间有交集
|
|
3339
|
+
*/
|
|
3340
|
+
private isWallIntersectsAnyRoomStructured;
|
|
3341
|
+
/**
|
|
3342
|
+
* 栅格地图:判断矩形是否与任意房间有交集
|
|
3343
|
+
* 优化方案:先检查4条边,如果都失败再检查包含关系
|
|
3344
|
+
*/
|
|
3345
|
+
private isZoneIntersectsAnyRoomRaster;
|
|
3346
|
+
/**
|
|
3347
|
+
* 结构化地图:判断矩形是否与任意房间有交集
|
|
3348
|
+
*/
|
|
3349
|
+
private isZoneIntersectsAnyRoomStructured;
|
|
3350
|
+
/**
|
|
3351
|
+
* 获取线段覆盖的像素点索引
|
|
3352
|
+
*/
|
|
3353
|
+
private getLinePixels;
|
|
3354
|
+
/**
|
|
3355
|
+
* 获取矩形覆盖的像素点索引
|
|
3356
|
+
*/
|
|
3357
|
+
private getZonePixels;
|
|
3252
3358
|
/**
|
|
3253
3359
|
* 清除所有房间
|
|
3254
3360
|
*/
|