Skip to content

Instantly share code, notes, and snippets.

View ojura's full-sized avatar
:octocat:
⏯⏺⏮⏭

Juraj Oršulić ojura

:octocat:
⏯⏺⏮⏭
View GitHub Profile
Extract .tar.gz with progress:
pigz -dc mysql-binary-backup.tar.gz | pv | tar -xf -
/home/juraj/Downloads/clion-172.1572.3/bin/cmake/bin/cmake --build /home/juraj/cartographer_superbuild/cartographer/cmake-build-relwithdebinfo --target all -- -j 8
Scanning dependencies of target gtest
Scanning dependencies of target build_doc
Scanning dependencies of target cartographer_detect_changes
Scanning dependencies of target gmock
Scanning dependencies of target gmock_main
[ 0%] Building documentation.
[ 1%] Running C++ protocol buffer compiler on /home/juraj/cartographer_superbuild/cartographer/cartographer/transform/proto/transform.proto
[ 2%] Running C++ protocol buffer compiler on /home/juraj/cartographer_superbuild/cartographer/cartographer/kalman_filter/proto/pose_tracker_options.proto
[ 2%] Running C++ protocol buffer compiler on /home/juraj/cartographer_superbuild/cartographer/cartographer/common/proto/ceres_solver_options.proto
ROS_DISTRO=lunar
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo add-apt-repository universe
sudo apt update
sudo apt install git ros-$ROS_DISTRO-ros-base ninja-build -y
mkdir -p catkin_ws/src && cd catkin_ws/src
source /opt/ros/$ROS_DISTRO/setup.bash
git clone https://github.com/googlecartographer/cartographer.git
git clone https://ceres-solver.googlesource.com/ceres-solver
@ojura
ojura / CMakeLists.txt
Created June 30, 2017 09:03
Custom tool in CMake
cmake_minimum_required(VERSION 2.8.3)
project(amacal_mapping_evaluation)
find_package(catkin REQUIRED)
catkin_package()
# robot names for various robot types
set(pioneer_ROBOT_NAMES alpha pioneer)
-- Copyright 2016 The Cartographer Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
[1.000000, 0.000000, 0.000000, 0.000000],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
[1.000000, 0.000000, 0.000000, 0.000138],
@ojura
ojura / gist:82c5b5da84cdcf6c9537685ea97daaa9
Created November 3, 2017 12:25
How to display a scrollable curses pad from python
#!/usr/bin/env python2
import curses
import time
mypad_contents = []
def main(scr):
# Create curses screen
scr.keypad(True)
#!/usr/bin/env python
import roslib
import rospy
import math
import tf2_ros
import PyKDL
import geometry_msgs.msg
from math import pi
#!/bin/bash
comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)
@ojura
ojura / prepare_audio.sh
Created November 3, 2017 12:28
Abomination
#!/bin/bash
# Check if we are executing as root
if [ $UID != 0 ]; then
sudo ./prepare_audio.sh; exit
fi
# The nvidia driver cannot be loaded while we are configuring the GPU.
# Check whether the nvidia kernel is loaded: