Skip to content

Instantly share code, notes, and snippets.

View twdragon's full-sized avatar
🦉

Andrei Vukolov twdragon

🦉
  • ELETTRA - Sincrotrone Trieste
  • Trieste, Italy
  • X @Stark_tw
View GitHub Profile
@twdragon
twdragon / cartographer-map-ds.cpp
Created April 11, 2023 08:59
Cartographer - disassembling .pbstream into submaps with positions
#include <iostream>
#include <map>
#include <string>
#include <vector>
#include "cartographer/io/proto_stream.h"
#include "cartographer/io/proto_stream_deserializer.h"
#include "cartographer/mapping/2d/probability_grid.h"
#include "cartographer/mapping/2d/submap_2d.h"
#include "cartographer/mapping/3d/submap_3d.h"
@twdragon
twdragon / eduroam.sh
Created December 15, 2022 23:34 — forked from AntonFriberg/eduroam.sh
Connect to eduroam on Lund University with NetworkManager
nmcli con add \
type wifi \
con-name "eduroam"
ifname "wlp4s0" \ # Your wifi interface
ssid "eduroam" \
wifi-sec.key-mgmt "wpa-eap" \
802-1x.identity "<YOUR-STUDENT-ID>@lu.se" \ # May also use another university identification
802-1x.password "<YOUR-PASSWORD" \
802-1x.system-ca-certs "yes" \
802-1x.domain-suffix-match "radius.lu.se" \
@twdragon
twdragon / Install LT4 21.1.md
Created April 23, 2018 09:47 — forked from jetsonhacks/Install LT4 21.1.md
Install LT4 21.1 on Jetson TK1

For best results, you should read through the official NVIDIA documentation found on:

https://developer.nvidia.com/linux-tegra-rel-21

In particular, the Quick Start Guide.

For this process you will need:

  • A host desktop or laptop computer running Ubuntu Linux 12.04 is officially recommended. In practice, this may be a virtual machine, I have used VirtualBox in the past. Also, I've successfully flashed from Ubuntu Linux 14.04. Your mileage may vary.
  • Micro USB cable provided with the Jetson TK1 kit
  • Jetson TK1 and power supply
@twdragon
twdragon / rgb2yuv420p.cc
Created April 14, 2018 19:57 — forked from aksarben09/rgb2yuv420p.cc
RGB To YUV420p
void rgb2yuv420p(uint8_t *destination, uint8_t *rgb, size_t width, size_t height)
{
size_t image_size = width * height;
size_t upos = image_size;
size_t vpos = upos + upos / 4;
size_t i = 0;
for( size_t line = 0; line < height; ++line )
{
if( !(line % 2) )
@twdragon
twdragon / gist:f86a2912f27407ed19fc0ad2a4aed2a7
Created April 14, 2018 13:19 — forked from royshil/gist:6318407
A CMake Find module for FFMPEG that will tear the HD apart looking for the libs and includes ;)
# - Try to find FFMPEG
# Once done this will define
# FFMPEG_FOUND - System has FFMPEG
# FFMPEG_INCLUDE_DIRS - The FFMPEG include directories
# FFMPEG_LIBRARIES - The libraries needed to use FFMPEG
# FFMPEG_LIBRARY_DIRS - The directory to find FFMPEG libraries
#
# written by Roy Shilkrot 2013 http://www.morethantechnical.com/
#