-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9f1078
commit 4171a75
Showing
158 changed files
with
48,510 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
build | ||
node_modules | ||
npm-debug.log | ||
client/build | ||
client/node_modules | ||
client/npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
tab_width = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
quote_type = single |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
parserOptions: { | ||
ecmaVersion: 2019, | ||
sourceType: 'module', | ||
}, | ||
env: { | ||
node: true, | ||
}, | ||
extends: ['eslint:recommended'], | ||
rules: { | ||
semi: ['warn', 'always'], | ||
'no-console': 'off', | ||
'no-unused-vars': ['warn', { ignoreRestSiblings: true }], | ||
'prefer-const': 'warn', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"singleQuote": true, | ||
"printWidth": 120 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"eslint.validate": ["javascript"], | ||
"eslint.format.enable": true, | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"editor.formatOnPaste": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM node:14.17.3-alpine3.14 | ||
|
||
RUN apk update && apk add git yarn | ||
|
||
# use changes to package.json to force Docker not to use the cache | ||
# when we change our application's nodejs dependencies: | ||
ADD package.json /tmp/package.json | ||
RUN cd /tmp && yarn install | ||
RUN mkdir -p /opt/app && cp -a /tmp/node_modules /opt/app/ | ||
|
||
RUN mkdir -p /tmp/client | ||
ADD client/package.json /tmp/client/package.json | ||
RUN cd /tmp/client && yarn install | ||
RUN mkdir -p /opt/app/client && cp -a /tmp/client/node_modules /opt/app/client/ | ||
|
||
# From here we load our application's code in, therefore the previous docker | ||
# "layer" thats been cached will be used if possible | ||
WORKDIR /opt/app | ||
ADD . /opt/app | ||
|
||
WORKDIR /opt/app/client | ||
RUN NODE_ENV='production' yarn run build | ||
|
||
# value for ARG can be provided during the build | ||
# otherwise the default below will be used | ||
ARG odoviz_port=3001 | ||
ARG odoviz_data_dir=/data | ||
|
||
# the ENV variables can be replaced when the container is created | ||
ENV ODOVIZ_PORT=$odoviz_port | ||
ENV ODOVIZ_DATA_DIR=$odoviz_data_dir | ||
|
||
EXPOSE $odoviz_port | ||
|
||
WORKDIR /opt/app | ||
CMD ["yarn", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,55 @@ | ||
# odoviz | ||
3D Visualization and Processing Tool | ||
<h1 align="center">OdoViz: A 3D Processing and Visualization Tool</h1> | ||
|
||
<div align="center"> | ||
OdoViz is a reactive web-based tool for 3D visualization and processing of autonomous vehicle datasets designed to support common tasks in visual place recognition research. | ||
</div> | ||
|
||
## Live Demo | ||
|
||
You can access the hosted demo [here](https://odoviz.cs.nuim.ie). | ||
|
||
## Quick Start | ||
|
||
### 1. Clone the repo | ||
|
||
```sh | ||
git clone https://github.com/robotvisionmu/odoviz.git | ||
cd odoviz | ||
``` | ||
|
||
You can then setup and start the server in one of the following methods: | ||
|
||
- using docker | ||
- using npm/yarn. | ||
|
||
### 2a. Docker | ||
|
||
```sh | ||
# Build container | ||
docker build -t odoviz:latest . | ||
|
||
# Set DATA_DIR and execute container | ||
export PORT=3001 DATA_DIR=<datasets_dir> | ||
docker run --rm -d -v $DATA_DIR:/data -p $PORT:3001 odoviz:latest | ||
``` | ||
|
||
### 2b. Without Docker | ||
|
||
```sh | ||
# Install dependencies and build client app | ||
cd client | ||
yarn install | ||
NODE_ENV=production yarn run build | ||
|
||
# Install dependencies for server | ||
cd .. | ||
yarn install | ||
|
||
# Set DATA_DIR and start server | ||
export PORT=3001 DATA_DIR=<datasets_dir> | ||
yarn start | ||
``` | ||
|
||
### 3. Accessing the front-end | ||
|
||
Once the server is started (using Docker or yarn), you can open http://localhost:3001 and use it. Video tutorials have been made available on [YouTube](https://www.youtube.com/playlist?list=PLKIavzsN4tuGi1SKDSPss0M8v4zswVEn9) to assist the user in getting to know the system better. For more details about the client, please refer to the [client README.md](client/README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
module.exports = { | ||
parserOptions: { | ||
ecmaVersion: 2019, | ||
sourceType: 'module', | ||
}, | ||
env: { | ||
es6: true, | ||
browser: true, | ||
}, | ||
extends: ['eslint:recommended', 'react-app', 'plugin:import/errors', 'plugin:import/warnings'], | ||
plugins: ['import'], | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx'], | ||
moduleDirectory: ['node_modules', 'src/'], | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
semi: ['warn', 'always'], | ||
'no-console': 'off', | ||
'no-unused-vars': ['warn', { ignoreRestSiblings: true }], | ||
'prefer-const': 'warn', | ||
'import/first': 'warn', | ||
'import/newline-after-import': 'warn', | ||
'import/no-duplicates': 'warn', | ||
'import/order': [ | ||
'warn', | ||
{ | ||
warnOnUnassignedImports: true, | ||
groups: ['builtin', 'external', 'internal', ['parent', 'sibling']], | ||
pathGroups: [ | ||
{ | ||
pattern: '+(react|react-redux)', | ||
group: 'builtin', | ||
position: 'before', | ||
}, | ||
{ | ||
pattern: '*.scss', | ||
group: 'index', | ||
patternOptions: { matchBase: true }, | ||
position: 'after', | ||
}, | ||
], | ||
pathGroupsExcludedImportTypes: ['builtin', 'react'], | ||
'newlines-between': 'always', | ||
alphabetize: { | ||
order: 'asc', | ||
caseInsensitive: true, | ||
}, | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
|
||
# build dir | ||
build/ | ||
|
||
# add scss files instead of css | ||
*.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 - Present Saravanabalagi Ramachandran | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<h1 align="center">OdoViz: React Client</h1> | ||
|
||
<div align="center"> | ||
This repo contains the reactive web-based OdoViz rich client front-end operated alongside a thin server that serves the dataset files. It's loosely coupled design allows you to easily use it with your own server. | ||
</div> | ||
|
||
## Quick Start | ||
|
||
The instructions given in the parent directory already includes as part of it building the client front-end app into [build](build) directory. | ||
|
||
However, if you want to build and run the client separately | ||
|
||
``` | ||
cd <to_this_dir> | ||
yarn install | ||
yarn run build | ||
``` | ||
|
||
The app is fully functional offline after the initial page load, except for the features that inherently require internet e.g. maps. The build process creates static files that can be accessed by directly opening [build/index.html](build/index.html) in the browser. The app will still require dataset files to be served. | ||
|
||
## Serving dataset files | ||
|
||
The web-client expect the dataset files to be downloadable at `/files`, with an [autoindex JSON API](https://www.npmjs.com/package/autoindex-json) conforming to [NGINX JSON autoindex](http://nginx.org/en/docs/http/ngx_http_autoindex_module.html#autoindex_format) output standards for browsing the data directories at `/files?path=<path>`. | ||
|
||
## Setting up with a Custom Server | ||
|
||
1. Build the app | ||
1. Make the dataset files [browsable and downloadable](#serving-dataset-files) | ||
1. Static-serve [build](build) directory containing the app from your server. | ||
|
||
## Setting up a Custom Parser | ||
|
||
OdoViz supports customizing existing parsers and allows adding parsers for new datasets with ease. For more details, please refer to the [parsers](src/parsers) page. | ||
|
||
<h1 align="center">Developer Instructions</h1> | ||
|
||
## Dev Server | ||
|
||
```sh | ||
# keep the server running in another terminal / background | ||
cd <to_this_dir> | ||
yarn install | ||
yarn start | ||
``` | ||
|
||
This should start a [HMR](https://webpack.js.org/guides/hot-module-replacement/) dev server on http://localhost:3000. File requests will be proxied to the server running at http://localhost:3001, check [package.json](package.json) to edit this setting. | ||
|
||
The changes made to the client code will now reflect on the dev server on-the-go. | ||
|
||
If you would like the changes to be made public on this repo, please follow the instructions given in [CONTRIBUTING.md](/docs/CONTRIBUTING.md). Contributions are very welcome! | ||
|
||
## Extensions | ||
|
||
More information about extensions such as [Analyze Distances Extension](src/extensions/distances) and [Analyze Locations Extension](src/extensions/locations) are provided in the respective extension source code directories. | ||
You can add new extensions to [src/extensions/extensions.js](src/extensions/extensions.js) copying the same structure of the existing extensions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": "./src" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"name": "odoviz-react-client", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"repository": "https://github.com/robotvisionmu/odoviz/tree/main/client", | ||
"author": "Saravanabalagi Ramachandran <saravanabalagi@hotmail.com>", | ||
"dependencies": { | ||
"@fortawesome/fontawesome-svg-core": "^1.2.19", | ||
"@fortawesome/free-brands-svg-icons": "^5.15.3", | ||
"@fortawesome/free-solid-svg-icons": "^5.9.0", | ||
"@fortawesome/react-fontawesome": "^0.1.4", | ||
"@material-ui/core": "^4.9.7", | ||
"@material-ui/lab": "^4.0.0-alpha.58", | ||
"@tweenjs/tween.js": "^18.3.1", | ||
"classnames": "^2.2.6", | ||
"deep-equal": "^2.0.3", | ||
"jszip": "^3.2.2", | ||
"leaflet": "^1.5.1", | ||
"node-sass-chokidar": "^1.3.5", | ||
"npm-run-all": "^4.1.5", | ||
"npyjs": "^0.1.3", | ||
"numjs": "nicolaspanel/numjs", | ||
"react": "^16.8.6", | ||
"react-dom": "^16.8.6", | ||
"react-leaflet": "^2.4.0", | ||
"react-octicon": "^3.0.1", | ||
"react-redux": "^7.1.0", | ||
"react-scripts": "3.0.1", | ||
"react-toastify": "^5.3.1", | ||
"redux": "^4.0.1", | ||
"redux-logger": "^3.0.6", | ||
"redux-saga": "^1.0.3", | ||
"redux-thunk": "^2.3.0", | ||
"three": "^0.105.2" | ||
}, | ||
"scripts": { | ||
"build-css": "node-sass-chokidar src/ -o src/", | ||
"watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive", | ||
"start-js": "react-scripts start", | ||
"start": "npm-run-all -p watch-css start-js", | ||
"build-js": "react-scripts build", | ||
"build": "npm-run-all build-css build-js", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject", | ||
"lint": "eslint src/", | ||
"lint:fix": "eslint --fix --ext .js,.jsx src/", | ||
"pretty": "prettier src/", | ||
"pretty:fix": "prettier --write src/", | ||
"build-license": "npx license-checker-rseidelsohn@1.2.2 --relativeLicensePath --relativeModulePath --json --out src/extensions/about/licenses.json" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"homepage": ".", | ||
"proxy": "http://localhost:3001", | ||
"devDependencies": { | ||
"eslint-plugin-import": "^2.23.4", | ||
"prettier": "^2.3.2" | ||
} | ||
} |
Binary file not shown.
Oops, something went wrong.