Restbus


Requires
- Linux with RemotiveBus
Run it
git clone https://github.com/remotivelabs/remotivelabs-topology-examples.git
cd remotivelabs-topology-examples
remotive topology build -f basic_restbus/instances/mock.instance.yaml build
docker compose -f build/basic_restbus_mock/docker-compose.yml up --build
Open RemotiveStudio and select the SteeringAngle frame on the topology-DriverCan0 namespace.
Use RemotiveTopology to create a simple restbus, i.e. automatically send all frames by one or more ECUs.
You don't need a full vehicle platform for this. A minimal platform with one database, one CAN channel and one ECU is
enough to attach to a CAN bus and stimulate other ECUs. Running the ECU as a mock instantiates it as a restbus with no
extra logic:
ecus:
SCCM:
mock: {}
- Restbus example
- Platform: topology.platform.yaml
- Instance file: mock.instance.yaml
- Setting signal values from Python: update_restbus
Build and start the restbus, then set a signal from Python:
remotive topology build -f basic_restbus/instances/mock.instance.yaml build
docker compose -f build/basic_restbus_mock/docker-compose.yml up --build
# in another terminal
cd basic_restbus/python
uv sync
uv run -m update_restbus --signal SCCM-DriverCan0:SteeringAngle.SteeringAngle --value 123.45
Notice:
- The restbus respects CRC and E2E profiles when they are present in the database, along with default values.
- By subscribing to frames as well, the ECU becomes bi-directional: a behavioral model.
- The same restbus can play back a recording or run on a physical CAN device.