From 799df9203daa382b4eda90e274e6e947911016e2 Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Mon, 24 Apr 2023 14:06:54 -0400 Subject: [PATCH 01/14] comments for where to update --- web/frontend/src/components/slam-2d-render.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/frontend/src/components/slam-2d-render.vue b/web/frontend/src/components/slam-2d-render.vue index dd3901dac07..add7581c746 100644 --- a/web/frontend/src/components/slam-2d-render.vue +++ b/web/frontend/src/components/slam-2d-render.vue @@ -53,7 +53,7 @@ renderer.setClearColor(color, 1); canvas.style.cssText = 'width:100%;height:100%;'; -const camera = new THREE.OrthographicCamera(-1, 1, 0.5, -0.5, -1, 1000); +const camera = new THREE.OrthographicCamera(-1, 1, 0.5, -0.5, -1, 1000); // update? camera.userData.size = 2; setCamera(camera); scene.add(camera); @@ -125,8 +125,8 @@ const updateCloud = (pointcloud: Uint8Array) => { points.geometry.computeBoundingSphere(); const { radius = 1, center = { x: 0, z: 0 } } = points.geometry.boundingSphere ?? {}; - camera.position.set(center.x, 100, center.z); - camera.lookAt(center.x, 0, center.z); + camera.position.set(center.x, 100, center.z);// update + camera.lookAt(center.x, 0, center.z);// update const aspect = canvas.clientHeight / canvas.clientWidth; camera.zoom = aspect > 1 @@ -135,7 +135,7 @@ const updateCloud = (pointcloud: Uint8Array) => { camera.updateProjectionMatrix(); - controls.target.set(center.x, 0, center.z); + controls.target.set(center.x, 0, center.z); // update controls.maxZoom = radius * 2; const intersectionPlane = new THREE.Mesh( @@ -144,7 +144,7 @@ const updateCloud = (pointcloud: Uint8Array) => { ); intersectionPlane.name = 'Intersection Plane'; intersectionPlane.position.y = -1; - intersectionPlane.position.set(center.x, 0, center.z); + intersectionPlane.position.set(center.x, 0, center.z); // update raycaster.objects = [intersectionPlane]; const colors = points.geometry.attributes.color; @@ -168,9 +168,9 @@ const updateCloud = (pointcloud: Uint8Array) => { const updatePose = (newPose: commonApi.Pose) => { const x = newPose.getX(); - const z = newPose.getZ(); + const z = newPose.getZ(); // update marker.position.setX(x); - marker.position.setZ(z); + marker.position.setZ(z); // update }; onMounted(() => { From 3744116484be4ed2ff75d93969146d5606661374 Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Mon, 24 Apr 2023 14:11:35 -0400 Subject: [PATCH 02/14] comments for where to update --- web/frontend/src/components/slam-2d-render.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/frontend/src/components/slam-2d-render.vue b/web/frontend/src/components/slam-2d-render.vue index add7581c746..f695dcc7cd5 100644 --- a/web/frontend/src/components/slam-2d-render.vue +++ b/web/frontend/src/components/slam-2d-render.vue @@ -126,7 +126,7 @@ const updateCloud = (pointcloud: Uint8Array) => { const { radius = 1, center = { x: 0, z: 0 } } = points.geometry.boundingSphere ?? {}; camera.position.set(center.x, 100, center.z);// update - camera.lookAt(center.x, 0, center.z);// update + camera.lookAt(center.x, 0, center.z); // update const aspect = canvas.clientHeight / canvas.clientWidth; camera.zoom = aspect > 1 @@ -143,7 +143,7 @@ const updateCloud = (pointcloud: Uint8Array) => { new MeshDiscardMaterial() ); intersectionPlane.name = 'Intersection Plane'; - intersectionPlane.position.y = -1; + intersectionPlane.position.y = -1; // update intersectionPlane.position.set(center.x, 0, center.z); // update raycaster.objects = [intersectionPlane]; From f324a159bbdcb41132c2c1cc3604517b3c8a0828 Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Mon, 24 Apr 2023 16:08:28 -0400 Subject: [PATCH 03/14] update 2d view --- web/frontend/src/components/slam-2d-render.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/web/frontend/src/components/slam-2d-render.vue b/web/frontend/src/components/slam-2d-render.vue index f695dcc7cd5..fa9b76d7693 100644 --- a/web/frontend/src/components/slam-2d-render.vue +++ b/web/frontend/src/components/slam-2d-render.vue @@ -124,9 +124,9 @@ const updateCloud = (pointcloud: Uint8Array) => { const points = loader.parse(pointcloud.buffer); points.geometry.computeBoundingSphere(); - const { radius = 1, center = { x: 0, z: 0 } } = points.geometry.boundingSphere ?? {}; - camera.position.set(center.x, 100, center.z);// update - camera.lookAt(center.x, 0, center.z); // update + const { radius = 1, center = { x: 0, y: 0 } } = points.geometry.boundingSphere ?? {}; //update + camera.position.set(center.x, center.y, 100);// update + camera.lookAt(center.x, center.y, 0); // update const aspect = canvas.clientHeight / canvas.clientWidth; camera.zoom = aspect > 1 @@ -135,7 +135,7 @@ const updateCloud = (pointcloud: Uint8Array) => { camera.updateProjectionMatrix(); - controls.target.set(center.x, 0, center.z); // update + controls.target.set(center.x, center.y, 0); // update controls.maxZoom = radius * 2; const intersectionPlane = new THREE.Mesh( @@ -143,8 +143,8 @@ const updateCloud = (pointcloud: Uint8Array) => { new MeshDiscardMaterial() ); intersectionPlane.name = 'Intersection Plane'; - intersectionPlane.position.y = -1; // update - intersectionPlane.position.set(center.x, 0, center.z); // update + intersectionPlane.position.z = -1; // update + intersectionPlane.position.set(center.x, center.y, 0); // update raycaster.objects = [intersectionPlane]; const colors = points.geometry.attributes.color; @@ -168,9 +168,9 @@ const updateCloud = (pointcloud: Uint8Array) => { const updatePose = (newPose: commonApi.Pose) => { const x = newPose.getX(); - const z = newPose.getZ(); // update + const y = newPose.getY(); // update marker.position.setX(x); - marker.position.setZ(z); // update + marker.position.setY(y); // update }; onMounted(() => { From e301f0e60c09cdbaaece2f3b67e21031234b6cb3 Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Mon, 24 Apr 2023 16:09:36 -0400 Subject: [PATCH 04/14] remove comments --- web/frontend/src/components/slam-2d-render.vue | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/web/frontend/src/components/slam-2d-render.vue b/web/frontend/src/components/slam-2d-render.vue index fa9b76d7693..64f36a9ae7f 100644 --- a/web/frontend/src/components/slam-2d-render.vue +++ b/web/frontend/src/components/slam-2d-render.vue @@ -53,7 +53,7 @@ renderer.setClearColor(color, 1); canvas.style.cssText = 'width:100%;height:100%;'; -const camera = new THREE.OrthographicCamera(-1, 1, 0.5, -0.5, -1, 1000); // update? +const camera = new THREE.OrthographicCamera(-1, 1, 0.5, -0.5, -1, 1000); camera.userData.size = 2; setCamera(camera); scene.add(camera); @@ -124,9 +124,9 @@ const updateCloud = (pointcloud: Uint8Array) => { const points = loader.parse(pointcloud.buffer); points.geometry.computeBoundingSphere(); - const { radius = 1, center = { x: 0, y: 0 } } = points.geometry.boundingSphere ?? {}; //update - camera.position.set(center.x, center.y, 100);// update - camera.lookAt(center.x, center.y, 0); // update + const { radius = 1, center = { x: 0, y: 0 } } = points.geometry.boundingSphere ?? {}; + camera.position.set(center.x, center.y, 100); + camera.lookAt(center.x, center.y, 0); const aspect = canvas.clientHeight / canvas.clientWidth; camera.zoom = aspect > 1 @@ -135,7 +135,7 @@ const updateCloud = (pointcloud: Uint8Array) => { camera.updateProjectionMatrix(); - controls.target.set(center.x, center.y, 0); // update + controls.target.set(center.x, center.y, 0); controls.maxZoom = radius * 2; const intersectionPlane = new THREE.Mesh( @@ -143,8 +143,8 @@ const updateCloud = (pointcloud: Uint8Array) => { new MeshDiscardMaterial() ); intersectionPlane.name = 'Intersection Plane'; - intersectionPlane.position.z = -1; // update - intersectionPlane.position.set(center.x, center.y, 0); // update + intersectionPlane.position.z = -1; + intersectionPlane.position.set(center.x, center.y, 0); raycaster.objects = [intersectionPlane]; const colors = points.geometry.attributes.color; @@ -168,9 +168,9 @@ const updateCloud = (pointcloud: Uint8Array) => { const updatePose = (newPose: commonApi.Pose) => { const x = newPose.getX(); - const y = newPose.getY(); // update + const y = newPose.getY(); marker.position.setX(x); - marker.position.setY(y); // update + marker.position.setY(y); }; onMounted(() => { From e082468ac57cc2e282013b19c57bde0ea8166a4d Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Tue, 25 Apr 2023 12:53:39 -0400 Subject: [PATCH 05/14] push fake slam update --- services/slam/fake/data_loader.go | 2 +- services/slam/fake/slam.go | 2 +- web/frontend/src/components/slam-2d-render.vue | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/slam/fake/data_loader.go b/services/slam/fake/data_loader.go index e3fba03007d..1b072985f8c 100644 --- a/services/slam/fake/data_loader.go +++ b/services/slam/fake/data_loader.go @@ -40,7 +40,7 @@ type position struct { } const ( - maxDataCount = 16 + maxDataCount = 20 internalStateTemplate = "%s/internal_state/internal_state_%d.pbstream" pcdTemplate = "%s/pointcloud/pointcloud_%d.pcd" positionTemplate = "%s/position/position_%d.json" diff --git a/services/slam/fake/slam.go b/services/slam/fake/slam.go index 30b7b88db70..b95f736f381 100644 --- a/services/slam/fake/slam.go +++ b/services/slam/fake/slam.go @@ -14,7 +14,7 @@ import ( var model = resource.DefaultModelFamily.WithModel("fake") -const datasetDirectory = "slam/example_cartographer_outputs/viam-office-02-22-1" +const datasetDirectory = "slam/example_cartographer_outputs/viam-office-02-22-2" func init() { resource.RegisterService( diff --git a/web/frontend/src/components/slam-2d-render.vue b/web/frontend/src/components/slam-2d-render.vue index 64f36a9ae7f..5fab2638648 100644 --- a/web/frontend/src/components/slam-2d-render.vue +++ b/web/frontend/src/components/slam-2d-render.vue @@ -124,7 +124,7 @@ const updateCloud = (pointcloud: Uint8Array) => { const points = loader.parse(pointcloud.buffer); points.geometry.computeBoundingSphere(); - const { radius = 1, center = { x: 0, y: 0 } } = points.geometry.boundingSphere ?? {}; + const { radius = 1, center = { x: 0, y: 0 } } = points.geometry.boundingSphere ?? {}; camera.position.set(center.x, center.y, 100); camera.lookAt(center.x, center.y, 0); @@ -168,9 +168,9 @@ const updateCloud = (pointcloud: Uint8Array) => { const updatePose = (newPose: commonApi.Pose) => { const x = newPose.getX(); - const y = newPose.getY(); + const y = newPose.getY(); marker.position.setX(x); - marker.position.setY(y); + marker.position.setY(y); }; onMounted(() => { From 743efeba5050fecbbd816d649a68ba932fc545fb Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Tue, 25 Apr 2023 13:13:12 -0400 Subject: [PATCH 06/14] add artifacts --- .artifact/tree.json | 250 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 250 insertions(+) diff --git a/.artifact/tree.json b/.artifact/tree.json index 04f882709b6..b9e263d71a6 100644 --- a/.artifact/tree.json +++ b/.artifact/tree.json @@ -50843,6 +50843,256 @@ } }, "position_new": {} + }, + "viam-office-02-22-2": { + "viam-office-02-22-2": { + "internal_state": { + "internal_state_0.pbstream": { + "hash": "a68989ce6d8b5822836dbc77e434160f", + "size": 3 + }, + "internal_state_1.pbstream": { + "hash": "0cca97cfbe3c64bf6c1fa27ee8447de1", + "size": 6 + }, + "internal_state_10.pbstream": { + "hash": "a2b4d37f3583754e6e96d44e09e442f1", + "size": 30 + }, + "internal_state_11.pbstream": { + "hash": "d6195cd4e897c76f6925d84b82a903a7", + "size": 39 + }, + "internal_state_12.pbstream": { + "hash": "d91cbe8e9727d22a3beb7370446715d3", + "size": 45 + }, + "internal_state_13.pbstream": { + "hash": "d91cbe8e9727d22a3beb7370446715d3", + "size": 45 + }, + "internal_state_14.pbstream": { + "hash": "0492f7e0a7304df43bd6ffb609ac4a81", + "size": 54 + }, + "internal_state_15.pbstream": { + "hash": "8c5b105b66f346442227b553a148caf9", + "size": 66 + }, + "internal_state_16.pbstream": { + "hash": "d938c194f467f948dac2c48bf0532f23", + "size": 69 + }, + "internal_state_17.pbstream": { + "hash": "d938c194f467f948dac2c48bf0532f23", + "size": 69 + }, + "internal_state_18.pbstream": { + "hash": "2730a7ec1a7572bd0521d8c9ac25e03d", + "size": 72 + }, + "internal_state_19.pbstream": { + "hash": "eec5c27308f3e8513645bd6e57973875", + "size": 84 + }, + "internal_state_2.pbstream": { + "hash": "16e6b9bf5300a004b9aee3978adb817b", + "size": 9 + }, + "internal_state_3.pbstream": { + "hash": "6b8eba0e4c178252af3f0c5c1398d5c5", + "size": 12 + }, + "internal_state_4.pbstream": { + "hash": "6b8eba0e4c178252af3f0c5c1398d5c5", + "size": 12 + }, + "internal_state_5.pbstream": { + "hash": "327207e5e78b811c3725ea6a52587d17", + "size": 15 + }, + "internal_state_6.pbstream": { + "hash": "89986b144a8073f066a1e498e3f74859", + "size": 18 + }, + "internal_state_7.pbstream": { + "hash": "34f5c27b81f2bbf3c9483edae91bed43", + "size": 21 + }, + "internal_state_8.pbstream": { + "hash": "aea2ad78b1d2247a6f228d08230fa39d", + "size": 24 + }, + "internal_state_9.pbstream": { + "hash": "aea2ad78b1d2247a6f228d08230fa39d", + "size": 24 + } + }, + "pointcloud": { + "pointcloud_0.pcd": { + "hash": "a68989ce6d8b5822836dbc77e434160f", + "size": 3 + }, + "pointcloud_1.pcd": { + "hash": "16e6b9bf5300a004b9aee3978adb817b", + "size": 9 + }, + "pointcloud_10.pcd": { + "hash": "5f0a9563ae97bd96c85f7257d4c368d5", + "size": 36 + }, + "pointcloud_11.pcd": { + "hash": "13398927c082d8deba8c75fba930e829", + "size": 42 + }, + "pointcloud_12.pcd": { + "hash": "d91cbe8e9727d22a3beb7370446715d3", + "size": 45 + }, + "pointcloud_13.pcd": { + "hash": "42355bafc18484514d3d5560f03fc12d", + "size": 48 + }, + "pointcloud_14.pcd": { + "hash": "948c4da1eb5983d3bf56cd56107288ef", + "size": 51 + }, + "pointcloud_15.pcd": { + "hash": "0492f7e0a7304df43bd6ffb609ac4a81", + "size": 54 + }, + "pointcloud_16.pcd": { + "hash": "695cc97c57eec6152a7a6ff2db57645b", + "size": 57 + }, + "pointcloud_17.pcd": { + "hash": "4ba20c65b63a6b859f3ef81eaeb0fa65", + "size": 60 + }, + "pointcloud_18.pcd": { + "hash": "4ba20c65b63a6b859f3ef81eaeb0fa65", + "size": 60 + }, + "pointcloud_19.pcd": { + "hash": "695cc97c57eec6152a7a6ff2db57645b", + "size": 57 + }, + "pointcloud_2.pcd": { + "hash": "6b8eba0e4c178252af3f0c5c1398d5c5", + "size": 12 + }, + "pointcloud_3.pcd": { + "hash": "327207e5e78b811c3725ea6a52587d17", + "size": 15 + }, + "pointcloud_4.pcd": { + "hash": "89986b144a8073f066a1e498e3f74859", + "size": 18 + }, + "pointcloud_5.pcd": { + "hash": "34f5c27b81f2bbf3c9483edae91bed43", + "size": 21 + }, + "pointcloud_6.pcd": { + "hash": "aea2ad78b1d2247a6f228d08230fa39d", + "size": 24 + }, + "pointcloud_7.pcd": { + "hash": "745e16f8296b892c4dbca2a9c00e8f5f", + "size": 27 + }, + "pointcloud_8.pcd": { + "hash": "a2b4d37f3583754e6e96d44e09e442f1", + "size": 30 + }, + "pointcloud_9.pcd": { + "hash": "a2b4d37f3583754e6e96d44e09e442f1", + "size": 30 + } + }, + "position": { + "position_0.json": { + "hash": "53a2d0ae95d4ed65ae2a5686d262df7e", + "size": 252 + }, + "position_1.json": { + "hash": "5b62a9b83a7f3269b13cd86c38291537", + "size": 252 + }, + "position_10.json": { + "hash": "f500604a3568c6972a9f7b71fbe15fa1", + "size": 250 + }, + "position_11.json": { + "hash": "ee3e52e8e5b05003451d1658c21f9e8b", + "size": 247 + }, + "position_12.json": { + "hash": "1cbf2026b3ba310e27d809d0384bcd63", + "size": 252 + }, + "position_13.json": { + "hash": "957a826dd21ffbe1a9ce079a60c0ab31", + "size": 251 + }, + "position_14.json": { + "hash": "a2dc5fc8083eb1f105b6571898beea14", + "size": 249 + }, + "position_15.json": { + "hash": "eee282749e214f300bd88883cb1f8c92", + "size": 249 + }, + "position_16.json": { + "hash": "5703fe1e9a551ce765b182123e6753ea", + "size": 248 + }, + "position_17.json": { + "hash": "0171f3ff42af89e0836a7e2b70379e95", + "size": 247 + }, + "position_18.json": { + "hash": "3a2840cb4e9b2b60508bdaa0f17c7928", + "size": 251 + }, + "position_19.json": { + "hash": "8f653c892a50bcf3cb7a1d66147f17de", + "size": 248 + }, + "position_2.json": { + "hash": "123da60478b9f68eb5700ad722cc087d", + "size": 251 + }, + "position_3.json": { + "hash": "bbfee6398ddfb220f74abb6c4d900cea", + "size": 251 + }, + "position_4.json": { + "hash": "b77af0f5852178c8888ee85347d6427f", + "size": 252 + }, + "position_5.json": { + "hash": "0d3c38ffbbc9b60ca388bd416935c93d", + "size": 252 + }, + "position_6.json": { + "hash": "c856bdddaaaa175fe15696a6d5db4f36", + "size": 252 + }, + "position_7.json": { + "hash": "843f8774ee22d62082390aeadfd482ea", + "size": 249 + }, + "position_8.json": { + "hash": "e7639ced49f8ec800cc2de2c81bab6fd", + "size": 250 + }, + "position_9.json": { + "hash": "e9b16e45cad39b96474e2e657dfadc30", + "size": 250 + } + } + } } }, "locating_in_map.lua": { From 057848453b017beb94b6d7063e1647f598dec8cf Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Tue, 25 Apr 2023 14:40:36 -0400 Subject: [PATCH 07/14] fix dataset --- .artifact/tree.json | 462 ++++++++++++++---------------- services/slam/fake/data_loader.go | 2 +- services/slam/fake/slam_test.go | 4 +- 3 files changed, 221 insertions(+), 247 deletions(-) diff --git a/.artifact/tree.json b/.artifact/tree.json index b9e263d71a6..3f4302c731e 100644 --- a/.artifact/tree.json +++ b/.artifact/tree.json @@ -50845,252 +50845,226 @@ "position_new": {} }, "viam-office-02-22-2": { - "viam-office-02-22-2": { - "internal_state": { - "internal_state_0.pbstream": { - "hash": "a68989ce6d8b5822836dbc77e434160f", - "size": 3 - }, - "internal_state_1.pbstream": { - "hash": "0cca97cfbe3c64bf6c1fa27ee8447de1", - "size": 6 - }, - "internal_state_10.pbstream": { - "hash": "a2b4d37f3583754e6e96d44e09e442f1", - "size": 30 - }, - "internal_state_11.pbstream": { - "hash": "d6195cd4e897c76f6925d84b82a903a7", - "size": 39 - }, - "internal_state_12.pbstream": { - "hash": "d91cbe8e9727d22a3beb7370446715d3", - "size": 45 - }, - "internal_state_13.pbstream": { - "hash": "d91cbe8e9727d22a3beb7370446715d3", - "size": 45 - }, - "internal_state_14.pbstream": { - "hash": "0492f7e0a7304df43bd6ffb609ac4a81", - "size": 54 - }, - "internal_state_15.pbstream": { - "hash": "8c5b105b66f346442227b553a148caf9", - "size": 66 - }, - "internal_state_16.pbstream": { - "hash": "d938c194f467f948dac2c48bf0532f23", - "size": 69 - }, - "internal_state_17.pbstream": { - "hash": "d938c194f467f948dac2c48bf0532f23", - "size": 69 - }, - "internal_state_18.pbstream": { - "hash": "2730a7ec1a7572bd0521d8c9ac25e03d", - "size": 72 - }, - "internal_state_19.pbstream": { - "hash": "eec5c27308f3e8513645bd6e57973875", - "size": 84 - }, - "internal_state_2.pbstream": { - "hash": "16e6b9bf5300a004b9aee3978adb817b", - "size": 9 - }, - "internal_state_3.pbstream": { - "hash": "6b8eba0e4c178252af3f0c5c1398d5c5", - "size": 12 - }, - "internal_state_4.pbstream": { - "hash": "6b8eba0e4c178252af3f0c5c1398d5c5", - "size": 12 - }, - "internal_state_5.pbstream": { - "hash": "327207e5e78b811c3725ea6a52587d17", - "size": 15 - }, - "internal_state_6.pbstream": { - "hash": "89986b144a8073f066a1e498e3f74859", - "size": 18 - }, - "internal_state_7.pbstream": { - "hash": "34f5c27b81f2bbf3c9483edae91bed43", - "size": 21 - }, - "internal_state_8.pbstream": { - "hash": "aea2ad78b1d2247a6f228d08230fa39d", - "size": 24 - }, - "internal_state_9.pbstream": { - "hash": "aea2ad78b1d2247a6f228d08230fa39d", - "size": 24 - } + "internal_state": { + "internal_state_0.pbstream": { + "hash": "c45a129e3bb88449c17591aa28877aed", + "size": 15854 }, - "pointcloud": { - "pointcloud_0.pcd": { - "hash": "a68989ce6d8b5822836dbc77e434160f", - "size": 3 - }, - "pointcloud_1.pcd": { - "hash": "16e6b9bf5300a004b9aee3978adb817b", - "size": 9 - }, - "pointcloud_10.pcd": { - "hash": "5f0a9563ae97bd96c85f7257d4c368d5", - "size": 36 - }, - "pointcloud_11.pcd": { - "hash": "13398927c082d8deba8c75fba930e829", - "size": 42 - }, - "pointcloud_12.pcd": { - "hash": "d91cbe8e9727d22a3beb7370446715d3", - "size": 45 - }, - "pointcloud_13.pcd": { - "hash": "42355bafc18484514d3d5560f03fc12d", - "size": 48 - }, - "pointcloud_14.pcd": { - "hash": "948c4da1eb5983d3bf56cd56107288ef", - "size": 51 - }, - "pointcloud_15.pcd": { - "hash": "0492f7e0a7304df43bd6ffb609ac4a81", - "size": 54 - }, - "pointcloud_16.pcd": { - "hash": "695cc97c57eec6152a7a6ff2db57645b", - "size": 57 - }, - "pointcloud_17.pcd": { - "hash": "4ba20c65b63a6b859f3ef81eaeb0fa65", - "size": 60 - }, - "pointcloud_18.pcd": { - "hash": "4ba20c65b63a6b859f3ef81eaeb0fa65", - "size": 60 - }, - "pointcloud_19.pcd": { - "hash": "695cc97c57eec6152a7a6ff2db57645b", - "size": 57 - }, - "pointcloud_2.pcd": { - "hash": "6b8eba0e4c178252af3f0c5c1398d5c5", - "size": 12 - }, - "pointcloud_3.pcd": { - "hash": "327207e5e78b811c3725ea6a52587d17", - "size": 15 - }, - "pointcloud_4.pcd": { - "hash": "89986b144a8073f066a1e498e3f74859", - "size": 18 - }, - "pointcloud_5.pcd": { - "hash": "34f5c27b81f2bbf3c9483edae91bed43", - "size": 21 - }, - "pointcloud_6.pcd": { - "hash": "aea2ad78b1d2247a6f228d08230fa39d", - "size": 24 - }, - "pointcloud_7.pcd": { - "hash": "745e16f8296b892c4dbca2a9c00e8f5f", - "size": 27 - }, - "pointcloud_8.pcd": { - "hash": "a2b4d37f3583754e6e96d44e09e442f1", - "size": 30 - }, - "pointcloud_9.pcd": { - "hash": "a2b4d37f3583754e6e96d44e09e442f1", - "size": 30 - } + "internal_state_1.pbstream": { + "hash": "64f40901261a4a368fa5fe1cb197fe1c", + "size": 2812144 }, - "position": { - "position_0.json": { - "hash": "53a2d0ae95d4ed65ae2a5686d262df7e", - "size": 252 - }, - "position_1.json": { - "hash": "5b62a9b83a7f3269b13cd86c38291537", - "size": 252 - }, - "position_10.json": { - "hash": "f500604a3568c6972a9f7b71fbe15fa1", - "size": 250 - }, - "position_11.json": { - "hash": "ee3e52e8e5b05003451d1658c21f9e8b", - "size": 247 - }, - "position_12.json": { - "hash": "1cbf2026b3ba310e27d809d0384bcd63", - "size": 252 - }, - "position_13.json": { - "hash": "957a826dd21ffbe1a9ce079a60c0ab31", - "size": 251 - }, - "position_14.json": { - "hash": "a2dc5fc8083eb1f105b6571898beea14", - "size": 249 - }, - "position_15.json": { - "hash": "eee282749e214f300bd88883cb1f8c92", - "size": 249 - }, - "position_16.json": { - "hash": "5703fe1e9a551ce765b182123e6753ea", - "size": 248 - }, - "position_17.json": { - "hash": "0171f3ff42af89e0836a7e2b70379e95", - "size": 247 - }, - "position_18.json": { - "hash": "3a2840cb4e9b2b60508bdaa0f17c7928", - "size": 251 - }, - "position_19.json": { - "hash": "8f653c892a50bcf3cb7a1d66147f17de", - "size": 248 - }, - "position_2.json": { - "hash": "123da60478b9f68eb5700ad722cc087d", - "size": 251 - }, - "position_3.json": { - "hash": "bbfee6398ddfb220f74abb6c4d900cea", - "size": 251 - }, - "position_4.json": { - "hash": "b77af0f5852178c8888ee85347d6427f", - "size": 252 - }, - "position_5.json": { - "hash": "0d3c38ffbbc9b60ca388bd416935c93d", - "size": 252 - }, - "position_6.json": { - "hash": "c856bdddaaaa175fe15696a6d5db4f36", - "size": 252 - }, - "position_7.json": { - "hash": "843f8774ee22d62082390aeadfd482ea", - "size": 249 - }, - "position_8.json": { - "hash": "e7639ced49f8ec800cc2de2c81bab6fd", - "size": 250 - }, - "position_9.json": { - "hash": "e9b16e45cad39b96474e2e657dfadc30", - "size": 250 - } + "internal_state_10.pbstream": { + "hash": "3f668318747a004799caead607bf6065", + "size": 22207344 + }, + "internal_state_11.pbstream": { + "hash": "cc713308a2766bbe0feaa6efb210d2e0", + "size": 23572480 + }, + "internal_state_12.pbstream": { + "hash": "a153506f7cd833c341e5b015300a418c", + "size": 23381025 + }, + "internal_state_13.pbstream": { + "hash": "75706da112fc4e23dd17f7b6c326e12e", + "size": 23414263 + }, + "internal_state_14.pbstream": { + "hash": "7a6e2ef411a3642a930cc7d9c56839bb", + "size": 26705504 + }, + "internal_state_15.pbstream": { + "hash": "a1e45c8ead61b48a5a208dccf30e5d5f", + "size": 28853515 + }, + "internal_state_16.pbstream": { + "hash": "b2d8d427a1bbd9f6af6a5211037bb6a3", + "size": 30836932 + }, + "internal_state_17.pbstream": { + "hash": "ee36674c26df9fe6a48db7d1ee24963e", + "size": 32057093 + }, + "internal_state_2.pbstream": { + "hash": "45a4af36429216d4c51eee1a123975a4", + "size": 5435611 + }, + "internal_state_3.pbstream": { + "hash": "99091c95873b82a90db4c16d94e572ba", + "size": 7424545 + }, + "internal_state_4.pbstream": { + "hash": "8e568f2bd65bc7cd2360491d5e7eddaf", + "size": 7460762 + }, + "internal_state_5.pbstream": { + "hash": "0ce26ce2f76514823bb73978d7048acd", + "size": 10297244 + }, + "internal_state_6.pbstream": { + "hash": "70e7810bbd899768fc64bc791ef033c1", + "size": 13147532 + }, + "internal_state_7.pbstream": { + "hash": "4aecfc067bb81c7e916b62774c6405aa", + "size": 14800927 + }, + "internal_state_8.pbstream": { + "hash": "0dd2e6d75ffef228a419015097ce84ad", + "size": 16954328 + }, + "internal_state_9.pbstream": { + "hash": "b094d749b031af7a91f01d6e4e2ae6e6", + "size": 19560436 + } + }, + "pointcloud": { + "pointcloud_0.pcd": { + "hash": "b5f6cd31b36597a37dcf8b8ffdbbaee6", + "size": 170746 + }, + "pointcloud_1.pcd": { + "hash": "b971600b0db1f88f378968b989509f06", + "size": 4524796 + }, + "pointcloud_10.pcd": { + "hash": "dbe6d8c90bc36c329acb9519e5cca2cd", + "size": 18793518 + }, + "pointcloud_11.pcd": { + "hash": "ba35c9781182f37d474f753ff6444ef2", + "size": 19325550 + }, + "pointcloud_12.pcd": { + "hash": "2774e355263ddc4237648c0225fc9322", + "size": 19972750 + }, + "pointcloud_13.pcd": { + "hash": "0dfdcc6206fef6bb6ce133746a871cd7", + "size": 20164142 + }, + "pointcloud_14.pcd": { + "hash": "8748ed6057e4958cc8bed7c77e4e2175", + "size": 19000622 + }, + "pointcloud_15.pcd": { + "hash": "596031d97ad94ed050a402591ffc25f0", + "size": 18800654 + }, + "pointcloud_16.pcd": { + "hash": "c2c4d2c5a264a1b158f7c153a8f9283a", + "size": 18336750 + }, + "pointcloud_17.pcd": { + "hash": "c80a7d6cfcc0f1af6813d286ed5350fe", + "size": 18318142 + }, + "pointcloud_2.pcd": { + "hash": "47d4212ab6f454cc54bd883a04fecbc6", + "size": 7536428 + }, + "pointcloud_3.pcd": { + "hash": "67701eea7cb97b9d823dea5ef3cb274e", + "size": 10192316 + }, + "pointcloud_4.pcd": { + "hash": "4d951f6352b77ed51f1bc2f325d0d5c6", + "size": 10213964 + }, + "pointcloud_5.pcd": { + "hash": "13951269e3033145d7a2df14bdf18354", + "size": 12536268 + }, + "pointcloud_6.pcd": { + "hash": "c478df84010df9e810597d3558c41853", + "size": 13721468 + }, + "pointcloud_7.pcd": { + "hash": "a68fef728011b459255f7e9780e28af1", + "size": 14798556 + }, + "pointcloud_8.pcd": { + "hash": "fcaf0e840a3ef86cc5e69a6acd2d7ddb", + "size": 17032190 + }, + "pointcloud_9.pcd": { + "hash": "e6b57aa563114da93c34c653ecbf8903", + "size": 18981454 + } + }, + "position": { + "position_0.json": { + "hash": "5190ef17a7875549f52d38fd2176035e", + "size": 258 + }, + "position_1.json": { + "hash": "8858a23f8cf0e0b2d9642b9c8d5abc92", + "size": 250 + }, + "position_10.json": { + "hash": "fc8ff978c7a616059e7968c06e2460cb", + "size": 250 + }, + "position_11.json": { + "hash": "4e3a82bc5a268b5e3f0e66104094ed17", + "size": 248 + }, + "position_12.json": { + "hash": "0171f3ff42af89e0836a7e2b70379e95", + "size": 247 + }, + "position_13.json": { + "hash": "c18f2abec5b4d8960beb76548398fcce", + "size": 259 + }, + "position_14.json": { + "hash": "8131c2a087ff7d88ba6b1aaca50ad410", + "size": 250 + }, + "position_15.json": { + "hash": "f3c73d230cf51f633821f9b87474ba2e", + "size": 252 + }, + "position_16.json": { + "hash": "a8fe3783605e8ad38851d0f4b4049b94", + "size": 251 + }, + "position_17.json": { + "hash": "429c2b80ecc9fe1ca9eed8208ae5a79f", + "size": 250 + }, + "position_2.json": { + "hash": "0354832bab2abc0fe8e7b45ef168fec9", + "size": 250 + }, + "position_3.json": { + "hash": "e7639ced49f8ec800cc2de2c81bab6fd", + "size": 250 + }, + "position_4.json": { + "hash": "110764b72240827cfb17e3512dc3f589", + "size": 259 + }, + "position_5.json": { + "hash": "12c957ab618dcabb1fe010b06026a70f", + "size": 251 + }, + "position_6.json": { + "hash": "8614db34685de0036be1e86bd0dd1ca3", + "size": 248 + }, + "position_7.json": { + "hash": "300aec716968d85c27546c29961979e6", + "size": 248 + }, + "position_8.json": { + "hash": "8d608f95d2fb39838daf05535b4b5a9c", + "size": 250 + }, + "position_9.json": { + "hash": "0fb8612ef11681660ebec33ceed96d79", + "size": 252 } } } diff --git a/services/slam/fake/data_loader.go b/services/slam/fake/data_loader.go index 1b072985f8c..1d47a6132bb 100644 --- a/services/slam/fake/data_loader.go +++ b/services/slam/fake/data_loader.go @@ -40,7 +40,7 @@ type position struct { } const ( - maxDataCount = 20 + maxDataCount = 18 internalStateTemplate = "%s/internal_state/internal_state_%d.pbstream" pcdTemplate = "%s/pointcloud/pointcloud_%d.pcd" positionTemplate = "%s/position/position_%d.json" diff --git a/services/slam/fake/slam_test.go b/services/slam/fake/slam_test.go index d1fec2eb90a..e4d91eadc97 100644 --- a/services/slam/fake/slam_test.go +++ b/services/slam/fake/slam_test.go @@ -32,8 +32,8 @@ func TestFakeSLAMGetPosition(t *testing.T) { // in floating point values between M1 mac & arm64 linux which // were causing tests to pass on M1 mac but fail on ci. expectedPose := spatialmath.NewPose( - r3.Vector{X: -0.005666600181385561, Y: -6.933830159344678e-10, Z: -0.013030459250151614}, - &spatialmath.Quaternion{Real: 0.9999999087728241, Imag: 0, Jmag: 0.0005374749356603168, Kmag: 0}) + r3.Vector{X: -0.005839621552532072747133, Y: 0.012640521020122929413132, Z: 0.000000000000000000}, + &spatialmath.Quaternion{Real: 0.9999998930633826, Imag: 0, Jmag: 0, Kmag: -0.000462464294427742}) test.That(t, spatialmath.PoseAlmostEqual(p, expectedPose), test.ShouldBeTrue) p2, componentReference, err := slamSvc.GetPosition(context.Background()) From d063dfeb57eb3d974877ccbc181dc556709fdac2 Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Tue, 25 Apr 2023 14:51:33 -0400 Subject: [PATCH 08/14] udpate marker --- web/frontend/src/components/slam-2d-render.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/frontend/src/components/slam-2d-render.vue b/web/frontend/src/components/slam-2d-render.vue index 5fab2638648..9c526740c9f 100644 --- a/web/frontend/src/components/slam-2d-render.vue +++ b/web/frontend/src/components/slam-2d-render.vue @@ -72,7 +72,7 @@ raycaster.on('click', (event) => { const markerSize = 0.5; const marker = new THREE.Mesh( - new THREE.PlaneGeometry(markerSize, markerSize).rotateX(-Math.PI / 2), + new THREE.PlaneGeometry(markerSize, markerSize), new THREE.MeshBasicMaterial({ color: 'red' }) ); marker.name = 'Marker'; From e90d9e0dbd632e2eb9c94f83f8eef27a3b7a1b98 Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Tue, 25 Apr 2023 16:13:56 -0400 Subject: [PATCH 09/14] update kinematic tests --- components/base/wheeled/kinematics_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/base/wheeled/kinematics_test.go b/components/base/wheeled/kinematics_test.go index dba593727b1..100fcd8cf5a 100644 --- a/components/base/wheeled/kinematics_test.go +++ b/components/base/wheeled/kinematics_test.go @@ -65,10 +65,10 @@ func TestWrapWithKinematics(t *testing.T) { kwb, ok := wb.(*kinematicWheeledBase) test.That(t, ok, test.ShouldBeTrue) limits := kwb.model.DoF() - test.That(t, limits[0].Min, test.ShouldBeLessThan, 0) - test.That(t, limits[1].Min, test.ShouldBeLessThan, 0) - test.That(t, limits[1].Max, test.ShouldBeGreaterThan, 0) - test.That(t, limits[1].Max, test.ShouldBeGreaterThan, 0) + test.That(t, limits[0].Min, test.ShouldBeLessThanOrEqualTo, 0) + test.That(t, limits[1].Min, test.ShouldBeLessThanOrEqualTo, 0) + test.That(t, limits[0].Max, test.ShouldBeGreaterThanOrEqualTo, 0) + test.That(t, limits[1].Max, test.ShouldBeGreaterThanOrEqualTo, 0) geometry, err := kwb.model.(*referenceframe.SimpleModel).Geometries(make([]referenceframe.Input, len(limits))) test.That(t, err, test.ShouldBeNil) test.That(t, geometry.GeometryByName(testCfg.Name+":"+label).AlmostEqual(expectedSphere), test.ShouldBeTrue) From 14eac46352224a3ddc2badfb35b565658384d5df Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Tue, 25 Apr 2023 17:06:18 -0400 Subject: [PATCH 10/14] fix fake base test --- components/base/fake/fake.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/base/fake/fake.go b/components/base/fake/fake.go index c66022572fc..cd7835fb890 100644 --- a/components/base/fake/fake.go +++ b/components/base/fake/fake.go @@ -116,7 +116,7 @@ func (b *Base) WrapWithKinematics(ctx context.Context, slamSvc slam.Service) (ba if err != nil { return nil, err } - limits := []referenceframe.Limit{{Min: dims.MinX, Max: dims.MaxX}, {Min: dims.MinZ, Max: dims.MaxZ}} + limits := []referenceframe.Limit{{Min: dims.MinX, Max: dims.MaxX}, {Min: dims.MinY, Max: dims.MaxY}} model, err := wheeled.MakeModelFrame(b.Name().ShortName(), geometry, limits) if err != nil { return nil, errors.Wrap(err, "fake base cannot be created") From 03e85d6a91393d634e15b3d6c2123c8ad3be236f Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Tue, 25 Apr 2023 17:44:48 -0400 Subject: [PATCH 11/14] fix kinematic tests --- components/base/wheeled/kinematics.go | 4 ++-- components/base/wheeled/kinematics_test.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/base/wheeled/kinematics.go b/components/base/wheeled/kinematics.go index c8a7c172175..810ed1c914d 100644 --- a/components/base/wheeled/kinematics.go +++ b/components/base/wheeled/kinematics.go @@ -35,7 +35,7 @@ func (wb *wheeledBase) WrapWithKinematics(ctx context.Context, slamSvc slam.Serv if err != nil { return nil, err } - model, err := MakeModelFrame(wb.name, geometry, []referenceframe.Limit{{Min: dims.MinX, Max: dims.MaxX}, {Min: dims.MinZ, Max: dims.MaxZ}}) + model, err := MakeModelFrame(wb.name, geometry, []referenceframe.Limit{{Min: dims.MinX, Max: dims.MaxX}, {Min: dims.MinY, Max: dims.MaxY}}) if err != nil { return nil, err } @@ -63,7 +63,7 @@ func (kwb *kinematicWheeledBase) GoToInputs(ctx context.Context, goal []referenc // MakeModelFrame builds the kinematic model associated with the kinematicWheeledBase // Note that this model is not intended to be registered in the frame system. func MakeModelFrame(name string, collisionGeometry spatialmath.Geometry, limits []referenceframe.Limit) (referenceframe.Model, error) { - // build the model - SLAM convention is that the XZ plane is the ground plane + // build the model - SLAM convention is that the XY plane is the ground plane frame2D, err := referenceframe.NewMobile2DFrame(collisionGeometry.Label(), limits, collisionGeometry) if err != nil { return nil, err diff --git a/components/base/wheeled/kinematics_test.go b/components/base/wheeled/kinematics_test.go index 100fcd8cf5a..84ac5492caf 100644 --- a/components/base/wheeled/kinematics_test.go +++ b/components/base/wheeled/kinematics_test.go @@ -65,10 +65,10 @@ func TestWrapWithKinematics(t *testing.T) { kwb, ok := wb.(*kinematicWheeledBase) test.That(t, ok, test.ShouldBeTrue) limits := kwb.model.DoF() - test.That(t, limits[0].Min, test.ShouldBeLessThanOrEqualTo, 0) - test.That(t, limits[1].Min, test.ShouldBeLessThanOrEqualTo, 0) - test.That(t, limits[0].Max, test.ShouldBeGreaterThanOrEqualTo, 0) - test.That(t, limits[1].Max, test.ShouldBeGreaterThanOrEqualTo, 0) + test.That(t, limits[0].Min, test.ShouldBeLessThan, 0) + test.That(t, limits[1].Min, test.ShouldBeLessThan, 0) + test.That(t, limits[0].Max, test.ShouldBeGreaterThan, 0) + test.That(t, limits[1].Max, test.ShouldBeGreaterThan, 0) geometry, err := kwb.model.(*referenceframe.SimpleModel).Geometries(make([]referenceframe.Input, len(limits))) test.That(t, err, test.ShouldBeNil) test.That(t, geometry.GeometryByName(testCfg.Name+":"+label).AlmostEqual(expectedSphere), test.ShouldBeTrue) From 9b1a76bc9d611f7e460b23f018bf5961874d2552 Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Wed, 26 Apr 2023 13:24:21 -0400 Subject: [PATCH 12/14] update artifacts --- .artifact/tree.json | 248 +++++++++++++++++++++++++------------------- 1 file changed, 142 insertions(+), 106 deletions(-) diff --git a/.artifact/tree.json b/.artifact/tree.json index 6ac1f5eb8ed..295725c9b60 100644 --- a/.artifact/tree.json +++ b/.artifact/tree.json @@ -50847,224 +50847,260 @@ "viam-office-02-22-2": { "internal_state": { "internal_state_0.pbstream": { - "hash": "c45a129e3bb88449c17591aa28877aed", - "size": 15854 + "hash": "abb4a1c3a1c25a8f2a8545b23198d96c", + "size": 23872 }, "internal_state_1.pbstream": { - "hash": "64f40901261a4a368fa5fe1cb197fe1c", - "size": 2812144 + "hash": "c7e6757aa2a21323a2dda2516bec7c4d", + "size": 2350050 }, "internal_state_10.pbstream": { - "hash": "3f668318747a004799caead607bf6065", - "size": 22207344 + "hash": "718e8ac405ae15c6de0645aa438ceb90", + "size": 12809381 }, "internal_state_11.pbstream": { - "hash": "cc713308a2766bbe0feaa6efb210d2e0", - "size": 23572480 + "hash": "d18956d693a38077c502b606ffb369db", + "size": 14224758 }, "internal_state_12.pbstream": { - "hash": "a153506f7cd833c341e5b015300a418c", - "size": 23381025 + "hash": "06aa485ba45a9a6e7635170327dc2348", + "size": 15790549 }, "internal_state_13.pbstream": { - "hash": "75706da112fc4e23dd17f7b6c326e12e", - "size": 23414263 + "hash": "b0cf93a2dca82c24c214acd66270ca7a", + "size": 17257004 }, "internal_state_14.pbstream": { - "hash": "7a6e2ef411a3642a930cc7d9c56839bb", - "size": 26705504 + "hash": "f1ee6291eacad4df24a53217955575cd", + "size": 18195708 }, "internal_state_15.pbstream": { - "hash": "a1e45c8ead61b48a5a208dccf30e5d5f", - "size": 28853515 + "hash": "3a104be614cf08dc90ccc0023ad0e18a", + "size": 19872898 }, "internal_state_16.pbstream": { - "hash": "b2d8d427a1bbd9f6af6a5211037bb6a3", - "size": 30836932 + "hash": "b953d8c10dddfb157c070809bb8bf4d3", + "size": 21550020 }, "internal_state_17.pbstream": { - "hash": "ee36674c26df9fe6a48db7d1ee24963e", - "size": 32057093 + "hash": "9bfd2f779bab1bcf6ce42493342bbd41", + "size": 22921669 + }, + "internal_state_18.pbstream": { + "hash": "09cd3e6c53f44713266d9e30a0549b62", + "size": 23938149 + }, + "internal_state_19.pbstream": { + "hash": "df0985a28f411926bc14fef611adfa9a", + "size": 25120461 }, "internal_state_2.pbstream": { - "hash": "45a4af36429216d4c51eee1a123975a4", - "size": 5435611 + "hash": "5ee848489452f600cdcb675e5eecdd95", + "size": 4183609 + }, + "internal_state_20.pbstream": { + "hash": "da4843b714baa293d3a3bfc1cbdf2e06", + "size": 25372551 }, "internal_state_3.pbstream": { - "hash": "99091c95873b82a90db4c16d94e572ba", - "size": 7424545 + "hash": "43966dcd778c11996bdeacef147b3cd6", + "size": 5783452 }, "internal_state_4.pbstream": { - "hash": "8e568f2bd65bc7cd2360491d5e7eddaf", - "size": 7460762 + "hash": "1119b0b7734acad11aa6b0f8fa67123b", + "size": 5855167 }, "internal_state_5.pbstream": { - "hash": "0ce26ce2f76514823bb73978d7048acd", - "size": 10297244 + "hash": "95a4a7a1394e13033f45721633289e27", + "size": 5871656 }, "internal_state_6.pbstream": { - "hash": "70e7810bbd899768fc64bc791ef033c1", - "size": 13147532 + "hash": "ca2096b2602bdb0a8d0227707cb38f74", + "size": 7189059 }, "internal_state_7.pbstream": { - "hash": "4aecfc067bb81c7e916b62774c6405aa", - "size": 14800927 + "hash": "e80e8fc96460c566ab90bc75905fe1fc", + "size": 9330424 }, "internal_state_8.pbstream": { - "hash": "0dd2e6d75ffef228a419015097ce84ad", - "size": 16954328 + "hash": "dd59af2c67c810142a4923fe3d2c06e9", + "size": 10618435 }, "internal_state_9.pbstream": { - "hash": "b094d749b031af7a91f01d6e4e2ae6e6", - "size": 19560436 + "hash": "6053faf0adb3dd5ee6892da56eaf06f4", + "size": 11445172 } }, "pointcloud": { "pointcloud_0.pcd": { - "hash": "b5f6cd31b36597a37dcf8b8ffdbbaee6", - "size": 170746 + "hash": "f1cac1f493278eea4a957664d74f2e9b", + "size": 206634 }, "pointcloud_1.pcd": { - "hash": "b971600b0db1f88f378968b989509f06", - "size": 4524796 + "hash": "ad611360ffaccf4c065521eb21456c5b", + "size": 2015532 }, "pointcloud_10.pcd": { - "hash": "dbe6d8c90bc36c329acb9519e5cca2cd", - "size": 18793518 + "hash": "11b6650ea351e28842482cb1512b1928", + "size": 6375212 }, "pointcloud_11.pcd": { - "hash": "ba35c9781182f37d474f753ff6444ef2", - "size": 19325550 + "hash": "77e26f6a7f41709cc41cb1e60b33b11f", + "size": 6148460 }, "pointcloud_12.pcd": { - "hash": "2774e355263ddc4237648c0225fc9322", - "size": 19972750 + "hash": "a0d65f21bf71433b82276f655105fff1", + "size": 6699052 }, "pointcloud_13.pcd": { - "hash": "0dfdcc6206fef6bb6ce133746a871cd7", - "size": 20164142 + "hash": "2483e0e32bea125b27ee73248c3fc7f3", + "size": 7082540 }, "pointcloud_14.pcd": { - "hash": "8748ed6057e4958cc8bed7c77e4e2175", - "size": 19000622 + "hash": "16aeadf4d76bfa4a1edb65bcb580959b", + "size": 7005420 }, "pointcloud_15.pcd": { - "hash": "596031d97ad94ed050a402591ffc25f0", - "size": 18800654 + "hash": "1055dc5de3fb55b62fc8b25a51c34091", + "size": 7238620 }, "pointcloud_16.pcd": { - "hash": "c2c4d2c5a264a1b158f7c153a8f9283a", - "size": 18336750 + "hash": "e61dcd8eeb13d7410339da117955f015", + "size": 7018108 }, "pointcloud_17.pcd": { - "hash": "c80a7d6cfcc0f1af6813d286ed5350fe", - "size": 18318142 + "hash": "7e4a8248033520d8c025b18b0e8f3c6d", + "size": 6770396 + }, + "pointcloud_18.pcd": { + "hash": "0bd65e9ee94bf61120ee96244d85912e", + "size": 6510204 + }, + "pointcloud_19.pcd": { + "hash": "504fe07786f6200e17839cf11d6ec9b5", + "size": 6205212 }, "pointcloud_2.pcd": { - "hash": "47d4212ab6f454cc54bd883a04fecbc6", - "size": 7536428 + "hash": "542e177548cc4ef86a70ba7035ccb9f2", + "size": 2979916 + }, + "pointcloud_20.pcd": { + "hash": "65909fa5d1fe08423339290ed9937b5a", + "size": 6183804 }, "pointcloud_3.pcd": { - "hash": "67701eea7cb97b9d823dea5ef3cb274e", - "size": 10192316 + "hash": "10f22cd990e15344a162649068e84b66", + "size": 3569100 }, "pointcloud_4.pcd": { - "hash": "4d951f6352b77ed51f1bc2f325d0d5c6", - "size": 10213964 + "hash": "03a7d5ce93650cf7a1bc799d17fcab44", + "size": 3607404 }, "pointcloud_5.pcd": { - "hash": "13951269e3033145d7a2df14bdf18354", - "size": 12536268 + "hash": "21912ce34ff59db6e5c5a041dc1c8b9e", + "size": 3646876 }, "pointcloud_6.pcd": { - "hash": "c478df84010df9e810597d3558c41853", - "size": 13721468 + "hash": "77b5c2d6d341a7b086265f72d7f4a4ce", + "size": 4326972 }, "pointcloud_7.pcd": { - "hash": "a68fef728011b459255f7e9780e28af1", - "size": 14798556 + "hash": "7cc8e257e339f8332a8702771d9b9c99", + "size": 4186812 }, "pointcloud_8.pcd": { - "hash": "fcaf0e840a3ef86cc5e69a6acd2d7ddb", - "size": 17032190 + "hash": "e6d291321194005eaf1d52299dbb78a9", + "size": 5387228 }, "pointcloud_9.pcd": { - "hash": "e6b57aa563114da93c34c653ecbf8903", - "size": 18981454 + "hash": "d49298b62a38f22c99282fe7a8b3a92b", + "size": 5488492 } }, "position": { "position_0.json": { - "hash": "5190ef17a7875549f52d38fd2176035e", - "size": 258 + "hash": "cea76ce8e16023e8c43c703630c79490", + "size": 259 }, "position_1.json": { - "hash": "8858a23f8cf0e0b2d9642b9c8d5abc92", - "size": 250 + "hash": "ef3ee81a5dabb9d6cd7f206d41d20e46", + "size": 249 }, "position_10.json": { - "hash": "fc8ff978c7a616059e7968c06e2460cb", - "size": 250 + "hash": "4aa49ce5abfc2415aa5db7880e897f44", + "size": 249 }, "position_11.json": { - "hash": "4e3a82bc5a268b5e3f0e66104094ed17", - "size": 248 + "hash": "e8db78c3ca49925b00a0e6de31e3a19b", + "size": 251 }, "position_12.json": { - "hash": "0171f3ff42af89e0836a7e2b70379e95", - "size": 247 + "hash": "f9a48a8d997ac3b3cb46e9d5087be5e4", + "size": 249 }, "position_13.json": { - "hash": "c18f2abec5b4d8960beb76548398fcce", - "size": 259 + "hash": "45b724173465d2fb028f0fb236c65b2e", + "size": 250 }, "position_14.json": { - "hash": "8131c2a087ff7d88ba6b1aaca50ad410", - "size": 250 + "hash": "a410cd9d1e8e093681972bf18dabe322", + "size": 258 }, "position_15.json": { - "hash": "f3c73d230cf51f633821f9b87474ba2e", + "hash": "91b66b84744422f03ed8fa4024666ea3", "size": 252 }, "position_16.json": { - "hash": "a8fe3783605e8ad38851d0f4b4049b94", - "size": 251 + "hash": "1c6037944502b1e2a1faca5f0293479a", + "size": 252 }, "position_17.json": { - "hash": "429c2b80ecc9fe1ca9eed8208ae5a79f", - "size": 250 + "hash": "5d5e779dc4f991345419173b926ea7bf", + "size": 252 + }, + "position_18.json": { + "hash": "0d5c0b3bd175f39ac39557213923266d", + "size": 249 + }, + "position_19.json": { + "hash": "8b53884c8e1ab09b8ef7fd889e8dcadb", + "size": 249 }, "position_2.json": { - "hash": "0354832bab2abc0fe8e7b45ef168fec9", - "size": 250 + "hash": "10e4badfa740b762f2f973bc4b6e8221", + "size": 251 + }, + "position_20.json": { + "hash": "1a1529fc779d1f1113f389b4a41e1a11", + "size": 249 }, "position_3.json": { - "hash": "e7639ced49f8ec800cc2de2c81bab6fd", - "size": 250 + "hash": "8c5eab4c8753cde58bac4ff766567b8f", + "size": 252 }, "position_4.json": { - "hash": "110764b72240827cfb17e3512dc3f589", - "size": 259 + "hash": "b3c076234d6b563f343ae2f67c2cdc37", + "size": 250 }, "position_5.json": { - "hash": "12c957ab618dcabb1fe010b06026a70f", - "size": 251 + "hash": "95ea0ed9dce33df79a6a71490fa38f8f", + "size": 253 }, "position_6.json": { - "hash": "8614db34685de0036be1e86bd0dd1ca3", - "size": 248 + "hash": "fa9370e6cc2d930547a9135f5f8d1d52", + "size": 251 }, "position_7.json": { - "hash": "300aec716968d85c27546c29961979e6", - "size": 248 + "hash": "1de5881743203fde13e90ef7461451a4", + "size": 246 }, "position_8.json": { - "hash": "8d608f95d2fb39838daf05535b4b5a9c", + "hash": "705cc45af019e8da13ab30709457ab05", "size": 250 }, "position_9.json": { - "hash": "0fb8612ef11681660ebec33ceed96d79", - "size": 252 + "hash": "c127298097d65f4fdc8a7805b47da3cd", + "size": 249 } } } From 0ad97cc63fda19ff1ea5b199f680d38f57cef7bc Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Wed, 26 Apr 2023 13:38:08 -0400 Subject: [PATCH 13/14] update int tests --- services/slam/fake/slam_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/slam/fake/slam_test.go b/services/slam/fake/slam_test.go index e4d91eadc97..99b9650955d 100644 --- a/services/slam/fake/slam_test.go +++ b/services/slam/fake/slam_test.go @@ -31,9 +31,11 @@ func TestFakeSLAMGetPosition(t *testing.T) { // spatialmath.PoseAlmostEqual is used here as tiny differences were observed // in floating point values between M1 mac & arm64 linux which // were causing tests to pass on M1 mac but fail on ci. + fmt.Println(p.Point()) + fmt.Println(p.Orientation().Quaternion()) expectedPose := spatialmath.NewPose( - r3.Vector{X: -0.005839621552532072747133, Y: 0.012640521020122929413132, Z: 0.000000000000000000}, - &spatialmath.Quaternion{Real: 0.9999998930633826, Imag: 0, Jmag: 0, Kmag: -0.000462464294427742}) + r3.Vector{X: -0.003863251944222634813586, Y: 0.011557528483632291405048, Z: 0.000000000000000000}, + &spatialmath.Quaternion{Real: 0.9999993072280227, Imag: 0, Jmag: 0, Kmag: -0.001177091107300157}) test.That(t, spatialmath.PoseAlmostEqual(p, expectedPose), test.ShouldBeTrue) p2, componentReference, err := slamSvc.GetPosition(context.Background()) From d88419792b34e08257bfc51885a1eee110e1f712 Mon Sep 17 00:00:00 2001 From: jeremyrhyde Date: Wed, 26 Apr 2023 13:53:09 -0400 Subject: [PATCH 14/14] lint --- services/slam/fake/slam_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/services/slam/fake/slam_test.go b/services/slam/fake/slam_test.go index 99b9650955d..625bb9cc8b6 100644 --- a/services/slam/fake/slam_test.go +++ b/services/slam/fake/slam_test.go @@ -31,8 +31,6 @@ func TestFakeSLAMGetPosition(t *testing.T) { // spatialmath.PoseAlmostEqual is used here as tiny differences were observed // in floating point values between M1 mac & arm64 linux which // were causing tests to pass on M1 mac but fail on ci. - fmt.Println(p.Point()) - fmt.Println(p.Orientation().Quaternion()) expectedPose := spatialmath.NewPose( r3.Vector{X: -0.003863251944222634813586, Y: 0.011557528483632291405048, Z: 0.000000000000000000}, &spatialmath.Quaternion{Real: 0.9999993072280227, Imag: 0, Jmag: 0, Kmag: -0.001177091107300157})