Giter Club home page Giter Club logo

plotjuggler-can-dbs's Introduction

plotjuggler-CAN-dbs

Plugins to visualize CAN .dbs files and streams in PlotJuggler.

Using the plugins, One can;

  • Visualize CAN logs created by candump -L in PlotJuggler using a can database file (for ex. .dbc)
  • Visualize CAN streams

Prerequisites

  • PlotJuggler (3.2 or later)
  • Qt5 SerialBus (Optional, required for DataStreamCAN)

Building the CAN plugins

To build any plugin, PlotJuggler must be installed in your system.

For instance, in Linux, you should perform a full compilation and installation:

git clone --recurse-submodules https://github.com/facontidavide/PlotJuggler.git
cd PlotJuggler
mkdir build; cd build
cmake ..
make -j
sudo make install

After successfull installation of PlotJuggler, one can build DataLoadCAN and DataStreamCAN plugins as follows.

git clone --recurse-submodules https://github.com/PlotJuggler/plotjuggler-CAN-dbs.git
cd plotjuggler-CAN-dbs
mkdir build; cd build
cmake ..
make

An alternative approach is including this project in a local copy of PlotJuggler. This approach might be preferable on Windows or AppImage builds

git clone --recurse-submodules https://github.com/facontidavide/PlotJuggler.git
cd PlotJuggler/plotjuggler_plugins
git clone --recurse-submodules https://github.com/PlotJuggler/plotjuggler-CAN-dbs.git
# Add the following line in the CMakeList.txt of the PlotJuggler, just after other plugin include lines
# add_subdirectory( plotjuggler_plugins/plotjuggler-CAN-dbs )
cd ../; mkdir build; cd build # Create a build folder in the root of PlotJuggler
cmake ..
make -j
sudo make install # In this approach, system-wide install is optional, you can diretly use the PJ inside the bin with CAN plugins included

Using the plugins

After building the plugins, one needs to include build directory to the plugins directory of the PlotJuggler.

App -> Preferences -> Plugins

CanPluginInclude

DataLoadCAN

If DataLoadCAN plugin is loaded, you will be able to import .log files. When a .log file is choosen, another dialog will be opened for selecting the database (.dbc) and the protocol (RAW, NMEA2K or J1939).

DataLoadCAN

DataStreamCAN

CAN Streamer plugin is only built if Qt5 SerialBus plugin is installed in your machine (surprisingly, it is not possible to install via apt on Ubuntu 18.04). If you want to use CAN Streamer plugin (and your machine does not have the plugin), you can check this gist for instructions on how to install Qt5 Serialbus.

When you start CAN Streamer plugin, a connect dialog will be opened as in the figures below. After choosing the correct backend and interface, one need to click Load CAN Database, which opens another dialog for selecting the database (.dbc only for now) and the protocol (RAW, NMEA2K or J1939). Only after the database dialog is accepted, OK button will be enabled for you to start the streamer.

DataStreamCAN

Details about the plugins

RAW CAN signals are added to the plot in the following format:

can_frames/<FrameId,DecStr>/<SignalName>

NMEA2K signals are added to the plot in the following formats:

  • When the received PGN is PDU Format 1:
    • nmea2k_msg/PDUF1/<MessageName> (<PGN with destination addr cleared>)/<SourceAddr,HexStr>/<DestinationAddr,HexStr>/<SignalName>
  • When the received PGN is PDU Format 2 (i.e. broadcast type):
    • nmea2k_msg/PDUF2/<MessageName> (<PGN>)/<SourceAddr,HexStr>/<SignalName>

J1939 signals are added to the plot just like the NMEA2K ones, with only difference being the the use of prefix j1939_msg instead of nmea2k_msg.

plotjuggler-can-dbs's People

Contributors

facontidavide avatar ozzdemir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plotjuggler-can-dbs's Issues

Cannot open the log file

Hi,
I am trying to use this plugin but could not make use of the existing steps in README.md. I could build both projects. Then I copied the "build" directory from ".../plotjuggler-CAN-dbs/build/" into ".../PlotJuggler/build/plotjuggler_plugins/" and renamed it "DataLoadCAN". Then I ran plotjuggler but could not import the sample log file from "/plotjuggler-CAN-dbs/datasamples/"
How exactly should that be done?

Install plugin on windows

I have been trying for hours to install this plugin alongside my windows PlotJuggler installation. I get an error when I build using CMake "MinGW makefile" ..
PlotJuggler_LIBRARY and PlotJuggler_LIBRARY_DIR can't be found.

Would love to use plotjuggler to reverse engineer some Canbus signals and this plugin should come standard with plotjuggler.

How to Select multiple CAN database?

Is there a way to load multiple CAN database and plot them on different CAN channels? I have a 2 channel peak can tool but I have to open two instances of PJ and load a SAE and a custom .dbc files to see the graphs.

I am using the AppImage of PlotJuggler (v3.7.1), which btw is super helpful since I was not able to compile the linux version on my machine. Thank you for that.

CAN data does not show values

Hello!

I have a can data file and a corresponding dbc file.
I saved this file by doing candump -L can0 > myfile.log
I then load the file and the dbc file into the UI, but it shows that there are no values. When I try to plot one of the CAN field it only plots one value.

I noticed that on the TimeSeriesList tree view, on the right side where it should display "values" it shows a "-". See image.
image

I verified and the CAN file has values and I can plot them using matplotlib.

Please let me know if you have any suggestion.

My machine is running Ubuntu 20.04, and I built plotjuggler and plotjuggler-can-dbs

Note: I tested with the provided files: https://github.com/PlotJuggler/plotjuggler-CAN-dbs/tree/development/datasamples and it's working for these ones.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.