-
Notifications
You must be signed in to change notification settings - Fork 5
Hydrus Ros Debugger #172
Description
The following is an idea I sketch with chatGPT. Overall this is a debugger tool for debugging realtime ros systems.
Absolutely! Here’s a full summary of all the features, requirements, and concepts we've discussed so far for your ROS Debugging Tool with Topic Simulation and Interactive Control.
🧠 Project Concept
A ROS Debugging and Simulation Tool that:
Simulates ROS topic data to test nodes in isolation
Allows interactive real-time changes to topic data
Can use recorded data (rosbags) or synthetic data
Optionally integrates with debuggers to manipulate variables on the fly
Acts as a test harness and optionally a fuzzer
✅ Core Features (So Far)
🎯 1. Debug Mode Entry Point
A script or flag like --debug enables the whole system
Launches the node under test with simulated topic dependencies
📡 2. Topic Simulation Daemon
Simulates publishers for topics your node depends on
Publishes data either from:
Static values
Pattern generators (e.g., sine, ramp, noise)
Rosbag replay
Handles multiple topics with independent rates
🧰 3. Test Harness Behavior
Automatically detects what topics a node subscribes to
Uses that to launch fake publishers
Lets you run and test nodes without bringing up the full robot stack
🧪 4. Fuzzing Capabilities
Option to randomly mutate published data:
Send edge cases, invalid values, malformed messages
Stress-test node logic for robustness
🧾 5. Interactive CLI (or GUI) Control
Modify topic values on-the-fly:
set /sensor/temperature 42.0
pattern /sensor/temperature sine
fuzz /sensor/position on
CLI could communicate via:
UNIX socket or TCP socket
ROS service or topic
ZMQ or REST if external
🐞 6. Live Debugging Integration
Compatible with:
pdb, ipdb (command-line)
debugpy (remote, GUI debuggers like VS Code)
Lets you pause execution, inspect and change variables mid-run
🔄 7. Hot Variable Editing
During a paused breakpoint, variables can be modified:
PID gains
Filter thresholds
Simulated sensor values
🧱 8. Modular Config System
YAML/JSON config to define:
Topics to simulate
Message types
Default values or patterns
ROS bag sources
Fuzzing rules
💻 Architecture Sketch
Debug Entry Point (launch or script)
│
├── Launches Node Under Test
├── Launches Topic Simulator Daemon
│ ├── Uses topic config
│ ├── Publishes data (const/pattern/bag)
│ └── Listens to control commands
│
└── CLI / Socket / Service Interface
└── Changes values or behaviors of simulated publishers
📦 Requirements
✅ Functional Requirements
[x] Simulate arbitrary ROS topics (from config or introspection)
[x] Modify topic values and behavior at runtime
[x] Plug-and-play ROS node compatibility
[x] CLI commands to control topic simulation
[x] Optional fuzzer for edge-case testing
[x] Optional ROS bag replay
[x] Live integration with Python debugger
🛠️ Technical Requirements
ROS 1 (or 2 — confirm?)
Python 3
Uses rospy, rosnode, rostopic, subprocess, etc.
Optional dependencies:
debugpy for external debuggers
argparse, yaml for CLI and config
socket or ROS service for control API
🧩 Stretch Features (Future Ideas)
GUI with sliders/buttons (rqt, PyQt, or web dashboard)
Record-and-replay of test sessions
Plugin architecture for adding custom generators per topic
Logging and assertions for pass/fail test criteria
ROS2 compatibility (if needed)
Integration with CI/CD (auto run tests on PR)