Skip to content

Instantly share code, notes, and snippets.

🖥

Christopher Dembia chrisdembia

🖥
Block or report user

Report or block chrisdembia

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View opensim-knee-reflex.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chrisdembia
chrisdembia / component_forward_declare_connector.cpp
Created Apr 22, 2016
component_forward_declare_connector.cpp
View component_forward_declare_connector.cpp
#include <iostream>
using namespace std;
class AbstractConnector {
public:
virtual std::string getTypeName() const = 0;
};
template <typename T>
class Connector : public AbstractConnector {
View mem_fn_sandbox.cpp
#include <functional>
#include <iostream>
class State {
public:
int i = 5;
};
class Foo {
public:
View deserialize-state-save-calculation.py
from opensim import *
model = Model('mymodel.osim')
states = StateTrajectory('mystates.osimstates')
comtraj = TimeSeriesTableVec3(states.size(), 2)
comtraj.setColumnLabels(['com_position', 'com_velocity'])
for state in states:
comtraj.appendRow(state.getTime(), [
model.getMassCenter(state),
model.getMassCenterVelocity(state),
@chrisdembia
chrisdembia / gist:84c032747e1bcac82c53
Created Jun 17, 2015
opensim33-x64-gait2392-scaling-exception-windows-10-64bit
View gist:84c032747e1bcac82c53
-------------------------------------------------------------------------------
>Log Session: Tuesday, June 16, 2015 8:50:42 PM PDT
>System Info:
Product Version = OpenSim 3.3
Operating System = Windows 8.1 version 6.3 running on amd64
Java; VM; Vendor = 1.7.0_80; Java HotSpot(TM) 64-Bit Server VM 24.80-b11; Oracle Corporation
Runtime = Java(TM) SE Runtime Environment 1.7.0_80-b15
Java Home = C:\OpenSim 3.3\jdk\jre
System Locale; Encoding = en_US (opensim); Cp1252
Home Directory = C:\Users\chris
View make-set.cpp
template<IN, OUT, OUTSET> static OUT generateSet(const IN& input) {
OUTSET output(input.getSize());
for (int i = 0; i < input.getSize(); ++i) {
output[i] = OUT();
output[i].setName(input[i].getName());
}
}
@chrisdembia
chrisdembia / c3d
Last active Aug 29, 2015
opensim-4.0-targets
View c3d
int main() {
InverseKinematics("c3d");
}
@chrisdembia
chrisdembia / main.cpp
Created Oct 10, 2014
Ajay: templatized in-class member initializers
View main.cpp
#include <iostream>
#include <vector>
template <int M>
class myvec {
public:
std::vector<double> v;
myvec(double iv) : v(M, iv) {}
};
View CMakeLists.txt
# Generic CMakeLists.txt for making a Simbody-using executable.
# This shows how to use the provided SimbodyConfig.cmake to locate a Simbody
# installation on your machine so you can use it from your own code.
# You will most likely want to copy some of these lines into your own
# CMakeLists.txt rather than use this one verbatim.
cmake_minimum_required(VERSION 2.8)
project(cloneptr)
# List your source and header files here.
set(my_source_files cloneptr.cpp)
@chrisdembia
chrisdembia / testInitState
Created Jul 17, 2014
opensim-core valgrind
View testInitState
<?xml version="1.0" encoding="UTF-8"?>
<Site BuildName="Linux-c++"
BuildStamp="20140717-2140-Experimental"
Name="FITZE-M92p"
Generator="ctest-2.8.11.2"
CompilerName="/usr/bin/c++"
OSName="Linux"
Hostname="FITZE-M92p"
OSRelease="3.11.0-23-generic"
OSVersion="#40-Ubuntu SMP Wed Jun 4 21:05:23 UTC 2014"
You can’t perform that action at this time.