This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
find $1 -type f -exec mv --backup=numbered -t $1 {} + | |
find $1 -type d -empty -delete | |
fdupes -rdNS $1 | |
# Sources: | |
# - https://superuser.com/questions/658075/how-do-i-move-files-out-of-nested-subdirectories-into-another-folder-in-ubuntu | |
# - https://unix.stackexchange.com/questions/8430/how-to-remove-all-empty-directories-in-a-subtree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
ROSBAG_FOLDER=$1 | |
TOPICS="${@:2}" | |
ROSBAG_PATH_OUT=${ROSBAG_FOLDER}/combined.bag | |
i=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
ROSBAG_FOLDER=$1 | |
TOPICS="${@:2}" | |
ROSBAG_PATH_OUT=${ROSBAG_FOLDER}/combined.bag | |
i=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import roslib; | |
import rospy | |
import rosbag | |
from rospy import rostime | |
import argparse | |
import os | |
def parse_args(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id: 55111e8de9825e51aff5d6fd9e83a37b | |
hardware_id: mynteye/imu/data_raw | |
sensor_type: IMU | |
sigmas: | |
acc_noise_density: 0.016925432397973516 | |
acc_bias_random_walk_noise_density: 0.016925432397973516 | |
gyro_noise_density: 0.0010848026158819934 | |
gyro_bias_random_walk_noise_density: 0.000023404834136742844 | |
saturation_accel_max_mps2: 200.0 | |
saturation_gyro_max_radps: 7.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE(mfehr): program_name can be obtained through argv[0]. | |
void parseGflagsFromRosParams( | |
const char* program_name, const ros::NodeHandle& nh_private) { | |
CHECK_NOTNULL(program_name); | |
std::vector<google::CommandLineFlagInfo> flags; | |
google::GetAllFlags(&flags); | |
VLOG(1) << "Parsing gflags from ROS params..."; | |
std::stringstream ss; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git fetch --quiet | |
message="Does not exist on remote!" | |
all_remote_branches=$(git branch -r) | |
echo -e "\n\e[1m remote\tlocal\tbranch name\e[0m" | |
git branch | while read line ; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upgrade 14.04 to gcc/g++ from 16.04 | |
# Based on: https://gist.github.com/application2000/73fd6f4bf1be6600a2cf9f56315a2d91 | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ | |
sudo apt-get update && \ | |
sudo apt-get install gcc-snapshot -y && \ | |
sudo apt-get update && \ | |
sudo apt-get install gcc-5 g++-5 -y && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# USAGE: speedup.sh <video> <speedup_factor (e.g. 2)> <speedup_factor_inv (e.g. 0.5)> | |
# speedup_factor_inv has to be equal to 1 /speedup_factor | |
let b=30*$2 | |
echo "ffmpeg -i $1 -r $b -filter:v 'setpts=${3}*PTS' ${1}_${2}x.mp4" | |
ffmpeg -i $1 -r $b -filter:v "setpts=${3}*PTS" ${1}_${2}x.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# USAGE: gifify.sh <video> <start time in s> <duration in s> <desired FPS> <scale in px> | |
# | |
# Example: ./gifify yourvideo.mp4 3 [start time in seconds] 10 [duration in seconds] 15 [desired FPS] 600 [gif scale, expressed as desired width in pixel] | |
# | |
palette="/tmp/palette_$2_$3_$4_$5.png" | |
filters="fps=$4,scale=$5:-1:flags=lanczos" |
NewerOlder