Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Jul 25, 2024
1 parent 2b3e87e commit 37996ca
Show file tree
Hide file tree
Showing 764 changed files with 24,879 additions and 34,186 deletions.
6 changes: 3 additions & 3 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
"@foxglove/den": "workspace:*",
"@foxglove/log": "workspace:*",
"@foxglove/rostime": "1.1.2",
"@foxglove/schemas": "1.6.0",
"@foxglove/schemas": "1.6.2",
"@foxglove/studio": "workspace:*",
"@foxglove/tsconfig": "2.0.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.11",
"@types/react": "18.2.23",
"@types/react-dom": "18.2.7",
"clean-webpack-plugin": "4.0.0",
"html-webpack-plugin": "5.5.3",
"html-webpack-plugin": "5.6.0",
"mathjs": "11.11.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"webpack": "5.88.2",
"webpack": "5.90.1",
"webpack-dev-server": "4.15.1"
}
}
17 changes: 11 additions & 6 deletions benchmark/src/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@

import { useMemo, useState } from "react";

import { App, IDataSourceFactory, AppSetting, LaunchPreferenceValue } from "@foxglove/studio-base";
import {
SharedRoot,
IDataSourceFactory,
AppSetting,
LaunchPreferenceValue,
StudioApp,
} from "@foxglove/studio-base";

import { McapLocalBenchmarkDataSourceFactory, SyntheticDataSourceFactory } from "./dataSources";
import { LAYOUTS } from "./layouts";
Expand Down Expand Up @@ -47,17 +53,16 @@ export function Root(): JSX.Element {
return sources;
}, []);

const [extensionLoaders] = useState(() => []);

const url = new URL(window.location.href);

return (
<App
<SharedRoot
enableLaunchPreferenceScreen={false}
deepLinks={[url.href]}
dataSources={dataSources}
appConfiguration={appConfiguration}
extensionLoaders={extensionLoaders}
/>
>
<StudioApp />
</SharedRoot>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
IDataSourceFactory,
DataSourceFactoryInitializeArgs,
} from "@foxglove/studio-base/context/PlayerSelectionContext";
import { DeserializingIterableSource } from "@foxglove/studio-base/players/IterablePlayer/DeserializingIterableSource";
import { McapIterableSource } from "@foxglove/studio-base/players/IterablePlayer/Mcap/McapIterableSource";
import { Player } from "@foxglove/studio-base/players/types";

Expand All @@ -25,7 +26,8 @@ class McapLocalBenchmarkDataSourceFactory implements IDataSourceFactory {
}

const mcapProvider = new McapIterableSource({ type: "file", file });
return new BenchmarkPlayer(file.name, mcapProvider);
const source = new DeserializingIterableSource(mcapProvider);
return new BenchmarkPlayer(file.name, source);
}
}

Expand Down
1 change: 0 additions & 1 deletion benchmark/src/layouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ function makeLayoutData(partialData: Pick<LayoutData, "configById">): LayoutData
configById: partialData.configById,
globalVariables: {},
userNodes: {},
playbackConfig: { speed: 1 },
};
}

Expand Down
11 changes: 7 additions & 4 deletions benchmark/src/players/BenchmarkPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { toRFC3339String } from "@foxglove/rostime";
import { MessageEvent } from "@foxglove/studio";
import { GlobalVariables } from "@foxglove/studio-base/hooks/useGlobalVariables";
import { BlockLoader } from "@foxglove/studio-base/players/IterablePlayer/BlockLoader";
import { IIterableSource } from "@foxglove/studio-base/players/IterablePlayer/IIterableSource";
import { IDeserializedIterableSource } from "@foxglove/studio-base/players/IterablePlayer/IIterableSource";
import PlayerProblemManager from "@foxglove/studio-base/players/PlayerProblemManager";
import {
AdvertiseOptions,
Expand All @@ -30,14 +30,14 @@ const MAX_BLOCKS = 400;
const CAPABILITIES: string[] = [PlayerCapabilities.playbackControl];

class BenchmarkPlayer implements Player {
#source: IIterableSource;
#source: IDeserializedIterableSource;
#name: string;
#listener?: (state: PlayerState) => Promise<void>;
#subscriptions: SubscribePayload[] = [];
#blockLoader?: BlockLoader;
#problemManager = new PlayerProblemManager();

public constructor(name: string, source: IIterableSource) {
public constructor(name: string, source: IDeserializedIterableSource) {
this.#name = name;
this.#source = source;
}
Expand Down Expand Up @@ -96,7 +96,7 @@ class BenchmarkPlayer implements Player {
}

do {
log.info("Waiting for topic subscriptions...");
log.info("Waiting for topic subscriptions");

// Allow the layout to subscribe to any messages it needs
await delay(500);
Expand All @@ -114,6 +114,7 @@ class BenchmarkPlayer implements Player {
currentTime: startTime,
startTime,
isPlaying: false,
repeatEnabled: false,
speed: 1,
lastSeekTime: 1,
endTime,
Expand Down Expand Up @@ -214,6 +215,7 @@ class BenchmarkPlayer implements Player {
endTime,
currentTime: msgEvent.receiveTime,
isPlaying: true,
repeatEnabled: false,
speed: 1,
lastSeekTime: 1,
topics,
Expand Down Expand Up @@ -263,6 +265,7 @@ class BenchmarkPlayer implements Player {
endTime,
currentTime: seekToMessage.receiveTime,
isPlaying: false,
repeatEnabled: false,
speed: 1,
lastSeekTime: Date.now(),
topics,
Expand Down
1 change: 1 addition & 0 deletions benchmark/src/players/PointcloudPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ class PointcloudPlayer implements Player {
currentTime: now,
startTime: this.#startTime,
isPlaying: true,
repeatEnabled: false,
speed: 1,
lastSeekTime: 1,
endTime: now,
Expand Down
1 change: 1 addition & 0 deletions benchmark/src/players/SinewavePlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class SinewavePlayer implements Player {
currentTime: now,
startTime: this.#startTime,
isPlaying: true,
repeatEnabled: false,
speed: 1,
lastSeekTime: 1,
endTime: now,
Expand Down
1 change: 1 addition & 0 deletions benchmark/src/players/TransformPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class TransformPlayer implements Player {
currentTime: timestamp,
startTime,
isPlaying: true,
repeatEnabled: false,
speed: 1,
lastSeekTime: 1,
endTime: timestamp,
Expand Down
3 changes: 3 additions & 0 deletions benchmark/src/players/TransformPreloadingPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class TransformPreloadingPlayer implements Player {
currentTime: this.#startTime,
startTime: this.#startTime,
isPlaying: false,
repeatEnabled: false,
speed: 1,
lastSeekTime: 1,
endTime: this.#endTime,
Expand Down Expand Up @@ -236,6 +237,7 @@ class TransformPreloadingPlayer implements Player {
endTime: this.#endTime,
currentTime: seekToMessage.receiveTime,
isPlaying: false,
repeatEnabled: false,
speed: 1,
lastSeekTime: Date.now(),
topics: this.#topics,
Expand Down Expand Up @@ -281,6 +283,7 @@ class TransformPreloadingPlayer implements Player {
endTime: this.#endTime,
currentTime: seekToMessage.receiveTime,
isPlaying: false,
repeatEnabled: false,
speed: 1,
lastSeekTime: Date.now(),
topics: this.#topics,
Expand Down
2 changes: 1 addition & 1 deletion benchmark/src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"compilerOptions": {
"noEmit": true,
"jsx": "react-jsx",
"lib": ["dom", "dom.iterable", "es2022", "webworker"],
"lib": ["dom", "dom.iterable", "es2022", "webworker", "ESNext.Disposable"],
"experimentalDecorators": true,
"useUnknownInCatchVariables": false,
"paths": {
Expand Down
5 changes: 5 additions & 0 deletions benchmark/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ const devServerConfig: WebpackConfiguration = {
// "[WDS] Disconnected!"
// Since we are only connecting to localhost, DNS rebinding attacks are not a concern during dev
allowedHosts: "all",
headers: {
// Enable cross-origin isolation: https://resourcepolicy.fyi
"cross-origin-opener-policy": "same-origin",
"cross-origin-embedder-policy": "credentialless",
},
},

plugins: [new CleanWebpackPlugin()],
Expand Down
1 change: 0 additions & 1 deletion ci/lint-unused-exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ async function main(): Promise<void> {
String.raw`packages/studio-base/src/index\.ts`,
String.raw`packages/studio-base/src/panels/ThreeDeeRender/transforms/index\.ts`, // `export *` is not correctly analyzed <https://github.com/pzavolinsky/ts-unused-exports/issues/286>
String.raw`packages/studio-base/src/test/`,
String.raw`packages/studio-base/src/players/UserNodePlayer/nodeTransformerWorker/typescript/userUtils/`,
].join("|"),
);

Expand Down
21 changes: 0 additions & 21 deletions ci/vercel-ignore-build.sh

This file was deleted.

26 changes: 26 additions & 0 deletions demo/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
x-common-config: &common-config
network_mode: host
ipc: host
environment:
- RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
- ROS_DOMAIN_ID=${ROS_DOMAIN_ID:-0}

services:
foxglove:
image: husarion/foxglove:improvements-nightly
<<: *common-config
ports:
- 8080:8080
volumes:
- ./foxglove-layout.json:/foxglove/default-layout.json
- ../Caddyfile:/etc/caddy/Caddyfile
environment:
- DISABLE_CACHE=true
- DISABLE_INTERACTION=false

foxglove-ds:
image: husarion/foxglove-bridge:humble-0.7.7-20240708
<<: *common-config
ports:
- 8765:8765
command: ros2 launch foxglove_bridge foxglove_bridge_launch.xml port:=8765 capabilities:=[clientPublish,parameters,parametersSubscribe,services,connectionGraph,assets]
Loading

0 comments on commit 37996ca

Please sign in to comment.