0.7.0 • Published 6 months ago

@transitive-sdk/utils-ros v0.7.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

ROS utils for Transitive

Install

npm i @transitive-sdk/utils-ros

Example

const { ROSs, getForVersion } = require('@transitive-sdk/utils-ros');

const demo = async (version) => {
  const ros = getForVersion(version);
  await ros.init();

  const topic = '/utils_ros/test1';
  const type = version == 1 ? 'std_msgs/String' : 'std_msgs/msg/String';

  const interval = setInterval(() => {
    ros.publish(topic, type, {data: String(Date.now())});
  });

  const sub = ros.subscribe(topic, type, (msg) => {
    console.log('received', msg.data);
  });
};

demo(1);
demo(2);

Running Tests

Before you can run tests you need to make sure all optional dependencies are installed which requires you to first source a ROS2 distribution (e.g., . /opt/ros/galactic/setup/.bash followed by npm i).

To run tests, start a roscore, then:

npm test
0.7.0

6 months ago

0.6.2

9 months ago

0.6.1

10 months ago

0.3.0

1 year ago

0.2.0

1 year ago

0.5.0

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.5.2

1 year ago

0.4.3

1 year ago

0.6.0

1 year ago

0.5.1

1 year ago

0.4.2

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago