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
3 changes: 2 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ module.exports = [
strict: 0,
quotes: [2, 'single'],
'no-proto': 2,
'linebreak-style': 2
'linebreak-style': 2,
'key-spacing': [2, {afterColon: true}]
},
files: ['**/*.{js,jsx,cjs}']
}
Expand Down
24 changes: 12 additions & 12 deletions examples/node_simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var ROSLIB = require('roslib');

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

ros.on('connection', function() {
Expand All @@ -23,21 +23,21 @@ console.log('Connection to websocket server closed.');
// ------------------

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ function SendMessage() {
})

const data = new ROSLIB.Message({
x : linear.x,
y : linear.y,
theta : angular.z
x: linear.x,
y: linear.y,
theta: angular.z
})

// publishes to the queue
Expand Down
10 changes: 5 additions & 5 deletions src/core/Action.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ class Action extends EventEmitter {
}

var call = {
op : 'send_action_goal',
id : actionGoalId,
action : this.name,
op: 'send_action_goal',
id: actionGoalId,
action: this.name,
action_type: this.actionType,
args : goal,
feedback : true,
args: goal,
feedback: true,
};
this.ros.callOnConnection(call);

Expand Down
2 changes: 1 addition & 1 deletion test/examples/tf_service.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('TF2 Republisher Service Example', function() {
it('tf republisher', () => new Promise((done) => {
var ros = new ROSLIB.Ros({
// Use the service interface to tf2_web_republisher
groovyCompatibility : false
groovyCompatibility: false
});
ros.connect('ws://localhost:9090');

Expand Down