A Node.js + React-based web application that connects to foxglove-rosbridge and visualizes /events messages published in ROS2 using the CDR encoding format.
This app allows:
- Live real-time visualization of capability events
- Storage of incoming events in MongoDB
- Modular CDR decoding for easy support of new message types and topics
- REST API for historical data access
- Node.js ≥ 18.x
- MongoDB (running locally or via Atlas)
- ROS2 Capabilities2 system publishing to
/eventsvia foxglove-bridge
git clone https://github.com/CollaborativeRoboticsLab/event_logger_ui.git
cd event_logger_uiMake sure you have docker installed. Then,
docker compose upIf you want to modify or start the backend seperately, run following commands
cd backend
npm install
# Setup MongoDB URI
echo "MONGO_URI=mongodb://localhost:27017/event_logger" > .env
# Start the backend (REST API + WebSocket + Foxglove client)
node server.jsIf the backend does not start properly (fails to connect with mongodb) run the following commands
sudo rm -f /tmp/mongodb-27017.sock
sudo systemctl start mongod
sudo systemctl status mongodand then retry the server
node server.jsIf you want to modify or start the backend seperately, run following commands
cd ../frontend
npm install
npm startThen visit: http://localhost:3000
To add support for another ROS2 topic:
- Create a decoder under
backend/decoders/yourDecoder.js - Implement decoding logic using
CdrReader - Register it in
decoders/index.jsas
"/your/topic": require("./yourDecoder")| Method | URL | Description |
|---|---|---|
| GET | /api/events | List all stored events |
| POST | /api/events | Add new event (manual testing) |
- Foxglove WebSocket Protocol
- @foxglove/cdr
- ROS2 + DDS community for message protocols