Skip to content

An implementation of roslibjs's interfaces by using Foxglove WebSocket Protocol.

License

Notifications You must be signed in to change notification settings

tier4/roslibjs-foxglove

Repository files navigation

@tier4/roslibjs-foxglove

An implementation of roslibjs's interfaces by using Foxglove WebSocket Protocol.

roslibjs-foxglove is a client library that communicates with ROS 1 / 2 using Foxglove bridge. Unlike the rosbridge used in the existing roslibjs, Foxglove bridge provides extremely high performance, low latency, and low packet loss rate.

Getting Started

ROS side

Install and launch Foxglove bridge.

sudo apt install ros-$ROS_DISTRO-foxglove-bridge
roslaunch --screen foxglove_bridge foxglove_bridge.launch port:=8765 # for ROS 1
ros2 launch foxglove_bridge foxglove_bridge_launch.xml port:=8765 # for ROS 2

JS / TS side

npm install https://github.com/tier4/roslibjs-foxglove/releases/download/v0.0.3/tier4-roslibjs-foxglove-0.0.3.tgz

Supported features

ROSLIB.Ros

Parameter Note
✔️ url
groovyCompatibility
transportLibrary Foxglove bridge only supports WebSocket.
transportOptions
Method Note
authenticate
callOnConnection
✔️ close
✔️ connect
decodeTypeDefs
getActionServers
getMessageDetails
getNodeDetails
getNodes
getParams
getServiceRequestDetails
getServiceResponseDetails
✔️ getServices
getServicesForType
✔️ getServiceType
✔️ getTopics
getTopicsAndRawTypes
getTopicsForType
✔️ getTopicType
sendEncodedMessage
setStatusLevel

ROSLIB.Topic

Parameter Note
✔️ ros
✔️ name
✔️ messageType
compression
throttle_rate Foxglove bridge does not support throttle_rate.
queue_size
latch
queue_length
reconnect_on_close
Method Note
✔️ advertise
✔️ publish
✔️ subscribe
toStream
✔️ unadvertise
✔️ unsubscribe

ROSLIB.Service

Parameter Note
✔️ ros
✔️ name
✔️ serviceType
Method Note
advertise
✔️ callService

ROSLIB.Param

Parameter Note
✔️ ros
✔️ name
Method Note
delete
✔️ get
✔️ set

License

@tier4/roslibjs-foxglove is released under the Apache 2.0 license.