Skip to content

Instantly share code, notes, and snippets.

View traversaro's full-sized avatar
🐑

Silvio Traversaro traversaro

🐑
View GitHub Profile
@traversaro
traversaro / CoDyCo
Created May 28, 2013 09:52
CoDyCo project description
The aim of CoDyCo is to advance the current control and cognitive understanding about robust, goal- directed whole-body motion interaction with multiple contacts. CoDyCo will go beyond traditional approaches: (1) proposing methodologies for performing coordinated interaction tasks with complex systems; (2) combining planning and compliance to deal with predictable and unpredictable events and contacts; (3) validating theoretical advances in real-world interaction scenarios.
http://www.codyco.eu/
@traversaro
traversaro / PaperWishlist
Created May 30, 2013 15:16
Wishilist of papers I was not able to obtain (feel free to contact me if you can send them to me).
@article{huston1981multi,
title={Multi-body dynamics including the effects of flexibility and compliance},
author={Huston, Ronald L},
journal={Computers \& Structures},
volume={14},
number={5},
pages={443--451},
year={1981},
publisher={Elsevier}
}
@traversaro
traversaro / physconst.py
Last active December 18, 2015 08:09
Various Symbolic calculation for Physical Consistency
from sympy import *
from sympy.matrices import *
x1, y1, x2, y2, x3, y3, x4, y4 = symbols('x1 y1 x2 y2 x3 y3 x4 y4');
r1 = x1*x1+y1*y1;
r2 = x2*x2+y2*y2;
r3 = x3*x3+y3*y3;
r4 = x4*x4+y4*y4;
@traversaro
traversaro / 1d_physconst.m
Last active December 18, 2015 09:58
physically consistent dynamical parameters subspaces
N_PARTICLE = 4
N_SIMULATIONS = 100000
zeroth_moment = zeros(N_SIMULATIONS,1);
first_moment = zeros(N_SIMULATIONS,1);
second_moment = zeros(N_SIMULATIONS,1);
for i = 1:N_SIMULATIONS
m = 100*rand(N_PARTICLE,1);
x = 4*rand(N_PARTICLE,1)-2; %between -2 and 2 to have both
@traversaro
traversaro / icub_right_arm_inertial_estimation.m
Last active December 18, 2015 12:19
Comparison of estimate of inertial parameters on iCub arm
#load pls and pca result
b = load("testb.csv");
n_samples = size(b,1)/6;
bm = reshape(b',6,n_samples)';
b_pca = load("hatb_opt_pca_val.csv");
n_samples = size(b_pca,1)/6;
#!/usr/bin/python
"""Script for facilitating the use of dataDumper with multiple ports
In case of dumping n ports simultaniously, this scripts creates n istances of
dataDumper, and connects them to the port do dump. The it can be closed
withc Ctrl+C and it closes cleanly all instances of dataDumper.
"""
import sys
@traversaro
traversaro / gist:6880561
Last active December 24, 2015 23:29
Generate glue code between KDL::CoDyCo/dirl and SYMORO
par_string = {0:'M', 1 : 'MX', 2 : 'MY', 3 : 'MZ', 4 : 'XX', 5: 'XY', 6: 'XZ', 7: 'YY', 8: 'YZ', 9: 'ZZ'};
for row in range(0,6):
for col in range(10,70):
link = col%10;
if( link < row+1 ):
print "double DG"+str(row+1)+par_string[col%10]+str(col/10) + " = 0;" ;
@traversaro
traversaro / gist:7133390
Last active December 26, 2015 09:59
Numerical sparse basis for base bla bla bla
Z_B_2 = [0,0,1,0;0,0,0,1];
X_B_2 = Z_B_2';
P_B_2 = X_B_2*Z_B_2;
Z_B_1 = [1,0,0,0;0,1,0,0];
X_B_1 = Z_B_1';
P_B_1 = X_B_1*Z_B_1;
Z_I = [1,0,0,0;0,0,1,0;0,sqrt(2)/2,0,sqrt(2)/2];
X_I = Z_I';
@traversaro
traversaro / coman_gazebo.ini
Last active December 26, 2015 14:19
Coman Gazebo configuration file
#this data is used to inizialize the fake controlBoard device in gazebo
#the JointNames parameter list provide a mapping between the joints in
#the controlBoard and the joints in Gazebo
[GENERAL]
Joints 23 // the number of joints of the robot part
[GAZEBO]
device controlboard
subdevice coman
name /coman/test
@traversaro
traversaro / extract_urdf_meshes_from_collada.py
Last active December 28, 2015 09:29
Script for extracting meshes from arboris-python collada files
import bpy
#unselect everything
# <insert code here, this can vary depending on your situation>
bpy.ops.object.select_all()
# gather list of items of interest.
candidate_list = [item.name for item in bpy.data.objects if (item.name == "l_hand_mesh" or item.name == "l_hand")]
# select them only.