Hello,
I am trying to use the sample_canbus_interpreter example with a custom DBC. I am currently testing with a virtual bus (vcan0) and have noticed some behavior that I do not fully understand regarding the interpretation of CAN messages.
To verify the interpretation, I tried to modify the DBC of the example, specifically the scale factor of the speed signal. However, when sending messages corresponding to that signal, the output still shows the same value as it had before modifying the scale factor in the DBC. This makes me think that the program is not using the DBC to interpret the messages or that there is some additional step that I am not performing correctly.
My questions are:
1)What is the procedure that the sample_canbus_interpreter example follows for decoding CAN messages?
2)Is there any external configuration file used, in addition to the DBC, to determine how the messages are interpreted?
3)Is there any additional step that is required for the program to correctly read and apply the provided DBC?
By default, the configuration is used for the devkit. If you are using the custom carrier board, please configure it according to your custom board design.
There are also several examples which have been verified from us, please check https://elinux.org/Jetson/L4T/peripheral/
Please share the full dmesg and device tree for us to check your status in detail.
It can be seen that the output of the CAN messages is exactly the same as in the example. However, in this DBC (test.dbc) the scale factor of the “speed” signal is different, so the output value should be different.
Program Arguments:
--csv=false
--dbc=../test.dbc
--driver=can.socket
--offscreen=0
--params=device=vcan0
--profiling=1
[27-04-2023 05:02:37] Platform: Detected Drive Orin P3710
[27-04-2023 05:02:37] TimeSource: monotonic epoch time offset is 1682496553152239
[27-04-2023 05:02:37] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[27-04-2023 05:02:37] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[27-04-2023 05:02:37] PTP Time is available from Eth Driver
[27-04-2023 05:02:37] Adding variable DW_Base:DW_Version
[27-04-2023 05:02:37] Added variable DW_Base:DW_Version
[27-04-2023 05:02:37] Platform: number of GPU devices detected 1
[27-04-2023 05:02:37] Platform: currently selected GPU device 0, Resource Data Dir: trt_08_05_10_03, Arch: ga10b
[27-04-2023 05:02:37] Platform: currently selected GPU device integrated ID 0
[27-04-2023 05:02:37] CUDLAEngine:getDLACount: CUDLA version is = 1003000
[27-04-2023 05:02:37] CUDLAEngine:getDLACount: Number of DLA devices = 2
[27-04-2023 05:02:37] Context::mountResourceCandidateDataPath resource FAILED to mount from './resources': VirtualFileSystem: Failed to mount './resources/resources.pak'
[27-04-2023 05:02:37] Context::mountResourceCandidateDataPath resource FAILED to mount from '/home/drive/bin/data': VirtualFileSystem: Failed to mount '/home/drive/bin/data/resources.pak'
[27-04-2023 05:02:37] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks/data
[27-04-2023 05:02:37] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks/data': VirtualFileSystem: Failed to mount '/usr/local/driveworks/data/resources.pak'
[27-04-2023 05:02:37] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.10/data
[27-04-2023 05:02:37] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-5.10/data': VirtualFileSystem: Failed to mount '/usr/local/driveworks-5.10/data/resources.pak'
[27-04-2023 05:02:37] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks/lib/libdw_base.so.5.10
[27-04-2023 05:02:37] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.10/targets/aarch64-Linux/lib/libdw_base.so.5.10
[27-04-2023 05:02:37] SDK: No resources(.pak) mounted, some modules will not function properly
[27-04-2023 05:02:37] egl::Display: found 1 EGL devices
[27-04-2023 05:02:37] egl::Display: use drm device: drm-nvdc
[27-04-2023 05:02:37] TimeSource: monotonic epoch time offset is 1682496553152239
[27-04-2023 05:02:37] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[27-04-2023 05:02:37] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[27-04-2023 05:02:37] PTP Time is available from Eth Driver
[27-04-2023 05:02:37] Initialize DriveWorks SDK v5.10.87
[27-04-2023 05:02:37] Release build with GNU 9.3.0 from buildbrain-branch-0-g9a5b4670e12 against Drive PDK v6.0.6.0
[27-04-2023 05:02:37] SensorFactory::createSensor() -> time.nvpps, nvpps-device=/dev/nvpps0
[27-04-2023 05:02:37] Can not create time sensor: DW_HAL_CANNOT_OPEN_CHANNEL: EndpointNVPPS: cannot open NVPPS device with name: /dev/nvpps0
Error: Permission denied
[27-04-2023 05:02:37] SensorFactory::createSensor() -> can.socket, device=vcan0
[27-04-2023 05:02:37] CANSocket: Cannot get current state of hardware time stamping: ioctl(SIOCGHWTSTAMP, vcan0) -> Operation not supported
[27-04-2023 05:02:37] CANSocket: software based timestamps will be used for vcan0
Create DBC-based CAN message interpreter
CAN DBC parsed results:
numMessages: 5
numSignals: 45
numSignalsExtendedValueType: 0
numIgnoredMessages: 0
numInvalidMessages: 0
numInvalidSignals: 0
numInvalidSignalsExtendedValueType: 0
Create Plugin-based CAN message interpreter
Create simple default CAN message interpreter
[27-04-2023 05:02:37] CANSocket: use SW based timestamps for vcan0
[27-04-2023 05:02:37] CANSocket: started vcan0
1682571763516905 [0x200] ->
0x2e 0x92 0x03 0x00
Car speed 2.3403 m/s at [1682571763516905]
1682571771722910 [0x100] ->
0xfa 0x49 0x02 0x00
Car steering 0.0937563 rad at [1682571771722910]