NeuroCUDA ROS2
Spiking neural network robot deployment, one launch file
NeuroCUDA ROS2 is the first pip-installable ANN-to-SNN compiler with a ROS2 package. Install neurocuda, point a launch file at a camera or event-camera topic, and a spiking neural network runs inference on your robot - no neuromorphic PhD, no manual spiking-neuron code, no hand-rolled ROS2 message wiring required.
Why a ROS2 package for spiking neural networks didn't exist
General-purpose ANN-to-SNN tools - SpikingJelly, snnTorch, NengoDL - are PyTorch libraries with no robot integration. Robotics-side SNN work exists, but it's either ROS1 research code (biomimetic head control on Loihi, Gridbot's navigation network) or a paper demonstrating one policy on one robot (S2Act's TurtleBot deployment, SNN4Agents' efficiency framework) - not a reusable, installable package. A roboticist who wants to try a spiking network has had to either learn spiking-neuron math from scratch or wire a research codebase into their own stack by hand.
NeuroCUDA ROS2 closes that gap: neurocuda_ros2 and neurocuda_msgs wrap NeuroCUDA's existing PyTorch-to-SNN compiler in standard ROS2 nodes, topics, and message types, distributed as a normal ROS2 package alongside the pip-installable compiler.
Architecture
Three ROS2 nodes cover perception, control, and debugging. Camera or event-camera frames go in; class predictions, spike statistics, and control commands come out.
Three ROS2 nodes
| Node | Input | Output | Purpose |
|---|---|---|---|
| snn_inference_node | Camera images or DVS events | Class predictions, spike stats | Perception |
| snn_control_node | Robot state, odometry | Velocity commands, Q-values | Action / policy |
| spike_viz | Spike events | Real-time spike raster | Debugging / research |
Three custom message types (neurocuda_msgs)
| Message | Fields |
|---|---|
| SnnDetection | class_id, class_name, confidence, top_k_labels, top_k_scores, sparsity, total_spikes, total_neurons |
| SnnSpikeEvent | layer_name, neuron_type, spike_count, total_neurons, sparsity |
| SnnStatus | model_name, task, architecture, accuracy, total_params, neuron_count, device, avg_sparsity, inference_time_ms |
Inference data flow
Six pre-trained models, loaded from HuggingFace
Every model below loads with neurocuda.hub.load("model-name") - no manual download, no separate weights repository to manage.
| Model | Task | Accuracy | Notable |
|---|---|---|---|
| MLP | MNIST digit recognition | 97.4% | Smallest, fastest |
| CNN | NMNIST event classification | 99.88% | Beats the ANN |
| StrongCNN | CIFAR-10 image classification | 74.3% | Vision baseline |
| ResNet-18 | CIFAR-10 | 70.1% | Deep SNN (convert + fine-tune) |
| SEW-ResNet | CIFAR-10 | 67.7% | Direct SNN training |
| VGG-5 SNN | CIFAR-10 | 94.6% | Best CIFAR-10 SNN |
Four hardware targets, one API
The same compiled model deploys to GPU, CPU, the Loihi 2 simulator, or FPGA through a single function call - no per-backend rewrite.
Verified cross-backend deviation is 1.2% or less between GPU, CPU, and the Loihi 2 simulator, with zero spike deviations across 256,000 comparisons against Intel's published Loihi neuron equations - the same validation already documented for the core compiler.
Docker: one-command robot deployment
For robots that need a reproducible environment without building ROS2 and CUDA from scratch on-device:
What's in the image
- Base: Ubuntu 24.04 + CUDA 12.9
- ROS2 Jazzy Jalisco (latest)
- PyTorch with CUDA
- NeuroCUDA built from source + HuggingFace-hosted pre-trained models
- ~26 GB (CUDA + PyTorch + ROS2 included)
NeuroCUDA ROS2 vs. other SNN frameworks
| Capability | NeuroCUDA | SINABS | snnTorch | Lava-DL |
|---|---|---|---|---|
| Pip-installable compiler | Yes | No | No | No |
| ROS2 package (robot-ready) | Yes | No | No | No |
| Multi-backend (GPU/CPU/Loihi/FPGA) | Yes | No | No | Loihi only |
| HuggingFace model hub | Yes - 6 verified models | No | No | No |
| NIR export | Yes | No | No | No |
| Docker image (CUDA + ROS2) | Yes | No | No | No |
| Event camera (DVS) support | Yes | No | Via tonic | No |
| License | MIT | MIT | MIT | Closed (Intel) |
Current state - honestly labeled
Consistent with how every result on this site is reported: what's verified, what's pending, no inflation.
| Item | Status |
|---|---|
| Code written and compiles | Done |
| neurocuda_msgs builds (colcon) | Done |
| neurocuda_ros2 builds (colcon) | Done |
| CI/CD runs on GitHub Actions | Done |
| Docker image builds successfully | Done |
| Core inference works (hub -> SNN -> output) | Done |
| Tested with a real ROS2 runtime | Needs Linux with ROS2 |
| Lifecycle node compliance | Standard nodes, not lifecycle yet |
| Messages wired to Python nodes | Defined but nodes still emit String |
| Real robot deployment | Not yet |
Open source & installation
NeuroCUDA ROS2 ships under the same MIT license as the core compiler. Full source for neurocuda_ros2 and neurocuda_msgs is public on GitHub alongside the compiler.
Frequently asked questions
Is there a ROS2 package for spiking neural networks?
Yes. NeuroCUDA ships neurocuda_ros2 and neurocuda_msgs, a ROS2 package and message set that runs a trained spiking neural network as a ROS2 node, taking camera or event-camera input and publishing class predictions, spike statistics, and sparsity metrics. As of 2026, it is the only pip-installable ANN-to-SNN compiler with a dedicated ROS2 package.
How do I run a spiking neural network on a robot?
Install NeuroCUDA via pip, then launch the ROS2 inference node: pip install neurocuda followed by ros2 launch neurocuda_ros2 infer.launch.py model:=vgg5_cifar10 device:=cuda. The node subscribes to a camera or DVS event topic and publishes detections, spike events, and status - no manual spiking-neuron code required.
What ROS2 topics does the inference node publish?
snn_inference_node publishes /snn/detections, /snn/sparsity, and /snn/status. A separate snn_control_node publishes /cmd_vel and /snn/action for SNN-based control policies.
Can it run on Loihi 2 or FPGA hardware?
The same trained model deploys to four backends through one API - GPU, CPU, a Loihi 2 IF-neuron simulator, and an FPGA proof-of-concept via HLS C++ - with verified cross-backend deviation of 1.2% or less and zero spike deviations against Loihi's published neuron equations across 256,000 comparisons. The ROS2 node selects the backend via a launch argument.
Is there a Docker image?
Yes - docker pull kvarma/neurocuda-ros2:latest provides Ubuntu 24.04, CUDA 12.9, ROS2 Jazzy Jalisco, PyTorch, and NeuroCUDA pre-built from source with all HuggingFace-hosted models. Running it with --gpus all is immediately ready to launch.
Further reading
New to ROS2 itself? Start with What Is ROS2? The Robot Operating System Explained. For the wider landscape of SNN-and-robotics projects and why almost none of them run on ROS2, see ROS2 and Spiking Neural Networks: What Exists, What Doesn't. For the full node-by-node deployment walkthrough, see How to Deploy a Spiking Neural Network on a ROS2 Robot. Picking a ROS2 version? See ROS2 Jazzy vs Humble. Working with event cameras? See Event Cameras and ROS2. Interested in Loihi 2 specifically? See Neuromorphic Robotics with Loihi 2 and ROS2.