Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore classic notebook & voila #74

Merged
merged 2 commits into from
Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ node_modules/
# Compiled javascript
*.map
dist/
jupyros/static/
jupyros/nbextension/
jupyros/labextension/

# Examples
Expand Down
5 changes: 5 additions & 0 deletions install.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"packageManager": "python",
"packageName": "jupyros",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyros / jupyter-ros"
}
124 changes: 62 additions & 62 deletions js/lib/defaults.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

var DepthCloudModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "DepthCloudModel",
f: 525.0,
url: "",
Expand All @@ -10,11 +10,11 @@ var DepthCloudModelDefaults = {


var GridModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "GridModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "GridView",
cell_size: 0.5,
color: "#0181c4",
Expand All @@ -24,11 +24,11 @@ var GridModelDefaults = {


var InteractiveMarkerModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "InteractiveMarkerModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "InteractiveMarkerView",
menu_font_size: "0.8em",
ros: null,
Expand All @@ -39,11 +39,11 @@ var InteractiveMarkerModelDefaults = {


var LaserScanModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "LaserScanModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "LaserScanView",
color_map: "",
color_source: "intensities",
Expand All @@ -60,11 +60,11 @@ var LaserScanModelDefaults = {


var MarkerModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "MarkerModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "MarkerView",
lifetime: 0.0,
path: "/",
Expand All @@ -76,11 +76,11 @@ var MarkerModelDefaults = {


var MarkerArrayClientModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "MarkerArrayClientModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "MarkerArrayClientView",
path: "/",
ros: null,
Expand All @@ -91,11 +91,11 @@ var MarkerArrayClientModelDefaults = {


var OccupancyGridModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "OccupancyGridModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "OccupancyGridView",
color: "#FFFFFF",
compression: "cbor",
Expand All @@ -109,11 +109,11 @@ var OccupancyGridModelDefaults = {


var PathModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "PathModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "PathView",
color: "#CC00FF",
ros: null,
Expand All @@ -124,11 +124,11 @@ var PathModelDefaults = {


var PointCloudModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "PointCloudModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "PointCloudView",
max_points: 200000,
message_ratio: 2.0,
Expand All @@ -143,11 +143,11 @@ var PointCloudModelDefaults = {


var PolygonModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "PolygonModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "PolygonView",
color: "#CC00FF",
ros: null,
Expand All @@ -158,11 +158,11 @@ var PolygonModelDefaults = {


var PoseModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "PoseModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "PoseView",
color: "#CC00FF",
length: 1.0,
Expand All @@ -174,11 +174,11 @@ var PoseModelDefaults = {


var PoseArrayModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "PoseArrayModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "PoseArrayView",
color: "#CC00FF",
length: 1.0,
Expand All @@ -190,20 +190,20 @@ var PoseArrayModelDefaults = {


var ROSConnectionModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "ROSConnectionModel",
url: "ws://{hostname}:9090",
}



var SceneNodeModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "SceneNodeModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "SceneNodeView",
frame_id: "/base_link",
object: null,
Expand All @@ -213,8 +213,8 @@ var SceneNodeModelDefaults = {


var TFClientModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "TFClientModel",
angular_treshold: 0.01,
fixed_frame: "",
Expand All @@ -226,11 +226,11 @@ var TFClientModelDefaults = {


var URDFModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "URDFModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "URDFView",
ros: null,
tf_client: null,
Expand All @@ -240,11 +240,11 @@ var URDFModelDefaults = {


var ViewerModelDefaults = {
_model_module: "jupyter-ros",
_model_module_version: "^0.4.1",
_model_module: "@robostack/jupyter-ros",
_model_module_version: "^0.5.0",
_model_name: "ViewerModel",
_view_module: "jupyter-ros",
_view_module_version: "^0.4.1",
_view_module: "@robostack/jupyter-ros",
_view_module_version: "^0.5.0",
_view_name: "ViewerView",
alpha: 1.0,
background_color: "#FFFFFF",
Expand Down
4 changes: 2 additions & 2 deletions js/lib/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
// Some static assets may be required by the custom widget javascript. The base
// url for the notebook is not known at build time and is therefore computed
// dynamically.
__webpack_public_path__ = document.querySelector('body').getAttribute('data-base-url') + 'nbextensions/jupyter-ros';
__webpack_public_path__ = document.querySelector('body').getAttribute('data-base-url') + 'nbextensions/@robostack/jupyter-ros';


// Configure requirejs
if (window.require) {
window.require.config({
map: {
"*" : {
"jupyter-ros": "nbextensions/jupyter-ros/index",
"@robostack/jupyter-ros": "nbextensions/@robostack/jupyter-ros/index",
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions js/lib/labplugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ var index_module = require('./index.js');
var base = require('@jupyter-widgets/base');

module.exports = {
id: 'jupyter-ros',
id: '@robostack/jupyter-ros',
requires: [base.IJupyterWidgetRegistry],
activate: function(app, widgets) {
widgets.registerWidget({
name: 'jupyter-ros',
name: '@robostack/jupyter-ros',
version: index_module.version,
exports: index_module
});
Expand Down
6 changes: 3 additions & 3 deletions js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@robostack/jupyter-ros",
"version": "0.4.1",
"version": "0.5.0",
"description": "Jupyter widgets for the ROS ecosystem.",
"author": "Wolf Vollprecht",
"main": "lib/labplugin.js",
Expand All @@ -20,7 +20,7 @@
"dist/*.js"
],
"scripts": {
"clean": "rimraf dist/ ../jupyros/static ../jupyros/labextension",
"clean": "rimraf dist/ ../jupyros/nbextension ../jupyros/labextension",
"build": "jlpm run clean && webpack",
"build:labextension": "jlpm run build && jupyter labextension build .",
"watch": "run-p watch:src && watch:labextension",
Expand All @@ -37,7 +37,7 @@
"webpack-cli": "^4"
},
"dependencies": {
"@jupyter-widgets/base": "^2.0.1 || ^3 || ^4.0.0",
"@jupyter-widgets/base": "^2.0.1 || ^3 || ^4",
"lodash": "^4.17.4",
"ros3d": "^1.0.0"
},
Expand Down
10 changes: 6 additions & 4 deletions js/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var local_loaders = {
]
}

const STATIC_PATH = path.resolve(__dirname, '../jupyros/static');
const STATIC_PATH = path.resolve(__dirname, '../jupyros/nbextension');
const DIST_PATH = path.resolve(__dirname, 'dist');

module.exports = [
Expand All @@ -31,7 +31,8 @@ module.exports = [
output: {
filename: 'extension.js',
path: STATIC_PATH,
libraryTarget: 'amd'
libraryTarget: 'amd',
publicPath: '',
},
resolveLoader: local_loaders
},
Expand All @@ -45,7 +46,8 @@ module.exports = [
output: {
filename: 'index.js',
path: STATIC_PATH,
libraryTarget: 'amd'
libraryTarget: 'amd',
publicPath: '',
},
devtool: 'source-map',
module: {
Expand Down Expand Up @@ -73,7 +75,7 @@ module.exports = [
filename: 'index.js',
path: DIST_PATH,
libraryTarget: 'amd',
publicPath: 'https://unpkg.com/jupyter-ros@' + version + '/dist/'
publicPath: 'https://unpkg.com/@robostack/jupyter-ros@' + version + '/dist/'
},
devtool: 'source-map',
module: {
Expand Down
Loading