1.3.1-alpha • Published 2 years ago
abconnect-sdk-lite v1.3.1-alpha
ABConnect SDK for Node.js
Example Usage
import { ROSPlugin, ABConnect } from "abconnect-sdk-lite"
// or const {ROSPlugin, ABConnect} = require("abconnect-sdk-lite")
const abc = new ABConnect(
{
auth: "",
host: "ws://localhost:3000",
},
{
id: "clientA",
category: "car",
},
new ROSPlugin(9090, false)
)
abc
.addDeviceById("co-device")
.then((coDevice) => {
coDevice.addPublisher("/chatter", "std_msgs/String", {})
coDevice.addSubscriber("/blabber", "std_msgs/String", {}, (msg) => {
console.log(msg)
})
})
.catch((error) => {
console.log(error)
})
Development on Docker
- Build an image
docker build -t abconnect-sdk-alpha .
- Create a container
docker run -it --name sdk-dev -v $PWD/build:/sdk/build abconnect-sdk-alpha
# or start by running docker start -i alpha-dev
- To start the container in another window
docker exec -it sdk-dev bash
- Start the compilation of the code in a new terminal window by running
yarn dev
- Test the code by going to
/build/cjs/src
and running the compiled code from the terminal windows with the running Docker containers.
1.3.1-alpha
2 years ago
1.2.2-alpha
2 years ago
1.2.1-alpha
2 years ago
1.3.0-alpha
2 years ago
1.2.0-alpha
2 years ago
1.1.0-alpha
3 years ago
1.0.0-alpha
3 years ago