Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
fgiaimo edited this page Oct 26, 2017 · 12 revisions

Welcome to the opendlv wiki!

Enabling UDP multicast with multiple network interfaces

If your computing unit provides several network interfaces, it is recommended to specify the route to the UDP multicast network:

# route add 225.0.0.0/24 dev eno1

where eno1 is the network interface that shall be used by odsupercomponent.

Setting up Peak CAN device in Linux

To use the Peak CAN device with OpenDaVINCI and OpenDLV, download the latest driver from the vendor's website (cf. http://www.peak-system.com/fileadmin/media/linux/index.htm) and install with the commands:

# make clean; make NET=NETDEV_SUPPORT; make install

Next, it is required to define the correct bitrate (https://www.peak-system.com/fileadmin/media/linux/files/Installation-en_ab6.9.pdf).

To set the bitrate to 250k Baud make sure that the right value is set in the /etc/modprobe.d/pcan.conf file (there should be a line options pcan bitrate=0x011c, where 0x011c represents 250k Baud and 0x001c represents 500k Baud).

It may be necessary to bring up the network device:

# ifconfig canX up

or alternatively

# ip link set canX up type can bitrate Y

Where X is the socket can device and Y the bitrate, for example 250000 or 500000.

In case of too many errors the can bus may enter the "bus-off" state. An automatic bus-off recovery can be enabled by setting the "restart-ms" to a non-zero value:

# ip link set canX type can restart-ms 100

Please note that a command like ip link set can0 type can bitrate 250000 has no effect on the bitrate setting, as the pcan.conf file setting will not be overwritten.

To check that the setting is set correctly run

$ ip -details link show canX

Lastly the file /proc/pcan can be checked to confirm that the column ndev says canX and the column btr says 0x11c (for 250k Baud).

Unloading the device driver:

# rmmod pcan

Loading the device driver:

# modprobe pcan

Braking with the truck

To brake the truck, one has to send a negative acceleration in the BrakeRequest message.

Accelerating the truck

To accelerate the truck, one has to send a desired acceleration pedal position as percentage value between 0 and 100.

Steering the truck

To steer the truck using the delta torque message, the roadwheelangle field needs to be set to 35.535.