Three-node virtual-CAN communication simulator for Halo's MCU/ECU CAN architecture.
NO REAL PROPULSION CONTROL: all pressure, temperature, and actuator data are synthetic; the percent-to-actuator assignment is a placeholder for testing CAN messaging only. No hardware outputs, calibrated conversion, or valve logic.
Install the dependencies:
sudo apt install can-utils iproute2 python3-pip
python3 -m pip install python-canCreate the virtual CAN network:
sudo modprobe vcan
sudo ip link add dev vcan0 type vcan
sudo ip link set vcan0 upCheck the interface:
ip link show vcan0Monitor CAN traffic:
candump vcan0Send CAN Frame:
cansend vcan0 <id>#<message>on Linux after creating vcan0:
python3 sim.py all
python3 sim.py all --fault-after 10Or run each node separately:
python3 sim.py mcu
python3 sim.py epr
python3 sim.py etcAt the final thrust-profile timestamp, the MCU sends zero thrust followed by
the shutdown CAN frame (0x102, standard ID, empty payload). EPR reports SAFE
with a vent request, and ETC reports INHIBITED with zero actuator output, then
all nodes close their CAN buses and exit. In all mode, the launcher waits up
to five seconds for remaining nodes to exit before terminating stuck tasks.
You can also send the shutdown frame to EPR and ETC with cansend vcan0 102#.
Install Matplotlib
python -m pip install matplotlibRun plotter (optionally with specific file):
python visualize_thrust_profile.py [file]