Skip to main content

Physical CAN device

Topology graph of Physical CAN deviceTopology graph of Physical CAN device

Integrate · Topology examples v0.9.0

  • CAN
  • Chassis
  • RemotiveBus
  • 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.

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 can link in ip a s.
  • LIN and devices without SocketCAN support use RemotiveBus plugins, for example the Kvaser plugin.