This file contains 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 | |
# controllers: trot_ros, static_walk_ros, freeze, free_gait_impedence_ros | |
# trot_ros: WalkingTrot, Stand | |
# static_walk: walk, stand | |
import sys | |
import time | |
import rospy | |
from rocoma_msgs.srv import SwitchController as rocomaSwitchController | |
from anymal_msgs.srv import SwitchController as anymalSwitchController | |
from joy_manager_msgs.msg import AnyJoy |
This file contains 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
import tensorflow as tf | |
import numpy as np | |
import os | |
import gym | |
import time | |
import sklearn | |
import itertools | |
import sklearn.pipeline | |
import sklearn.preprocessing | |
from sklearn.kernel_approximation import RBFSampler |
This file contains 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
import tensorflow as tf | |
import numpy as np | |
import os | |
import gym | |
import time | |
import sklearn | |
import itertools | |
import sklearn.pipeline | |
import sklearn.preprocessing | |
from sklearn.kernel_approximation import RBFSampler |
This file contains 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 | |
#Make sure we’re running with root permissions. | |
if [ `whoami` != root ]; then | |
echo Please run this script using sudo | |
echo Just type “sudo !!” | |
exit | |
fi | |
#Check for 64-bit arch | |
if [uname -m != x86_64]; then |
This file contains 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
std::string getCmdOption(int argc, char* argv[], const std::string& option) | |
{ | |
std::string cmd; | |
for( int i = 0; i < argc; ++i) | |
{ | |
std::string arg = argv[i]; | |
if(0 == arg.find(option)) | |
{ | |
std::size_t found = arg.find_first_of(option); | |
cmd =arg.substr(found + 1); |
This file contains 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
# Script to render a sequence of ply files with Blender. First, setup your scene | |
# and material for the imported meshes. Scene must be in "OBJECT"-mode. | |
# Fill in variables in options. | |
# References. | |
# See: http://blender.stackexchange.com/questions/24133/modify-obj-after-import-using-python | |
# and: http://blenderartists.org/forum/showthread.php?320309-How-to-import-ply-files-from-script | |
import bpy | |
# Options. | |
meshFolder = "" # Folder without ending "\\". |
This file contains 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
import ipdb | |
import numpy as np | |
import numpy.linalg as nl | |
import matplotlib.pyplot as plt | |
from scipy.spatial.distance import pdist, cdist, squareform | |
def makeT(cp): | |
# cp: [K x 2] control points | |
# T: [(K+3) x (K+3)] | |
K = cp.shape[0] |