Skip to content

Commit

Permalink
Update packages/webviz-core from internal repo (#299)
Browse files Browse the repository at this point in the history
This adds support for connecting to a rosbridge_server over a WebSocket connection. By default it
connects to ws://localhost:9090, but you can change this by using the `?rosbridge-websocket-url=…`
query parameter. In the future we will add better UI and documentation for this.

This fixes #118 #170 #209.

Other fixes:
- Fixed not being able to select stacked objects in the 3D panel.
- Various improvements to the rosout panel.
  • Loading branch information
janpaul123 committed Dec 26, 2019
1 parent e9835e5 commit e42aa83
Show file tree
Hide file tree
Showing 53 changed files with 2,562 additions and 1,086 deletions.
433 changes: 427 additions & 6 deletions packages/webviz-core/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/webviz-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"redux-thunk": "2.3.0",
"reselect": "4.0.0",
"rosbag": "2.1.0",
"roslib": "RobotWebTools/roslibjs#c10d9eca43ad51cc89b335d00e81f647cbcb77d3",
"sanitize-html": "1.20.0",
"shallowequal": "1.1.0",
"string-hash": "1.1.3",
Expand Down
Binary file not shown.
7 changes: 1 addition & 6 deletions packages/webviz-core/src/PanelAPI/useDataSourceInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ export type DataSourceInfo = {|
topics: $ReadOnlyArray<Topic>,
datatypes: RosDatatypes,
capabilities: string[],
startTime: ?Time,
endTime: ?Time,
startTime: ?Time, // Only `startTime`, since `endTime` can change rapidly when connected to a live system.
playerId: string,
|};

Expand All @@ -30,9 +29,6 @@ export default function useDataSourceInfo(): DataSourceInfo {
const startTime = useMessagePipeline(
useCallback(({ playerState: { activeData } }) => activeData && activeData.startTime, [])
);
const endTime = useMessagePipeline(
useCallback(({ playerState: { activeData } }) => activeData && activeData.endTime, [])
);
const capabilities = useMessagePipeline(
useCallback(({ playerState: { capabilities: playerStateCapabilities } }) => playerStateCapabilities, [])
);
Expand All @@ -45,7 +41,6 @@ export default function useDataSourceInfo(): DataSourceInfo {
datatypes,
capabilities,
startTime,
endTime,
playerId,
};
}
9 changes: 2 additions & 7 deletions packages/webviz-core/src/PanelAPI/useDataSourceInfo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ describe("useDataSourceInfo", () => {
datatypes={datatypes}
capabilities={["hello"]}
messages={[messages[0]]}
startTime={{ sec: 0, nsec: 1 }}
endTime={{ sec: 10, nsec: 0 }}>
startTime={{ sec: 0, nsec: 1 }}>
<Test />
</MockMessagePipelineProvider>
);
Expand All @@ -63,7 +62,6 @@ describe("useDataSourceInfo", () => {
datatypes: { Foo: { fields: [] } },
capabilities: ["hello"],
startTime: { sec: 0, nsec: 1 },
endTime: { sec: 10, nsec: 0 },
playerId: "1",
},
],
Expand All @@ -79,8 +77,7 @@ describe("useDataSourceInfo", () => {
datatypes={datatypes}
capabilities={["hello"]}
messages={[messages[0]]}
startTime={{ sec: 0, nsec: 1 }}
endTime={{ sec: 10, nsec: 0 }}>
startTime={{ sec: 0, nsec: 1 }}>
<Test />
</MockMessagePipelineProvider>
);
Expand All @@ -91,7 +88,6 @@ describe("useDataSourceInfo", () => {
datatypes: { Foo: { fields: [] } },
capabilities: ["hello"],
startTime: { sec: 0, nsec: 1 },
endTime: { sec: 10, nsec: 0 },
playerId: "1",
},
],
Expand All @@ -109,7 +105,6 @@ describe("useDataSourceInfo", () => {
datatypes: { Foo: { fields: [] } },
capabilities: ["hello"],
startTime: { sec: 0, nsec: 1 },
endTime: { sec: 10, nsec: 0 },
playerId: "1",
},
],
Expand Down
4 changes: 3 additions & 1 deletion packages/webviz-core/src/components/AppMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ class UnconnectedAppMenu extends Component<Props, State> {
this.props.savePanelConfig({ id, config: panelConfig, defaultConfig: {} });
}
this.props.changePanelLayout(newPanels);
window.ga("send", "event", "Panel", "Select", panelType);
if (window.ga) {
window.ga("send", "event", "Panel", "Select", panelType);
}
};

render() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@
flex-shrink: 1;
}
}

option:disabled {
color: gray;
cursor: not-allowed;
}
177 changes: 0 additions & 177 deletions packages/webviz-core/src/components/LargeList.js

This file was deleted.

Loading

0 comments on commit e42aa83

Please sign in to comment.