Skip to content

Commit 4c604d3

Browse files
committed
Merge pull request #10 from RethinkRobotics-opensource/rosnodejs_nameswitch
Rename rosjs to rosnodejs
2 parents 5b61fbd + ff55f8b commit 4c604d3

8 files changed

Lines changed: 26 additions & 26 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# rosjs
1+
# rosnodejs

example.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use strict';
22

3-
let rosjs = require('./index.js');
4-
const std_msgs = rosjs.require('std_msgs').msg;
5-
const SetBool = rosjs.require('std_srvs').srv.SetBool;
3+
let rosnodejs = require('./index.js');
4+
const std_msgs = rosnodejs.require('std_msgs').msg;
5+
const SetBool = rosnodejs.require('std_srvs').srv.SetBool;
66

7-
rosjs.initNode('/my_node')
7+
rosnodejs.initNode('/my_node')
88
.then((rosNode) => {
99
// EXP 1) Service Server
1010
let service = rosNode.advertiseService({

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function _checkMasterHelper(callback, timeout) {
4747
rosNode.getMasterUri()
4848
.then((resp) => {
4949
log.info('Connected to master!');
50-
callback(Rosjs.getNodeHandle());
50+
callback(Rosnodejs.getNodeHandle());
5151
})
5252
.catch((err, resp) => {
5353
if (firstCheck) {
@@ -71,7 +71,7 @@ function _validateNodeName(nodeName) {
7171
return nodeName;
7272
}
7373

74-
let Rosjs = {
74+
let Rosnodejs = {
7575
/**
7676
* Initializes a ros node for this process. Only one ros node can exist per process
7777
* If called a second time with the same nodeName, returns a handle to that node.
@@ -152,4 +152,4 @@ let Rosjs = {
152152
}
153153
}
154154

155-
module.exports = Rosjs;
155+
module.exports = Rosnodejs;

lib/ActionClient.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
'use strict';
1919

20-
const rosjs = require('../index.js');
20+
const rosnodejs = require('../index.js');
2121
const timeUtils = require('../utils/time_utils.js');
2222
let EventEmitter = require('events');
2323

@@ -27,7 +27,7 @@ class ActionClient extends EventEmitter {
2727

2828
this._actionServer = options.actionServer;
2929

30-
const nh = rosjs.nh;
30+
const nh = rosnodejs.nh;
3131

3232
// FIXME: support user options for these parameters
3333
this._goalPub = nh.advertise({

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "rosjs",
2+
"name": "rosnodejs",
33
"version": "0.1.0",
44
"description": "Native ROS for nodejs",
55
"main": "index.js",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ describe('genjsTests', () => {
179179
});
180180

181181
it('int64', (done) => {
182-
// rosjs takes in raw buffer for 64bit integer msgs
182+
// rosnodejs takes in raw buffer for 64bit integer msgs
183183
const intData = new Buffer([1, 2, 3, 0, 0, 0, 1, 6]);
184184

185185
const msgBuffer = new Buffer(intData);
@@ -196,7 +196,7 @@ describe('genjsTests', () => {
196196
});
197197

198198
it('uint64', (done) => {
199-
// rosjs takes in raw buffer for 64bit integer msgs
199+
// rosnodejs takes in raw buffer for 64bit integer msgs
200200
const intData = new Buffer([1, 2, 3, 0, 0, 0, 1, 6]);
201201

202202
const msgBuffer = new Buffer(intData);

test/xmlrpcTest.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
const chai = require('chai');
44
const expect = chai.expect;
5-
const rosjs = require('../index.js');
5+
const rosnodejs = require('../index.js');
66
const xmlrpc = require('xmlrpc');
77
const netUtils = require('../utils/network_utils.js');
88

99
describe('XmlrpcTests', () => {
1010
// NOTE: make sure a roscore is not running (or something else at this address)
11-
rosjs.require('std_msgs');
12-
rosjs.require('std_srvs');
11+
rosnodejs.require('std_msgs');
12+
rosnodejs.require('std_srvs');
1313
let masterStub = xmlrpc.createServer({host: 'localhost', port: 11311});
1414
const nodeName = '/testNode';
1515

@@ -19,7 +19,7 @@ describe('XmlrpcTests', () => {
1919
callback(null, resp);
2020
});
2121

22-
return rosjs.initNode(nodeName);
22+
return rosnodejs.initNode(nodeName);
2323
});
2424

2525
it('registerSubscriber', (done) => {
@@ -41,7 +41,7 @@ describe('XmlrpcTests', () => {
4141
done();
4242
});
4343

44-
const nh = rosjs.nh;
44+
const nh = rosnodejs.nh;
4545
const sub = nh.subscribe({
4646
topic: topic,
4747
type: msgType,
@@ -72,7 +72,7 @@ describe('XmlrpcTests', () => {
7272
done();
7373
});
7474

75-
const nh = rosjs.nh;
75+
const nh = rosnodejs.nh;
7676
const sub = nh.subscribe({
7777
topic: topic,
7878
type: msgType,
@@ -105,7 +105,7 @@ describe('XmlrpcTests', () => {
105105
done();
106106
});
107107

108-
const nh = rosjs.getNodeHandle();
108+
const nh = rosnodejs.getNodeHandle();
109109
const sub = nh.advertise({
110110
topic: topic,
111111
type: msgType,
@@ -136,7 +136,7 @@ describe('XmlrpcTests', () => {
136136
done();
137137
});
138138

139-
const nh = rosjs.nh;
139+
const nh = rosnodejs.nh;
140140
const pub = nh.advertise({
141141
topic: topic,
142142
type: msgType,
@@ -176,7 +176,7 @@ describe('XmlrpcTests', () => {
176176
done();
177177
});
178178

179-
const nh = rosjs.nh;
179+
const nh = rosnodejs.nh;
180180
const serv = nh.advertiseService({
181181
service: service,
182182
type: srvType
@@ -203,7 +203,7 @@ describe('XmlrpcTests', () => {
203203
done();
204204
});
205205

206-
const nh = rosjs.nh;
206+
const nh = rosnodejs.nh;
207207
const serv = nh.advertiseService({
208208
service: service,
209209
type: srvType
@@ -215,7 +215,7 @@ describe('XmlrpcTests', () => {
215215
});
216216

217217
afterEach(() => {
218-
const nh = rosjs.nh;
218+
const nh = rosnodejs.nh;
219219

220220
// clear out any service, subs, pubs
221221
nh._node._services = {};

utils/message_utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ let messagePackagePathMap = {};
3636
// Utilities for loading, finding handlers for
3737
// message serialization/deserialization
3838
//
39-
// When rosjs starts, it searches through your cmakepath for generated
39+
// When rosnodejs starts, it searches through your cmakepath for generated
4040
// javascript messages. It caches paths for any of the packages it finds.
41-
// Then, in rosjs when you ask to use a message package we check for it
41+
// Then, in rosnodejs when you ask to use a message package we check for it
4242
// in the cache and require it if found.
4343
//-----------------------------------------------------------------------
4444

0 commit comments

Comments
 (0)