Comments (13)
That said, I'll also think more about releasing it as an npm package, even with a limited API, just to make it easier to integrate. It shouldn't be too difficult.
from webviz.
It might be useful to look at the npm run docs-deploy
command. It puts all files (after having run npm run build
) into a temporary directory which is then published to our gh-pages
branch, but you can also just statically host that directory yourself.
I'd first get that working before messing with webpack configs.
from webviz.
Thanks. But the gh-pages branch also hosts its files in the default dist/
subdirectory. I should be able to override that by replacing the output.publicPath
setting, but it does not work. Perhaps there is somewhere else in the code where it is hardcoded?
from webviz.
Possibly. I would recommend starting with a working setup, and then making small changes, making sure that nothing breaks in the meantime.
from webviz.
I believe I can build the demo website OK, the question is more about how to deploy it on sites other than the demo site, with different URL layout, and not re-using the same example HTML pages. A lot of this repo is, for instance, documentation about Worldview, which I don't want to deploy to my server.
from webviz.
Yeah, we intend for people to use webviz.io/app, so if you want to build your own custom version of Webviz then for now you'll have to figure that stuff out yourself. I'd be interested in learning about the reasons for why you want to customize Webviz, and see if we could instead add features to the tool that everyone would benefit from. But for now I'll close this ticket since customization is an unsupported use case (I'll make a PR to clarify that in the docs a bit better).
from webviz.
I have a web interface to a library of data collected from AUVs. Right now it mostly provides upload, download, and search capabilities. I'd like to embed Webviz for visualization and ideally replace drag and drop with the ability to select a file from the database.
from webviz.
Ah I see. What about linking out to webviz.io/app
? You can currently stream bags and set layouts and such through the URL (example). See the help page in the top-right corner of the app for more customization for loading data into Webviz. You can probably even do this in an iframe if you really want to.
from webviz.
Yes that's a good idea, but it is a concern that the public instance might not be compatible in the future. Suppose we are trying to load .rosbags from a decade ago, and everyone has been using ROS 2.0 for a long time, and you have come up with a new format for specifying layouts, etc. etc. and you don't want to be burdened with backwards compatibility issues.
Also we might want to customize it to only display a fixed set of views and remove the ability for the user to customize it, or add components for specific topics that our vehicles generate that are not useful to commit to the upstream project, etc.
So I would encourage you to think about releasing webviz-core as a regular NPM package and providing a way to integrate with other apps. The webviz.io site is wonderful for end-users but there's a lot of potential in making it possible to integrate into other complex apps.
Also, when we are taking this system out to sea, we would not be able to connect to webviz.io over our limited satellite uplink, so having a local copy is important. (But as mentioned I can build the docs site just fine so it's not a big issue.)
from webviz.
Ah thanks for explaining!
Yes that's a good idea, but it is a concern that the public instance might not be compatible in the future. Suppose we are trying to load .rosbags from a decade ago, and everyone has been using ROS 2.0 for a long time, and you have come up with a new format for specifying layouts, etc. etc. and you don't want to be burdened with backwards compatibility issues.
We do intend to keep Webviz backwards compatible as much as possible. Internally we have no intention of switching to ROS 2.0 since we've heavily forked ROS 1.0, so hopefully we won't have too many issues there. And if there is a compatibility issue you can always check out an older version from our repo.
Also we might want to customize it to only display a fixed set of views and remove the ability for the user to customize it, or add components for specific topics that our vehicles generate that are not useful to commit to the upstream project, etc.
Yeah that's a good point, but we try to as much as possible keep Webviz generic and instead express customizations like that in nodes. For example, you can use Python nodes to generate RViz markers, without having to customize RViz itself for your use case. For plots we have the generic 2D Plot panel where you can draw arbitrary plots. We also have a panel in Webviz called Node Playground where you can write nodes in the browser itself.
Of course if you need to heavily customize things, then that's always possible, but I'd generally discourage that since it makes it harder to resolve merge conflicts if you want to stay up to date with Webviz improvements that we publish.
Also, when we are taking this system out to sea, we would not be able to connect to webviz.io over our limited satellite uplink, so having a local copy is important. (But as mentioned I can build the docs site just fine so it's not a big issue.)
Yeah for that I would recommend just checking out our gh-pages branch and statically hosting it. Or building the docs site like you said. 👍
from webviz.
@rgov did you end up getting this to work?
from webviz.
I think so, yes. I have a custom config module like this:
var config = require("/webviz/webpack.config")
config.output.publicPath = "/static/webviz/"
module.exports = config
And I use a Docker container to run
npm run bootstrap
# Based on the "build" script defined in package.json, but we override the
# Webpack config to make some customizations
npx lerna run build
npx webpack --env.NODE_ENV=development --config /webpack.config.customized.js
It's not ideal but works alright.
A supported way of making builds with custom visualization plugins would be cool.
from webviz.
@rgov I'm trying the same but it's not working for me
overall webpack builds it but doesn't serve it. and I don't get to see anything in the static folder afterwards either
from webviz.
Related Issues (20)
- webviz-core add new route failed HOT 1
- Delayed laserscans when clock times are out of sync HOT 1
- Bag not available HOT 2
- How large rosbag can webviz remote load?
- Consume React components directly HOT 3
- Errors when bootstraping the app HOT 1
- Error in fetching topics and datatypes HOT 1
- npm run bootstrap error
- Wrong visulization when coordinate values are large HOT 1
- Please update the invite HOT 1
- Pause button does not work HOT 2
- Why is the setting for transparency not working? HOT 1
- Can this this application be used as a part of custom application
- Can this application be used as a part of custom application? HOT 2
- Which node version should be used under Windows
- Information on the audio panal?
- Wrong Numeric Interpretation: how to fix? HOT 1
- ROS Demo.bag not available HOT 1
- /dist/vendor.js" Error (404): "Not found HOT 1
- root@ build-static-webviz: `lerna run build && rm -rf __static_webviz__ && cp -r docs/public/app __static_webviz__ && rm __static_webviz__/index.html && cp packages/webviz-core/public/index.html __static_webviz__/index.html && sed -i -- 's/\/dist\/webvizCoreBundle.js/webvizCoreBundle.js/' __static_webviz__/index.html && NODE_ENV=production STATIC_WEBVIZ=true webpack`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webviz.