The Standard ROS JavaScript Library
JavaScript Shell
Clone or download
minggangw and jihoonl Add the type of service when executing 'call_service' (#282)
We want to reuse the roslibjs as the front-end JavaScript library by
leveraging the ros2-web-bridge in ROS2. But the current roslibjs doesn't
transmit the service type when calling a service, which is a necessary
element when sending the request in ROS2.

This patch adds this information to make it compatible with ROS2.
Latest commit 47336fa Mar 24, 2018

README.md

roslibjs Build Status

The Standard ROS JavaScript Library

For full documentation, see the ROS wiki or check out some working demos.

JSDoc can be found on the Robot Web Tools website.

This project is released as part of the Robot Web Tools effort.

Usage

Pre-built files can be found in either roslib.js or roslib.min.js.

Alternatively, you can use the current release via the Robot Web Tools CDN: (full) | (min)

Troubleshooting

  1. Check that connection is established. You can listen to error and connection events to report them to console. See examples/simple.html for a complete example:

    ros.on('error', function(error) { console.log( error ); }); ros.on('connection', function() { console.log('Connection made!'); });

  2. Check that you have the websocket server is running on port 9090. Something like this should do:

    netstat -a | grep 9090

Dependencies

roslibjs has a number of dependencies. You will need to run:

npm install

Depending on your build environment.

Build

Checkout CONTRIBUTING.md for details on building.

License

roslibjs is released with a BSD license. For full terms and conditions, see the LICENSE file.

Authors

See the AUTHORS.md file for a full list of contributors.