Skip to content
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

Update/lint README & CONTRIBUTING #420

Merged
merged 2 commits into from
Apr 9, 2021
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
21 changes: 10 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
roslibjs Build Setup
====================
# roslibjs Build Setup

[Grunt](http://gruntjs.com/) is used for building, including concatenating, minimizing, documenting, linting, and testing.

### Install Grunt and its Dependencies
## Install Grunt and its Dependencies

1. Install [Node.js](http://nodejs.org/) for your environment
2. Install the build task runner, [Grunt](http://gruntjs.com/)

```sh
$ [sudo] npm install -g grunt
```
```bash
$ [sudo] npm install -g grunt
```
3. Install the dependencies and build dependencies

```sh
$ cd /path/to/roslibjs/
$ [sudo] npm install
```
```bash
$ cd /path/to/roslibjs/
$ [sudo] npm install
```

### Build with Grunt
## Build with Grunt

Before proceeding, please confirm you have installed the dependencies above.

Expand Down
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,56 @@

[![CI](https://github.com/RobotWebTools/roslibjs/actions/workflows/main.yml/badge.svg)](https://github.com/RobotWebTools/roslibjs/actions/workflows/main.yml)

#### The Standard ROS JavaScript Library
## The Standard ROS JavaScript Library

For full documentation, see [the ROS wiki](http://wiki.ros.org/roslibjs) or check out some [working demos](http://robotwebtools.org/demos.html).

[JSDoc](http://robotwebtools.org/jsdoc/roslibjs/current/) can be found on the Robot Web Tools website.

This project is released as part of the [Robot Web Tools](http://robotwebtools.org/) effort.

### Usage
## Usage

Pre-built files can be found in either [roslib.js](build/roslib.js) or [roslib.min.js](build/roslib.min.js).

Alternatively, you can use the current release via the Robot Web Tools CDN: ([full](https://static.robotwebtools.org/roslibjs/current/roslib.js)) | ([min](https://static.robotwebtools.org/roslibjs/current/roslib.min.js))

### Troubleshooting
## 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!'); });
```js
ros.on('error', function(error) { console.log( error ); });
ros.on('connection', function() { console.log('Connection made!'); });
```

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

netstat -a | grep 9090
```bash
netstat -a | grep 9090
```

### Dependencies
## Dependencies

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

`npm install`
```bash
npm install
```

Depending on your build environment.

### Build
## Build

Checkout [CONTRIBUTING.md](CONTRIBUTING.md) for details on building.

### License
## License

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

### Authors
## Authors

See the [AUTHORS.md](AUTHORS.md) file for a full list of contributors.