Skip to content

2.0.0

Latest

Choose a tag to compare

@EzraBrooks EzraBrooks released this 19 Nov 22:57
· 9 commits to develop since this release
Immutable release. Only release title and notes can be modified.

Note

We understand that the removal of some lesser-used APIs may be painful for a subset of users. However, given the small team maintaining the project, we felt it necessary to reduce the scope of the library - at least temporarily - to make it possible to move forward on new features and better underlying implementations.

With that being said, we're excited to ship roslibjs 2.0, years in the making!

Highlights of roslibjs 2.0.0

Additions

  • Asynchronous callback support for Services.
  • Support for ROS 2 Actions.
  • Support for ROS 2 TF.
  • Support for injecting your own transport implementation into the Ros class.
  • Support for new rosbridge APIs, for example param retrieval failure cases.
  • Integration tests for ROS 2 to ensure ongoing support.
  • Greatly improved TypeScript declarations.
  • Internal migration from JavaScript to TypeScript to ensure provided TypeScript type declarations are always up-to-date.
    • No more need for @types/roslib as an extra dependency!
  • ECMAScript Modules (ESM) support to provide better bundling and static analysis support to downstream projects.

Removals

  • Classic "Universal Module Definition (UMD)" bundles of roslibjs. We only support the standardized ECMAScript Modules (ESM).
  • JSDelivr CDN releases, as there are many CDNs that serve NPM packages now, like UNPKG.
  • Removal of Web Worker mode.
  • Removal of non-WebSocket transport implementations (NodeTCP and WebRTC).
    • You can now provide these yourself - or any other socket implementation you can dream up - with the new Transport API!

Import syntax change

  • Due to the change to using standard ECMAScript Modules and optimization of the library for modern bundling practices, if you were previously importing roslib in either of the following ways:
    const ROSLIB = require("roslib");
    // or 
    import ROSLIB from "roslib";
    you will need to adapt your syntax for ESM. The easiest replacement is:
     import * as ROSLIB from "roslib";
    However, we would recommend a best practice of instead importing APIs of roslib directly by name, for instance
    import { Ros } from "roslib";
    to make it easier for your project's tooling to statically analyze and bundle your code.

Future changes

We hope this is just the beginning of a new era for the RobotWebTools JavaScript clients - an easier-to-contribute-to (thanks to type checking, better tests, etc.) set of libraries with more focused scope. Continuing forward, we will continue to emphasize ease of development and use, including some of the following efforts:

  • Integration of ros2djs and ros3djs into this repository as a monorepo to make it easier to work on the RWT frontend libraries together
  • Migration of the examples in roslibjs, ros2djs, and ros3djs into separate executable packages in the monorepo, with end-to-end tests to assure they stay functional and up-to-date
  • Migration of ROS 1 Action support to a separate extension package for roslibjs, to preserve its implementation as the core moves forward with a ROS 2 focus
  • Migration of ROS 1 TF support to a separate extension package for roslibjs, for the same reason (as it depends on ROS 1 Actions)

Acknowledgements

Reviving development of this library wouldn't have been possible without the help of long-time maintainer @MatthijsBurgh, more recent additions to the maintainer team @sea-bass, @bjsowa, and @EzraBrooks - and many contributions from other individuals such as @drewhoener, @douglascayers, @harsh-pal-robotics, @noah-wardlow, and more.

Thanks and kudos to everyone who made this happen!

Full Changelog: 1.4.1...2.0.0