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
import org.opensim.modeling.*; | |
% Build a model. | |
model = Model(); | |
body = Body('body', 1.0, Vec3(0), Inertia(0)); | |
body.attachGeometry(Sphere(0.1)); | |
model.addBody(body); | |
joint = SliderJoint('joint', model.getGround(), body); | |
coord = joint.updCoordinate(); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#include <iostream> | |
using namespace std; | |
class AbstractConnector { | |
public: | |
virtual std::string getTypeName() const = 0; | |
}; | |
template <typename T> | |
class Connector : public AbstractConnector { |
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
#include <functional> | |
#include <iostream> | |
class State { | |
public: | |
int i = 5; | |
}; | |
class Foo { | |
public: |
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
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), |
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
------------------------------------------------------------------------------- | |
>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 |
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
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()); | |
} | |
} |
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
int main() { | |
InverseKinematics("c3d"); | |
} |
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
#include <iostream> | |
#include <vector> | |
template <int M> | |
class myvec { | |
public: | |
std::vector<double> v; | |
myvec(double iv) : v(M, iv) {} | |
}; |
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
# 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) |
NewerOlder