Physical CAN device


Requires
- Linux with RemotiveBus
- A CAN device connected to the host
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 \
-f basic_restbus/instances/hardware.instance.yaml \
build
docker compose -f build/basic_restbus_mock/docker-compose.yml up --build
Check with candump can0 that the restbus frames reach the device.
A topology uses a virtual CAN bus by default. Including one more instance file maps a channel to a CAN device on the host instead, so the same simulated ECUs talk to real hardware.
- Restbus example
- Instance file that maps
DriverCan0tocan0: hardware.instance.yaml
Build the restbus with the hardware mapping, and start it:
remotive topology build \
-f basic_restbus/instances/mock.instance.yaml \
-f basic_restbus/instances/hardware.instance.yaml \
build
docker compose -f build/basic_restbus_mock/docker-compose.yml up --build
Notice:
- Any device with SocketCAN support works out of the box. Once connected it shows up as a
canlink inip a s. - LIN and devices without SocketCAN support use RemotiveBus plugins, for example the Kvaser plugin.