Skip to content

Instantly share code, notes, and snippets.

@svinz
svinz / readme.md
Created January 16, 2023 11:30
How to reindex a rosbag file that is marked as still active

Reindex of rosbag file

If having trouble with a rosbag-file that havn't been stopped properly, the file will often have an .active extension, telling that the file needs to be reindexed. To fix this, do the following:

  • Install rosbag: sudo apt install python3-rosbag
  • Run follwing command: rosbag reindex brokenfile.bag.active

The new file will have the same name as the previous file e.g., (brokenfile.bag.active). Just remove the .active and use it as an ordinary .bag file

@svinz
svinz / readme.md
Last active December 30, 2022 19:47
Visualize a Powersaver Heat capacitor node in Home Assistant with Apex charts
@svinz
svinz / readme.md
Last active November 7, 2022 16:13
Remove the Cohda header from a pcap

Remove the Cohda header from a pcap recorded by a Cohda ITS-G5 radio

This gist describe how to remove the Cohda header from a .pcap file recorded in a Cohda ITS-G5 radio. This header does contain some information about the radiosignals. But if not interessted in them, it is possible to just remove them.

Pre-requisites

Linux/WSL etc

On a WSL/Linux of some kind, install wireshark-common:

sudo apt-get update
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@svinz
svinz / readme.md
Last active August 15, 2022 09:29
How to access a ublox GNSS-receivier with U-center when the receiver is connected to a Raspberry Pi and is only accessible through SSH

How to access a ublox GNSS-receivier with U-center when the receiver is connected to a Raspberry Pi and is only accessible through SSH

System topology

Systemsketch-Copy of Page-1

Config of the Raspberry Pi with the serial device connected (e.g. a ublox ZED-F9R)

  • Ensure that the computer is accessible with SSH and that socat is installed.
  • For a one time test, it is only necessary to run stty once like this: stty -F /dev/ttyACM0 38400 raw This is to ensure that baudrate is fixed, and that raw data traffic is used. Else it will probably fail in strange ways.
[{"id":"da3ac445de01333e","type":"tab","label":"C-ITS msg to Wireshark","disabled":false,"info":""},{"id":"d4521b1a9406e663","type":"inject","z":"da3ac445de01333e","name":"Inject a C-ITS message","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"12 00 50 0a 03 81 00 40 03 80 65 20 40 01 80 00 31 0a 00 e1 4a 00 00 14 00 00 02 03 37 42 4d f5 9e d9 0d 23 b6 79 70 06 64 24 bc 80 00 00 00 24 72 11 00 05 31 2d e0 00 c8 00 00 00 00 00 00 07 d2 00 00 02 01 2e 5b f2 71 81 17 2d f9 38 80 00 90 38 ec d8 01 04 19 b1 19 9c 45 a1 6f a0 07 07 af fe 0f ff ff fe 11 db ba 10 a8 c0 00 00 03 02 50 01 25 00 02 07 5f 76 bb 29 13 23 b6 79 70 06 64 24 bc 5a 3c 81 01 01 80 03 00 80 09 70 72 65 a6 17 74 e8 10 83 00 00 00 00 00 22 09 60 86 84 00 c8 01 0e 00 03 08 40 81 80 02 40 42 81 06 05 01 ff ff ff ff 80 03 08 40 83 81 06 05 01 ff ff ff ff 80 01 24 81 04 03 01 ff fc 80 01 25 81 05 04 01 ff ff ff 80 01 89 81 03 02 01 e0 80 01 8a 81 03 02 01 c0 80 01 8b 81 07 06 01 30 c0 01 ff f8 00