CAN (Controller Area Network) is an electronic communication protocol designed to allow the Electronic Control Units (ECUs) in today’s automobiles to communicate with each other without a host computer. This broadcasts data frames across all nodes in which the messages get transmitted in a multiplex manner within automobiles. This page describes further details on how to configure the settings.

Setting up your environment

In order to configure the settings for CAN, you need to download the KvaserCAN driver. Go to this link and install the correct driver according to your OS’s version and type. After your installation is complete, run MORAI SIM.

CAN Network

(warning) While you connect your device with CAN Network, you can’t concurrently connect it with any of the following network, namely, ROS, UDP, Apollo, and Autoware . You can control Ego Vehicle’s behavior by configuring the settings of Channel, Bus Speed, and DBC via receiving the data from KvaserCAN. On its communication, the Data Rate is printed at the same interval of simulator’s running window output.

CAN Setting

When CAN is connected to its network, you could configure the following settings in details to secure your CAN operation.

CAN Interface

Select KvaserCAN for now. Other CAN device will be supported in the future.

Channel

Select the channel you want to connect to. If there is any change, click the Refresh button next to Channel to refresh the data.

Bus Speed

Choose the Bus Speed that you want to use.

DBC Setting

DBC (Decibels relative to the carrier) is the power ratio of a signal to a carrier signal, expressed in decibels. You could define DBC ID, and Signal. Fix the DLC to 8. DLC (Digital Loop Carrier) is a system that transmits digital multiplexed data signals by using existing cabling for distribution. Without MIN and MAX value, you could send and receive the values in the desirable form of DBC.

The sample DBC file is as below. Refer to this in your best use after downloading it.

Sample_CAN_DBC.dbc

I

Publisher data

No

Name

Unit

Remarks

1

Speed

km/h

Full list of crashed NPC vehicles

2

Brake

3

Brake Switch

4

Acceleration

5

Steering Angle

6

Roll

7

Pitch

8

Yaw

9

Turn Signal

10

Gear

  • Speed

    • Ego Vehicle’s speed value

    • Unit : km/h

  • Brake ( 0 ~ 1 )

    • Brake value (0 to 1) output of the Ego Vehicle

  • Brake Switch

    • Ego Vehicle’s brake value

      • Ego brake == 0 → Brake Switch : 0

      • Ego brake > 0 → Brake Switch : 1

  • Accel ( 0 ~ 1 )

    • Ego Vehicle’s acceleration value ( 0 ~ 1 )

    • Minimum value of acceleration in Signal value must be 0.

  • Steering Angle

    • Ego Vehicle’s steer angle value

    • Unit : radian

    • + Value left, - Value right

  • Roll, Pitch, Yaw

    • Information indicating rotation of the Ego Vehicle

    • Unit : deg

  • Turn Signal

    • Ego Vehicle’s Turning Signal

      • 0 : No Signal

      • 1 : Left Signal

      • 2 : Right Signal

  • Gear

    • Ego Vehicle’s Gear information

      • M : 0

      • P : 1

      • R : 2

      • N : 3

      • D : 4

      • L : 5

Subscriber data

  • Ctrl Gear

    • Ego Vehicle’s Gear control

      • M : 0

      • P : 1

      • R : 2

      • N : 3

      • D : 4

      • L : 5

  • Ctrl Accel (0 ~ 1)

    • Ego Vehicle’s acceleration pedal control

  • Ctrl Brake(0 ~ 1)

    • Ego Vehicle’s brake pedal control

  • Ctrl Steering Angle

    • Ego Vehicle’s horizontal steering control

    • Unit : radian

    • + Value left, - Value right

Data file management

All vehicle parameters set on CAN Network can be saved as a .json file in the following directory: \MoraiLauncher_Win\MoraiLauncher_Win_Data\SaveFile\ExternalNetworks

The External Network save screen

The output .json file