From 95bd9dbea09e45e19c8f27dca847b56d6349fbdb Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Tue, 10 Oct 2023 23:35:45 +0800 Subject: [PATCH 1/9] Set max heap size Signed-off-by: Aaron Chong --- .github/workflows/dashboard.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index 53e8dd6af..807e1c1f7 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -36,6 +36,8 @@ jobs: package: rmf-dashboard skip-build: true - name: unit test + env: + NODE_OPTIONS: "--max_old_space_size=4096" run: . /rmf_demos_ws/install/setup.bash && pnpm run test:coverage - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 From f98245821da42be096734ccf3c9724fc2a866463 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Tue, 10 Oct 2023 23:53:10 +0800 Subject: [PATCH 2/9] Stop producing sourcemap for CI Signed-off-by: Aaron Chong --- .github/workflows/dashboard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index 807e1c1f7..82ebc979a 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -37,7 +37,7 @@ jobs: skip-build: true - name: unit test env: - NODE_OPTIONS: "--max_old_space_size=4096" + GENERATE_SOURCEMAP: false run: . /rmf_demos_ws/install/setup.bash && pnpm run test:coverage - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 From e991558b8a6d11a79733b32c2659ef165b20c910 Mon Sep 17 00:00:00 2001 From: angatupyry Date: Tue, 10 Oct 2023 16:16:43 -0300 Subject: [PATCH 3/9] max space to ci Signed-off-by: angatupyry --- .github/workflows/dashboard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index 82ebc979a..6c277a849 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -37,7 +37,7 @@ jobs: skip-build: true - name: unit test env: - GENERATE_SOURCEMAP: false + NODE_OPTIONS: '--max_old_space_size=4096' run: . /rmf_demos_ws/install/setup.bash && pnpm run test:coverage - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 From d256489fcfaa9fd0fd5642083008beec6565e15d Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Wed, 11 Oct 2023 09:01:25 +0800 Subject: [PATCH 4/9] Try build without sourcemap for CI, alongside heap size increment Signed-off-by: Aaron Chong --- .github/workflows/dashboard.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index 6c277a849..b912fd05e 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -37,7 +37,8 @@ jobs: skip-build: true - name: unit test env: - NODE_OPTIONS: '--max_old_space_size=4096' + NODE_OPTIONS: '--max_old_space_size=8192' + GENERATE_SOURCEMAP: false run: . /rmf_demos_ws/install/setup.bash && pnpm run test:coverage - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 From 37e69b9d6a16a7001dd8ace637f2deb265567c67 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Wed, 11 Oct 2023 09:17:55 +0800 Subject: [PATCH 5/9] Increasing heapsize on bootstrap step Signed-off-by: Aaron Chong --- .github/workflows/dashboard.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index b912fd05e..ad17be889 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -31,14 +31,13 @@ jobs: - name: setup python run: apt update && apt install -y python3-venv python-is-python3 - name: bootstrap + env: + NODE_OPTIONS: '--max_old_space_size=4096' uses: ./.github/actions/bootstrap with: package: rmf-dashboard skip-build: true - name: unit test - env: - NODE_OPTIONS: '--max_old_space_size=8192' - GENERATE_SOURCEMAP: false run: . /rmf_demos_ws/install/setup.bash && pnpm run test:coverage - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 From c4a77f1930485607c9b1cb652b7c468e70e8632c Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Wed, 11 Oct 2023 17:41:32 +0800 Subject: [PATCH 6/9] Use experimental support for ECMAScript modules Signed-off-by: Aaron Chong --- .github/workflows/dashboard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index ad17be889..683a7fc41 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -32,7 +32,7 @@ jobs: run: apt update && apt install -y python3-venv python-is-python3 - name: bootstrap env: - NODE_OPTIONS: '--max_old_space_size=4096' + NODE_OPTIONS: '--max_old_space_size=4096 --experimental-vm-modules' uses: ./.github/actions/bootstrap with: package: rmf-dashboard From 90d51496f6529e2d2302ec7d48b91c5ee90194f5 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Wed, 11 Oct 2023 18:04:13 +0800 Subject: [PATCH 7/9] Use react-components as a module instead Signed-off-by: Aaron Chong --- .github/workflows/dashboard.yml | 2 +- packages/react-components/package.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dashboard.yml b/.github/workflows/dashboard.yml index 683a7fc41..ad17be889 100644 --- a/.github/workflows/dashboard.yml +++ b/.github/workflows/dashboard.yml @@ -32,7 +32,7 @@ jobs: run: apt update && apt install -y python3-venv python-is-python3 - name: bootstrap env: - NODE_OPTIONS: '--max_old_space_size=4096 --experimental-vm-modules' + NODE_OPTIONS: '--max_old_space_size=4096' uses: ./.github/actions/bootstrap with: package: rmf-dashboard diff --git a/packages/react-components/package.json b/packages/react-components/package.json index 6c0d719a0..227ea05d6 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -114,5 +114,6 @@ "react-grid-layout": "^1.3.4", "react-router": "^5.2.0", "react-router-dom": "^5.2.0" - } + }, + "type": "module" } From f61c69da2c36ec6fe0707829a010d77b9f1f6617 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Wed, 11 Oct 2023 21:56:20 +0800 Subject: [PATCH 8/9] Remove use of meshes for robot icons Signed-off-by: Aaron Chong --- .../components/three-fiber/robot-three.tsx | 9 +-- .../lib/map/three-fiber/robot-three-maker.tsx | 61 +++---------------- 2 files changed, 9 insertions(+), 61 deletions(-) diff --git a/packages/dashboard/src/components/three-fiber/robot-three.tsx b/packages/dashboard/src/components/three-fiber/robot-three.tsx index 632a13ab4..95edd62d5 100644 --- a/packages/dashboard/src/components/three-fiber/robot-three.tsx +++ b/packages/dashboard/src/components/three-fiber/robot-three.tsx @@ -8,15 +8,9 @@ interface RobotThreeProps { robots: RobotData[]; robotLocations: Record; onRobotClick?: (ev: ThreeEvent, robot: RobotData) => void; - objectModel?: string; } -export const RobotThree = ({ - robots, - robotLocations, - onRobotClick, - objectModel, //Object model should be some path of the object to be rendered. -}: RobotThreeProps) => { +export const RobotThree = ({ robots, robotLocations, onRobotClick }: RobotThreeProps) => { const STANDAR_Z_POSITION = 4; const CIRCLE_SEGMENT = 64; @@ -34,7 +28,6 @@ export const RobotThree = ({ robot={robot} position={position} onRobotClick={onRobotClick} - objectModel={objectModel} rotation={new Euler(0, 0, rotationZ)} circleSegment={CIRCLE_SEGMENT} /> diff --git a/packages/react-components/lib/map/three-fiber/robot-three-maker.tsx b/packages/react-components/lib/map/three-fiber/robot-three-maker.tsx index 180346f81..306f3e144 100644 --- a/packages/react-components/lib/map/three-fiber/robot-three-maker.tsx +++ b/packages/react-components/lib/map/three-fiber/robot-three-maker.tsx @@ -1,9 +1,7 @@ import { Circle, Line, Text } from '@react-three/drei'; -import { ThreeEvent, useLoader } from '@react-three/fiber'; +import { ThreeEvent } from '@react-three/fiber'; import React from 'react'; import { Euler, Vector3 } from 'three'; -import { MTLLoader } from 'three/examples/jsm/loaders/MTLLoader'; -import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader'; export interface RobotData { fleet: string; @@ -23,18 +21,10 @@ interface CircleShapeProps { segment: number; } -interface ObjectLoaderProps { - position: Vector3; - rotation: THREE.Euler; - onRobotClick?: (ev: ThreeEvent) => void; - robot: RobotData; -} - interface RobotThreeMakerProps { robot: RobotData; position: Vector3; onRobotClick?: (ev: ThreeEvent, robot: RobotData) => void; - objectModel?: string; rotation: Euler; circleSegment: number; } @@ -70,35 +60,10 @@ const CircleShape = ({ ); }; -const ObjectLoader = ({ - position, - rotation, - onRobotClick, - robot, -}: ObjectLoaderProps): JSX.Element => { - const objPath = '/Hatchback/meshes/hatchback.obj'; - const mtlPath = '/Hatchback/meshes/hatchback.mtl'; - const objectRef = React.useRef(null); - const scale = new Vector3(0.007, 0.007, 0.007); - - const materials = useLoader(MTLLoader, mtlPath); - const object = useLoader(OBJLoader, objPath, (loader) => { - materials.preload(); - loader.setMaterials(materials); - }); - return ( - - - - - ); -}; - export const RobotThreeMaker = ({ robot, position, onRobotClick, - objectModel, //Object model should be some path of the object to be rendered. rotation, circleSegment, }: RobotThreeMakerProps): JSX.Element => { @@ -107,23 +72,13 @@ export const RobotThreeMaker = ({ {robot.name} - - {objectModel ? ( - ) => onRobotClick && onRobotClick(ev, robot)} - robot={robot} - /> - ) : ( - ) => onRobotClick && onRobotClick(ev, robot)} - robot={robot} - segment={circleSegment} - /> - )} + ) => onRobotClick && onRobotClick(ev, robot)} + robot={robot} + segment={circleSegment} + /> ); }; From 7a07282b5d2b98f65a9e70b0d80bca5b60443e6a Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Wed, 11 Oct 2023 21:58:43 +0800 Subject: [PATCH 9/9] Revert module call Signed-off-by: Aaron Chong --- packages/react-components/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react-components/package.json b/packages/react-components/package.json index 227ea05d6..6c0d719a0 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -114,6 +114,5 @@ "react-grid-layout": "^1.3.4", "react-router": "^5.2.0", "react-router-dom": "^5.2.0" - }, - "type": "module" + } }