Open Source · pip install neurocuda · ROS2 Jazzy

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.

pip install neurocuda ros2 launch neurocuda_ros2 infer.launch.py model:=vgg5_cifar10 device:=cuda

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.

+----------------------------------------------------------+ | ROS2 GRAPH | | | | /camera/image -----> snn_inference_node ---> /snn/detections| | (sensor_msgs) (NeuroCUDA SNN) /snn/sparsity | | /snn/status | | | | /dvs/events --------> snn_inference_node (event cameras) | | | | /robot/state -------> snn_control_node -----> /cmd_vel | | (SNN DQN policy) /snn/action | +----------------------------------------------------------+

Three ROS2 nodes

NodeInputOutputPurpose
snn_inference_nodeCamera images or DVS eventsClass predictions, spike statsPerception
snn_control_nodeRobot state, odometryVelocity commands, Q-valuesAction / policy
spike_vizSpike eventsReal-time spike rasterDebugging / research

Three custom message types (neurocuda_msgs)

MessageFields
SnnDetectionclass_id, class_name, confidence, top_k_labels, top_k_scores, sparsity, total_spikes, total_neurons
SnnSpikeEventlayer_name, neuron_type, spike_count, total_neurons, sparsity
SnnStatusmodel_name, task, architecture, accuracy, total_params, neuron_count, device, avg_sparsity, inference_time_ms

Inference data flow

1. Camera publishes /camera/image (sensor_msgs/Image) | 2. snn_inference_node receives image | 3. ModelLoader converts image -> PyTorch tensor (4D or 5D for events) | 4. NeuroCUDA core runs SNN inference: - IF/LIF neurons simulate T timesteps - Membrane potentials accumulate spikes - Output = class logits + spike statistics | 5. Node publishes results: /snn/detections -> class, confidence, top-k /snn/sparsity -> energy efficiency metric /snn/status -> model info, device, latency

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.

ModelTaskAccuracyNotable
MLPMNIST digit recognition97.4%Smallest, fastest
CNNNMNIST event classification99.88%Beats the ANN
StrongCNNCIFAR-10 image classification74.3%Vision baseline
ResNet-18CIFAR-1070.1%Deep SNN (convert + fine-tune)
SEW-ResNetCIFAR-1067.7%Direct SNN training
VGG-5 SNNCIFAR-1094.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.

neurocuda.deploy(model, "snn_cifar10", target="gpu") # CUDA GPU neurocuda.deploy(model, "snn_cifar10", target="cpu") # CPU fallback neurocuda.deploy(model, "snn_cifar10", target="loihi2") # Intel Loihi 2 simulator neurocuda.deploy(model, "snn_cifar10", target="fpga") # FPGA

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.

NVIDIA GPU (shipped) CPU x86 / ARM (shipped) Loihi 2 simulator (shipped) FPGA via HLS C++ (proof of concept)

Docker: one-command robot deployment

For robots that need a reproducible environment without building ROS2 and CUDA from scratch on-device:

docker pull kvarma/neurocuda-ros2:latest docker run --gpus all kvarma/neurocuda-ros2:latest # -> Sources ROS2 Jazzy, builds neurocuda_msgs + neurocuda_ros2 # -> Ready to run: ros2 launch neurocuda_ros2 infer.launch.py model:=mlp_mnist

What's in the image

NeuroCUDA ROS2 vs. other SNN frameworks

CapabilityNeuroCUDASINABSsnnTorchLava-DL
Pip-installable compilerYesNoNoNo
ROS2 package (robot-ready)YesNoNoNo
Multi-backend (GPU/CPU/Loihi/FPGA)YesNoNoLoihi only
HuggingFace model hubYes - 6 verified modelsNoNoNo
NIR exportYesNoNoNo
Docker image (CUDA + ROS2)YesNoNoNo
Event camera (DVS) supportYesNoVia tonicNo
LicenseMITMITMITClosed (Intel)

Current state - honestly labeled

Consistent with how every result on this site is reported: what's verified, what's pending, no inflation.

ItemStatus
Code written and compilesDone
neurocuda_msgs builds (colcon)Done
neurocuda_ros2 builds (colcon)Done
CI/CD runs on GitHub ActionsDone
Docker image builds successfullyDone
Core inference works (hub -> SNN -> output)Done
Tested with a real ROS2 runtimeNeeds Linux with ROS2
Lifecycle node complianceStandard nodes, not lifecycle yet
Messages wired to Python nodesDefined but nodes still emit String
Real robot deploymentNot 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.