Skip to content

update package xml as a prep for npm publish #130

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

Merged
merged 2 commits into from
Nov 7, 2014
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
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
test
build
examples
Gruntfile.js
.gitignore
.travis.yml
bower.json
*.md
45 changes: 45 additions & 0 deletions examples/node_simple.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env node

// Connecting to ROS
var ROSLIB = require('roslib');

var ros = new ROSLIB.Ros({
url : 'ws://localhost:9090'
});

ros.on('connection', function() {
console.log('Connected to websocket server.');
});

ros.on('error', function(error) {
console.log('Error connecting to websocket server: ', error);
});

ros.on('close', function() {
console.log('Connection to websocket server closed.');
});

// Publishing a Topic
// ------------------

var cmdVel = new ROSLIB.Topic({
ros : ros,
name : '/cmd_vel',
messageType : 'geometry_msgs/Twist'
});

var twist = new ROSLIB.Message({
linear : {
x : 0.1,
y : 0.2,
z : 0.3
},
angular : {
x : -0.1,
y : -0.2,
z : -0.3
}
});

console.log("Publishing cmd_vel");
cmdVel.publish(twist);
26 changes: 16 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "roslibjs",
"name": "roslib",
"main": "./src/RosLibNode.js",
"browserify": "./src/RosLibBrowser.js",
"devDependencies": {
Expand Down Expand Up @@ -31,12 +31,17 @@
"ws": "./src/util/shim/WebSocket.js",
"./src/util/DOMParser.js": "./src/util/shim/DOMParser.js"
},
"description": "roslibjs",
"homepage": "https://www.robotwebtools.org",
"description": "The standard ROS Javascript Library",
"version": "0.9.0",
"license": "BSD",
"directories": {
"example": "examples",
"test": "test"
},
"engines": {
"node": ">=0.10"
},
"scripts": {
"test": "grunt test",
"test-examples": "grunt mochaTest:examples && karma start test/examples/karma.conf.js",
Expand All @@ -48,14 +53,15 @@
"type": "git",
"url": "https://github.com/RobotWebTools/roslibjs/releases"
},
"bugs": {
"url": "https://github.com/RobotWebTools/roslibjs/issues"
},
"keywords": [
"ROS"
"ROS",
"ros",
"roslib",
"roslibjs",
"robot"
],
"authors": [
"Russell Toris (rctoris@wpi.edu)",
"Jihoon Lee (jihoonlee.in@gmail.com)",
"Brandon Alexander (balexander@willowgarage.com)",
"David Gossow (dgossow@willowgarage.com)",
"Benjamin Pitzer (ben.pitzer@gmail.com)"
]
"author": "Robot Webtools Team <robot-web-tools@googlegroups.com> (http://robotwebtools.org)"
}