openpilot/tools/cabana
Jason Wen d35cdb510d
Sync: `commaai/msgq:master` into `sunnypilot/msgq:master`
Sync: `commaai/opendbc:master` into `sunnypilot/opendbc:master`

Sync: `commaai/panda:master` into `sunnypilot/panda:master`
2024-08-03 21:22:09 -04:00
..
assets
chart cabana: simplify stream management and remove problematic autosave feature (#32945) 2024-07-10 15:10:24 -07:00
dbc cabana: simplify stream management and remove problematic autosave feature (#32945) 2024-07-10 15:10:24 -07:00
streams deprecate busTime (#33146) 2024-07-30 21:26:58 -07:00
tests cabana(DBCFile): handle escaped quotes (#31889) 2024-04-03 19:19:55 -07:00
tools cabana: bug fixes and improvements (#32934) 2024-07-08 14:50:31 -07:00
utils cabana: bug fixes and improvements (#32934) 2024-07-08 14:50:31 -07:00
.gitignore
README.md cabana: update README (#32965) 2024-07-12 16:42:45 -07:00
SConscript opendbc is a package (#33159) 2024-07-31 23:17:40 -07:00
binaryview.cc
binaryview.h
cabana.cc cabana: simplify stream management and remove problematic autosave feature (#32945) 2024-07-10 15:10:24 -07:00
commands.cc
commands.h
detailwidget.cc
detailwidget.h ui: Split sunnypilot into its own classes 2024-07-29 06:40:35 -04:00
historylog.cc cabana: bug fixes and improvements (#32934) 2024-07-08 14:50:31 -07:00
historylog.h cabana: some improvements (#32161) 2024-04-24 15:56:25 -07:00
mainwin.cc cabana: fix wrong file path handling for recent files menu (#32969) 2024-07-12 10:38:07 -07:00
mainwin.h cabana: simplify stream management and remove problematic autosave feature (#32945) 2024-07-10 15:10:24 -07:00
messageswidget.cc cabana: fixed row height issue in multi-line hex display (#32816) 2024-06-24 08:54:17 -07:00
messageswidget.h cabana: some improvements (#32161) 2024-04-24 15:56:25 -07:00
settings.cc cabana: increase cache limits (#32295) 2024-04-25 10:35:49 -07:00
settings.h
signalview.cc cabana: simplify stream management and remove problematic autosave feature (#32945) 2024-07-10 15:10:24 -07:00
signalview.h cabana: simplify stream management and remove problematic autosave feature (#32945) 2024-07-10 15:10:24 -07:00
streamselector.cc cabana: simplify stream management and remove problematic autosave feature (#32945) 2024-07-10 15:10:24 -07:00
streamselector.h cabana: simplify stream management and remove problematic autosave feature (#32945) 2024-07-10 15:10:24 -07:00
videowidget.cc cabana: bug fixes and improvements (#32934) 2024-07-08 14:50:31 -07:00
videowidget.h cabana: bug fixes and improvements (#32934) 2024-07-08 14:50:31 -07:00

README.md

Cabana

Cabana is a tool developed to view raw CAN data. One use for this is creating and editing CAN Dictionaries (DBC files), and the tool provides direct integration with commaai/opendbc (a collection of DBC files), allowing you to load the DBC files direct from source, and save to your fork. In addition, you can load routes from comma connect.

Usage Instructions

$ ./cabana -h
Usage: ./cabana [options] route

Options:
  -h, --help                     Displays help on commandline options.
  --help-all                     Displays help including Qt specific options.
  --demo                         use a demo route instead of providing your own
  --qcam                         load qcamera
  --ecam                         load wide road camera
  --stream                       read can messages from live streaming
  --panda                        read can messages from panda
  --panda-serial <panda-serial>  read can messages from panda with given serial
  --socketcan <socketcan>        read can messages from given SocketCAN device
  --zmq <zmq>                    the ip address on which to receive zmq
                                 messages
  --data_dir <data_dir>          local directory with routes
  --no-vipc                      do not output video
  --dbc <dbc>                    dbc file to open

Arguments:
  route                          the drive to replay. find your drives at
                                 connect.comma.ai

Examples

Running Cabana in Demo Mode

To run Cabana using a built-in demo route, use the following command:

cabana --demo

Loading a Specific Route

To load a specific route for replay, provide the route as an argument:

cabana "a2a0ccea32023010|2023-07-27--13-01-19"

Replace "0ccea32023010|2023-07-27--13-01-19" with your desired route identifier.

Running Cabana with multiple cameras

To run Cabana with multiple cameras, use the following command:

cabana "a2a0ccea32023010|2023-07-27--13-01-19" --dcam --ecam

Streaming CAN Messages from a comma Device

SSH into your device and start the bridge with the following command:

cd /data/openpilot/cereal/messaging/
./bridge &

Then Run Cabana with the device's IP address:

cabana --stream <ipaddress>

Replace <ipaddress> with your comma device's IP address.

While streaming from the device, Cabana will log the CAN messages to a local directory. By default, this directory is ~/cabana_live_stream/. You can change the log directory in Cabana by navigating to menu -> tools -> settings.

After disconnecting from the device, you can replay the logged CAN messages from the stream selector dialog -> browse local route.

Streaming CAN Messages from Panda

To read CAN messages from a connected Panda, use the following command:

cabana --panda

Using the Stream Selector Dialog

If you run Cabana without any arguments, a stream selector dialog will pop up, allowing you to choose the stream.

cabana

Additional Information

For more information, see the openpilot wiki

If you encounter any issues or have feature requests, please contribute bug reports or discussions at: new cabana feedback