Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@robot-web-tools/ros3djs

RobotWebTools46BSD-3-Clause0.17.0-SNAPSHOT

The standard ROS Javascript Visualization Library

ROS, ros, roslib, roslibjs, ros3djs, robot

readme

ros3djs Build Status

3D Visualization Library for use with the ROS JavaScript Libraries

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 ros3d.js or ros3d.min.js.

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

Dependencies

ros3djs depends on:

EventEmitter2. The current supported version is 0.4.14. The current supported version can be found on the Robot Web Tools CDN: (full) | (min)

three.js. The current supported version is r61. The current supported version can be found on the Robot Web Tools CDN: (full) | (min)

THREE.ColladaLoader. The current supported version is r61. The current supported version can be found on the Robot Web Tools CDN: (full) | (min)

THREE.STLLoader. The current supported version is r61. The current supported version can be found on the Robot Web Tools CDN: (full) | (min)

ColladaLoader2. The current supported version is 0.0.2. The current supported version can be found on the Robot Web Tools CDN: (full) | (min)

roslibjs. The current supported version is 0.14.0. The current supported version can be found on the Robot Web Tools CDN: (full) | (min)

Build

Grunt is used for building, including concatenating, minimizing, documenting, linting, and testing.

Install Grunt and its Dependencies

Ubuntu 14.04

  1. Install Node.js and its package manager, NPM
    • sudo apt-get install nodejs nodejs-legacy npm
  2. Install Grunt
    • sudo npm install -g grunt-cli
    • sudo rm -rf ~/.npm ~/tmp
  3. Install the Grunt tasks specific to this project
    • cd /path/to/ros3djs/
    • npm install .
  4. (Optional) To generate the documentation, you'll need to setup Java. Documentation generation is not required for patches.
    • echo "export JAVA_HOME=/usr/lib/jvm/default-java/jre" >> ~/.bashrc
    • source ~/.bashrc

Ubuntu 12.04

  1. Install Node.js and its package manager, NPM
    • sudo apt-get install python-software-properties
    • sudo add-apt-repository ppa:chris-lea/node.js
    • sudo apt-get update && sudo apt-get install nodejs phantomjs
  2. Install Grunt
    • sudo npm install -g grunt-cli
    • sudo rm -rf ~/.npm ~/tmp
  3. Install the Grunt tasks specific to this project
    • cd /path/to/ros3djs/
    • npm install .
  4. (Optional) To generate the documentation, you'll need to setup Java. Documentation generation is not required for patches.
    • echo "export JAVA_HOME=/usr/lib/jvm/default-java/jre" >> ~/.bashrc
    • source ~/.bashrc

OS X

  1. Install Node.js and its package manager, NPM
  2. Install Grunt and the test runner Karma
    • sudo npm install -g grunt-cli karma
  3. Install the Grunt tasks specific to this project
    • cd /path/to/ros3djs/
    • npm install .

Build with Grunt

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

To run the build tasks:

  1. cd /path/to/ros3djs/
  2. grunt build

grunt build will concatenate and minimize the files under src and replace ros3d.js and ros3d.min.js in the build directory. It will also run the linter and test cases. This is what Travis CI runs when a Pull Request is submitted.

grunt dev will watch for any changes to any of the src/ files and automatically concatenate and minimize the files. This is ideal for those developing as you should only have to run grunt dev once.

grunt doc will rebuild all JSDoc for the project.

License

ros3djs 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.

changelog

2015-03-27 - 0.15.0

2015-03-09 - 0.14.0

  • Make distance to near and far plane configurable (daniel86)
  • Use phong shading instead of lambert shading (daniel86)
  • Fix rotation of SceneNodes (jakobs)
  • Fixed STL loader (jakobs)
  • Added support for multiple visuals per link (jakobs)
  • Removes package:// from URI (rctoris)
  • Only adds material to a model that has none (rctoris)

2015-02-13 - 0.13.0

2014-12-08 - 0.11.0

  • Change linePrecision on raycaster (mszarski)
  • Added support for loading STLs as meshes (mitchellwills)
  • Compute normals after loading an STL model (T045T)
  • Fixed depth cloud example (mitchellwills)
  • Fixed video method name [Akin Sisbot]
  • Fixed multi-touch operation for both Windows and Android tablet [Akin Sisbot]
  • Fix for ROS3D.Viewer clear color [Daniel Beßler]

2014-09-09 - 0.10.0

2014-07-07 - 0.9.0

  • Prevents empty text from being rendered (rctoris)
  • Added MarkerArrayClient (T045T)
  • Use namespace for Markers - ID alone is not supposed to be unique (T045T)
  • Use a separate TFClient to get the transform from InteractiveMarker to its sub-Markers (T045T)
  • Interactivemarkers: get the correct transformation for sub-markers (T045T)
  • Enable markdown parsing in JSDoc and add newlines to ensure proper parsing of lists (T045T)

2014-06-11 - 0.8.0

  • Added flag to change the type of collada loader (rctoris)
  • Fix typo in description of onMouseMove() (T045T)
  • Use the total length of zoomDelta, not just the y component, for multi-touch zooming (T045T)
  • Correction on measure unit for cellSize (rbonghi)
  • Urdf shapes fix (rbonghi)
  • Allow to change cellSize (rk4an)
  • Added LINE_STRIP and LINE_LIST support (mszarski)
  • Add tfPrefix for multi-robots support (erkan)
  • Remove memory leak from MarkerClient (knowrob)
  • Changed MarkerClient to support multiple markers at a time (knowrob)

2013-08-23 - r7

2013-06-06 - r6

  • MARKER_CUBE_LIST added to Marker.js (rctoris)
  • URDF meshes are now scaled correctly (rctoris)

2013-05-29 - r5

  • Added DepthCloud class for point ploud streaming with ros_web_video and depthcloud_encoder (jkammerl), (dgossow)

2013-04-15 - r4

  • Initial pose now set in SceneNode (rctoris)
  • Texture method for OccupancyGrid changed to canvas to allow for very large maps (rctoris)
  • OccupancyGrid origin now in corner instead of center of image (rctoris)
  • Optional TF client added to occupancy grid client (rctoris)
  • Interactive markers now removed correctly (rctoris)
  • Viewer now takes an optional initial camera position (rctoris)
  • Orbit controls fixed to prevent flicker during camera pan (rctoris)
  • Scale (units) now work in Collada files (rctoris)
  • Grunt files added and code cleanup for linter (rctoris)

2013-04-03 - r3

  • ColladaLoader2 added as third-party module (rctoris)
  • ColladaLoader2 replaces THREE.ColladaLoader (rctoris)
  • Viewer now takes an option intensity for the lighting (rctoris)

2013-04-03 - r2

  • Examples now use CDN version of DAE files (rctoris)
  • Maps module added with OccupancyGrid and client (rctoris)
  • SceneNode now takes an optional pose (rctoris)
  • Bugfix in InteractiveMarkerClient path option (rctoris)
  • Bugfix in interactive marker feedback (rctoris)

2013-03-17 - r1