Skip to content

Instantly share code, notes, and snippets.

View tik0's full-sized avatar
🤖
Beep Boop!

Timo Korthals tik0

🤖
Beep Boop!
  • University Bielefeld
View GitHub Profile
@tik0
tik0 / .bashrc
Last active April 24, 2020 08:39
ASE .bashrc Ergänzung
########################### ASE CONFIG START ###########################
# Setup for pool PC (optional if you work on your own PC)
# Tested with Xubuntu 16.04 and ROS Kinetic
# Global ROS environment
source /opt/ros/kinetic/setup.bash
# Workspace realted ROS environment
source /media/localdisk/data/$(whoami)/catkin_ws/devel/setup.bash
@tik0
tik0 / build_ase.sh
Last active April 17, 2020 13:09
A build script for the ASE lecture
#!/bin/bash
# example: /usr/bin/parallel-ssh -i -h ~/.pssh_hosts_files -l tkorthals -A "wget -O - .../build_ase.sh > /tmp/build_ase.sh; bash /tmp/build_ase.sh"
set -e
source /opt/ros/kinetic/setup.bash
F="/media/localdisk/data/$(whoami)"
C="${F}/catkin_ws"
S="${C}/src"
A="${S}/ase_exercises"
@tik0
tik0 / evaluate_ppo.sh
Last active February 28, 2020 09:30
PPO eval
#!/bin/bash
touch ppo_evaluate.txt
echo 'Flat: ' >> ppo_evaluate.txt
cp /root/ros2learn/environments/gym-gazebo2/gym_gazebo2/worlds/empty_bullet.world /root/ros2learn/environments/gym-gazebo2/gym_gazebo2/worlds/parcour.world
python3 run_evaluation_ppo2.py
cat ppoTestRun.txt >> ppo_evaluate.txt
pkill gzserver
@tik0
tik0 / build-instructions
Last active February 4, 2020 00:39 — forked from mattseymour/build-instructions
Build Python 3.6 from source for Ubuntu and Debian
Prerequisties install:
- sudo apt-get install build-essential checkinstall
These are the dependancies required by python:
- sudo apt-get install libbz2-dev libc6-dev libgdbm-dev libncursesw5-dev libreadline-gplv2-dev libssl-dev libsqlite3-dev tk-dev
Download the tar source file from python.org (at the time of writing 3.6.1 is the latest release):
- wget -O ~/Downloads/python3.6.1.tgz https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
Via command line navigate to the downloaded file directory:
@tik0
tik0 / variational_autoencoder.py
Created December 17, 2019 11:30
Example of VAE on MNIST dataset using MLP with tf.keras and tf-2.0
'''Example of VAE on MNIST dataset using MLP
tf-2.0 adaptation of the keras implementation [1]
with additional output of the reconstruction
and KL losses as discussed in [2]
# Reference
[1] https://github.com/keras-team/keras/blob/master/examples/variational_autoencoder.py
[2] https://stackoverflow.com/q/54069363/2084944
@tik0
tik0 / quaternionen_projection.py
Created September 11, 2019 20:05
Project one rotation frame into another frame
from scipy.spatial.transform import Rotation as R
import numpy as np
#Example of having to rotations in different coordinate systems (r&q), where we want to reporesent r inside q:
#r0, r1, r2, r3, r4, ..., rX (i.e. BRIX quaternionen)
#q0, q1, q2, q3, q4, ..., qX (i.e. Vive quaternionen)
#
#delta = q0.inv() * r0
#delta1 = r0.inv() * r1
@tik0
tik0 / VAE_classify_mean_vs_var.ipynb
Created July 30, 2019 14:32
Classification of VAE features on MNIST
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tik0
tik0 / collide_without_contact.world
Created June 20, 2019 00:17
Gazebo collide without contact
<sdf version='1.4'>
<world name='default'>
<!-- include sun and ground plane -->
<include><uri>model://sun</uri></include>
<include><uri>model://ground_plane</uri></include>
<model name="sensor_box">
<static>true</static>
<link name="link">
<pose>0 0 0.251 0 0 0</pose>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tik0
tik0 / so_visit.sh
Created April 19, 2019 19:59
Periodic visit of StackOverflow website
#!/bin/bash
# Based on chromium, add the following 2 lines to `sudo crontab -e`
# 1 1 * * * rm /tmp/.org.chromium.Chromium.*
# 1 1 * * * rm -r /tmp/scoped_dir*
# Start a display (https://en.wikipedia.org/wiki/Xvfb)
export DISPLAY=:1
Xvfb :1 -screen 0 1024x768x16 &
PIDD=$!
# Get links
wget -O - https://www.stackoverflow.com | grep -oe "\"\/questions\/[[:digit:]]*\/[[:alnum:]-]*\"" | tr -d '"' | sed '1~2d' | sed "s#^#www\.stackoverflow.com#g" | head -n5 > so_questions.txt