Skip to content
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ See the READMEs of individual packages for more information.
## Packages

- [roslibjs](./packages/roslib/README.md)
- [roslibjs examples](./packages/roslib-examples/README.md)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This confuses me. Is it roslib or roslibjs ? Where does the difference come from?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package is actually called roslib, I guess because historically the "JS" part was redundant because it was the only roslib and it was being published as a javascript package?

We can decide to change the name later when we eventually adopt an organization namespace on NPM since that will require changing the name anyway

18 changes: 15 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@robot-web-tools/workspace",
"//": "TODO: add a workspace name in the future once we have everything in a consistent namespace like @robot-web-tools/* on npm",
"workspaces": [
"packages/*"
]
Expand Down
5 changes: 5 additions & 0 deletions packages/roslib-examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# roslib-examples

## Running the examples

Run `npm start` to view the examples in your browser.
38 changes: 38 additions & 0 deletions packages/roslib-examples/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "roslib-examples",
"version": "2.0.0",
"description": "Example usage of roslibjs",
"keywords": [
"ROS",
"ros",
"roslib",
"roslibjs",
"robot"
],
"homepage": "https://github.com/RobotWebTools/roslibjs#readme",
"bugs": {
"url": "https://github.com/RobotWebTools/roslibjs/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/RobotWebTools/roslibjs.git"
},
"license": "BSD-2-Clause",
"author": "Robot Webtools Team <[email protected]> (https://robotwebtools.github.io)",
"contributors": [
{
"name": "Ezra Brooks",
"email": "[email protected]",
"url": "https://github.com/EzraBrooks"
}
],
"scripts": {
"start": "http-server .. -o /roslib-examples/src/index.html"
},
"devDependencies": {
"http-server": "^14.1.1"
},
"dependencies": {
"roslib": "^2.0.0"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roslib will automatically be symlinked from the other directory because it's in the same workspace, this specification only affects the distributed package (if we distribute this package)

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<script src="../importmap.js"></script>
<script src="/roslib/importmap.js"></script>

<script type="module">
import * as ROSLIB from "roslib";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<script src="../importmap.js"></script>
<script src="/roslib/importmap.js"></script>

<script type="module">
import * as ROSLIB from "roslib";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<script src="../importmap.js"></script>
<script src="/roslib/importmap.js"></script>

<script type="module">
import * as ROSLIB from "roslib";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

// Connecting to ROS
import * as ROSLIB from "../src/RosLib.ts";
import * as ROSLIB from "roslib";

const ros = new ROSLIB.Ros({
url: "ws://localhost:9090",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<script src="../importmap.js"></script>
<script src="/roslib/importmap.js"></script>

<script type="module">
import * as ROSLIB from "roslib";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<script src="../importmap.js"></script>
<script src="/roslib/importmap.js"></script>

<script type="module">
import * as ROSLIB from "roslib";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<script src="../importmap.js"></script>
<script src="/roslib/importmap.js"></script>

<script type="module">
import * as ROSLIB from "roslib";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<script src="../importmap.js"></script>
<script src="/roslib/importmap.js"></script>

<script type="module">
import * as ROSLIB from "roslib";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<script src="../importmap.js"></script>
<script src="/roslib/importmap.js"></script>

<script type="module">
import * as ROSLIB from "roslib";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<script src="../importmap.js"></script>
<script src="/roslib/importmap.js"></script>

<script type="module">
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/roslib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ npm install roslib
});
```

Try running `npm run examples` for some complete examples!
Check out the `roslib-examples` package for some complete examples!

2. Check that you have the websocket server is running on
port 9090. Something like this should do:
Expand Down
5 changes: 1 addition & 4 deletions packages/roslib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"eslint-plugin-jsdoc": "^61.1.12",
"eslint-plugin-prettier": "^5.5.4",
"globals": "^16.0.0",
"http-server": "^14.1.1",
"jiti": "^2.6.1",
"jsdom": "^27.0.0",
"jspm": "^4.2.0",
Expand All @@ -53,7 +52,6 @@
"ws": "^8.0.0"
},
"directories": {
"example": "examples",
"test": "test"
},
"engines": {
Expand All @@ -68,8 +66,7 @@
"//": "The sed expression for eventemitter3 is because the package metadata is incorrect in EventEmitter3's package.json",
"generate-importmap": "jspm install --release --provider unpkg && sed -i.bak 's;[email protected]/index.mjs;[email protected]/dist/eventemitter3.esm.js;' importmap.js && rm importmap.js.bak",
"prepare": "npm run build && npm run generate-importmap",
"make-changelog": "changelog-maker RobotWebTools roslibjs --markdown | cat - CHANGELOG.md > NEW_CHANGELOG.md && mv NEW_CHANGELOG.md CHANGELOG.md",
"examples": "http-server . -o /examples/index.html"
"make-changelog": "changelog-maker RobotWebTools roslibjs --markdown | cat - CHANGELOG.md > NEW_CHANGELOG.md && mv NEW_CHANGELOG.md CHANGELOG.md"
},
"repository": {
"type": "git",
Expand Down