44
55A high-performance bridge server that forwards middleware topic content over WebSocket to PlotJuggler clients. Three backends share a common core:
66
7- - ** ROS2** (` pj_bridge_ros2 ` ) — ROS2 Humble / Jazzy via ` rclcpp `
7+ - ** ROS2** (` pj_bridge_ros2 ` ) — ROS2 Humble / Jazzy / Kilted via ` rclcpp `
88- ** FastDDS** (` pj_bridge_fastdds ` ) — eProsima Fast DDS 3.4 (standalone, no ROS2 required)
99- ** RTI** (` pj_bridge_rti ` ) — RTI Connext DDS (build disabled, code preserved)
1010
@@ -20,51 +20,82 @@ independently.
2020- ** No DDS Required** : Clients connect via WebSocket (single port) without needing ROS2/DDS installed
2121- ** High Performance** : 50 Hz message aggregation with ZSTD compression
2222- ** Multi-Client Support** : Multiple clients can connect simultaneously with shared subscriptions
23- - ** Session Management** : Automatic cleanup of disconnected clients via heartbeat monitoring and WebSocket close events
2423- ** Runtime Schema Discovery** : Automatic extraction of message schemas from installed ROS2 packages
25- - ** Zero-Copy Design** : Efficient message handling using shared pointers and move semantics
2624- ** Large Message Stripping** : Automatic stripping of large array fields (Image, PointCloud2, LaserScan, OccupancyGrid) to reduce bandwidth while preserving metadata
27- - ** Type-Safe Error Handling** : Comprehensive error reporting using ` tl::expected `
2825
29- ## Architecture
30-
31- For detailed architecture documentation, see [ docs/ARCHITECTURE.md] ( docs/ARCHITECTURE.md ) .
32-
33- ## Building
26+ ## CI Status
3427
3528| | Humble | Jazzy | Kilted |
3629| --| --------| -------| --------|
3730| ** Pixi** | [ ![ Pixi: Humble] ( https://github.com/PlotJuggler/plotjuggler_bridge/actions/workflows/pixi_humble.yaml/badge.svg?branch=main )] ( https://github.com/PlotJuggler/plotjuggler_bridge/actions/workflows/pixi_humble.yaml ) | [ ![ Pixi: Jazzy] ( https://github.com/PlotJuggler/plotjuggler_bridge/actions/workflows/pixi_jazzy.yaml/badge.svg?branch=main )] ( https://github.com/PlotJuggler/plotjuggler_bridge/actions/workflows/pixi_jazzy.yaml ) | [ ![ Pixi: Kilted] ( https://github.com/PlotJuggler/plotjuggler_bridge/actions/workflows/pixi_kilted.yaml/badge.svg?branch=main )] ( https://github.com/PlotJuggler/plotjuggler_bridge/actions/workflows/pixi_kilted.yaml ) |
3831| ** colcon** | [ ![ ROS: Humble] ( https://github.com/PlotJuggler/plotjuggler_bridge/actions/workflows/ros_humble.yaml/badge.svg?branch=main )] ( https://github.com/PlotJuggler/plotjuggler_bridge/actions/workflows/ros_humble.yaml ) | [ ![ ROS: Jazzy] ( https://github.com/PlotJuggler/plotjuggler_bridge/actions/workflows/ros_jazzy.yaml/badge.svg?branch=main )] ( https://github.com/PlotJuggler/plotjuggler_bridge/actions/workflows/ros_jazzy.yaml ) | [ ![ ROS: Kilted] ( https://github.com/PlotJuggler/plotjuggler_bridge/actions/workflows/ros_kilted.yaml/badge.svg?branch=main )] ( https://github.com/PlotJuggler/plotjuggler_bridge/actions/workflows/ros_kilted.yaml ) |
3932
33+ ## Configuration Parameters
34+
35+ | Parameter | Type | Default | Description |
36+ | -----------| ------| ---------| -------------|
37+ | ` port ` | int | 9090 | WebSocket server port |
38+ | ` publish_rate ` | double | 50.0 | Aggregation publish rate in Hz |
39+ | ` session_timeout ` | double | 10.0 | Client timeout duration in seconds |
40+ | ` strip_large_messages ` | bool | true | Strip large arrays from Image, PointCloud2, LaserScan, OccupancyGrid messages |
41+
42+ ## Just "Download and Run"
43+
44+ ### Pixi
45+
46+ Install the pre-built package from the [ PlotJuggler conda channel] ( https://prefix.dev/channels/plotjuggler ) — no build step required.
47+
48+ ``` bash
49+ # Install (change humble to jazzy or kilted as needed)
50+ pixi global install pj-bridge-ros2-humble \
51+ -c https://prefix.dev/plotjuggler -c robostack-staging -c conda-forge
52+
53+ # Run (add arguments if different from default)
54+ pj_bridge_ros2 --ros-args -p port:=9090
55+ ```
56+
57+ ### AppImage
58+
59+ Pre-built AppImages are available from [ GitHub Releases] ( https://github.com/PlotJuggler/plotjuggler_bridge/releases ) .
60+
61+ Example for ROS2 Humble:
62+
63+ ``` bash
64+ # Do once after downloading the file
65+ chmod +x pj_bridge_ros2-humble-x86_64.AppImage
66+
67+ # Run (add arguments if different from default)
68+ ./pj_bridge_ros2-humble-x86_64.AppImage --ros-args -p port:=9090
69+ ```
4070
71+ ## Build Instructions
4172
4273All dependencies (IXWebSocket, spdlog, nlohmann_json, ZSTD) are provided by the dependency manager — nothing is vendored except ` tl::expected ` .
4374
44- ### ROS2 backend — Pixi (recommended)
75+ ### ROS2 — Pixi
4576
4677[ Pixi] ( https://pixi.sh ) manages the full toolchain including ROS2 via [ RoboStack] ( https://robostack.github.io/ ) .
4778
48- ``` bash
49- git clone < repository_url> pj_bridge && cd pj_bridge
79+ From the cloned ** plotjuggler_bridge** directory:
5080
51- # Humble
81+ ``` bash
82+ # Build and test (change humble to jazzy or kilted as needed)
5283pixi run -e humble build
5384pixi run -e humble test
5485
55- # Jazzy
56- pixi run -e jazzy build
57- pixi run -e jazzy test
86+ # Run
87+ pixi shell -e humble
88+ ros2 run pj_bridge pj_bridge_ros2
5889```
5990
60- ### ROS2 backend — colcon
91+ ### ROS2 — colcon
6192
6293Standard ROS2 build using ` colcon ` . Dependencies are installed via ` rosdep ` ; only IXWebSocket is fetched automatically via CMake FetchContent.
6394
6495``` bash
6596# Set up workspace
6697mkdir -p ~ /ws_plotjuggler/src && cd ~ /ws_plotjuggler/src
67- git clone < repository_url > pj_bridge
98+ git clone https://github.com/PlotJuggler/plotjuggler_bridge && cd plotjuggler_bridge
6899
69100# Install dependencies
70101source /opt/ros/${ROS_DISTRO} /setup.bash
@@ -74,77 +105,33 @@ rosdep install --from-paths pj_bridge --ignore-src -y
74105cd ~ /ws_plotjuggler
75106colcon build --packages-select pj_bridge --cmake-args -DCMAKE_BUILD_TYPE=Release
76107colcon test --packages-select pj_bridge && colcon test-result --verbose
108+
109+ # Run
110+ source install/setup.bash
111+ ros2 run pj_bridge pj_bridge_ros2
77112```
78113
79- ### FastDDS backend — Conan
114+ ### FastDDS — Conan
115+
116+ Standalone build using eProsima Fast DDS (no ROS2 required).
117+
118+ From the cloned ** plotjuggler_bridge** directory:
80119
81120``` bash
82- cd pj_bridge
121+ # Build
83122conan install . --output-folder=build_fastdds --build=missing -s build_type=Release
84123cd build_fastdds
85124cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_FASTDDS=ON \
86125 -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
87126make -j$( nproc)
88- ```
89-
90- ### Running Tests
91-
92- ``` bash
93- # Via pixi (154 unit tests)
94- pixi run -e humble test
95127
96- # Or manually after building
97- colcon test --packages-select pj_bridge && colcon test-result --verbose
128+ # Run
129+ ./pj_bridge_fastdds --domains 0 1
98130```
99131
100- ## Usage
101-
102- ### Starting the Server
103-
104- #### ROS2 backend
105-
106- ``` bash
107- # Default (port 8080, 50 Hz, 10 s timeout)
108- ros2 run pj_bridge pj_bridge_ros2
109-
110- # Custom
111- ros2 run pj_bridge pj_bridge_ros2 --ros-args \
112- -p port:=9090 -p publish_rate:=50.0 -p session_timeout:=10.0
113- ```
114-
115- #### FastDDS backend
116-
117- ``` bash
118- pj_bridge_fastdds --domains 0 1 --port 8080 --publish-rate 50 --session-timeout 10
119- ```
120-
121- ### Configuration Parameters
122-
123- | Parameter | Type | Default | Description |
124- | -----------| ------| ---------| -------------|
125- | ` port ` | int | 9090 | WebSocket server port |
126- | ` publish_rate ` | double | 50.0 | Aggregation publish rate in Hz |
127- | ` session_timeout ` | double | 10.0 | Client timeout duration in seconds |
128- | ` strip_large_messages ` | bool | true | Strip large arrays from Image, PointCloud2, LaserScan, OccupancyGrid messages |
129-
130- ### Testing with Sample Data
131-
132- ``` bash
133- # Terminal 1: Play rosbag
134- source /opt/ros/humble/setup.bash
135- ros2 bag play /path/to/sample.mcap --loop
136-
137- # Terminal 2: Run server
138- source /opt/ros/humble/setup.bash
139- source ~ /ws_plotjuggler/install/setup.bash
140- ros2 run pj_bridge pj_bridge_node
141-
142- # Terminal 3: Run Python test client
143- cd ~ /ws_plotjuggler/src/pj_bridge
144- python3 tests/integration/test_client.py --subscribe /topic1 /topic2
145- ```
132+ ## Documentation
146133
147- ## API Protocol
134+ - For detailed architecture documentation, see [ docs/ARCHITECTURE.md ] ( docs/ARCHITECTURE.md ) .
148135
149136For the full API protocol documentation (commands, responses, binary wire format), see [ docs/API.md] ( docs/API.md ) .
150137
@@ -155,15 +142,15 @@ For the full API protocol documentation (commands, responses, binary wire format
155142Another process is using the port. Either kill the conflicting process or use a custom port:
156143
157144``` bash
158- ros2 run pj_bridge pj_bridge_node --ros-args -p port:=9090
145+ ros2 run pj_bridge pj_bridge_ros2 --ros-args -p port:=9090
159146```
160147
161148### Client receives no data
162149
1631501 . Verify server is running: ` ps aux | grep pj_bridge `
1641512 . Check topics are being published: ` ros2 topic list `
1651523 . Verify heartbeat is being sent (required every 1 second)
166- 4 . Check server logs: ` ros2 run pj_bridge pj_bridge_node --ros-args --log-level debug `
153+ 4 . Check server logs: ` ros2 run pj_bridge pj_bridge_ros2 --ros-args --log-level debug `
167154
168155### "Failed to get schema for topic" error
169156
@@ -178,7 +165,7 @@ ros2 interface show <package_name>/msg/<MessageType>
178165The client stopped sending heartbeats. Ensure the client sends a heartbeat every 1 second. The default timeout is 10 seconds. Increase if needed:
179166
180167``` bash
181- ros2 run pj_bridge pj_bridge_node --ros-args -p session_timeout:=20.0
168+ ros2 run pj_bridge pj_bridge_ros2 --ros-args -p session_timeout:=20.0
182169```
183170
184171## License
0 commit comments