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.
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
npm install https://github.com/tier4/roslibjs-foxglove/releases/download/v0.0.4/tier4-roslibjs-foxglove-0.0.4.tgz
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 |
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 |
Parameter | Note | |
---|---|---|
✔️ | ros | |
✔️ | name | |
✔️ | serviceType |
Method | Note | |
---|---|---|
advertise | ||
✔️ | callService |
Parameter | Note | |
---|---|---|
✔️ | ros | |
✔️ | name |
Method | Note | |
---|---|---|
delete | ||
✔️ | get | |
✔️ | set |
@tier4/roslibjs-foxglove is released under the Apache 2.0 license.