20 #ifndef _RIGID_BODY_GROUP_OBSERVER_H__
21 #define _RIGID_BODY_GROUP_OBSERVER_H__
22 #include "mbsim/observers/observer.h"
24 #include <mbsim/utils/boost_parameters.h>
25 #include <mbsim/utils/openmbv_utils.h>
37 std::vector<RigidBody*> body;
39 std::shared_ptr<OpenMBV::Arrow> openMBVPosition, openMBVVelocity, openMBVAcceleration, openMBVAngularVelocity, openMBVAngularAcceleration, openMBVWeight, openMBVMomentum, openMBVAngularMomentum, openMBVDerivativeOfMomentum, openMBVDerivativeOfAngularMomentum;
43 void addBody(
RigidBody *body_) { body.push_back(body_); }
44 void setFrameOfReference(
Frame* frame) { ref = frame; }
49 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVWeight, tag, (optional (scaleLength,(
double),1)(scaleSize,(
double),1)(referencePoint,(OpenMBV::Arrow::ReferencePoint),OpenMBV::Arrow::fromPoint)(diffuseColor,(
const fmatvec::Vec3&),
"[-1;1;1]")(transparency,(
double),0))) {
50 OpenMBVArrow ombv(diffuseColor,transparency,OpenMBV::Arrow::toHead,referencePoint,scaleLength,scaleSize);
51 openMBVWeight=ombv.createOpenMBV();
54 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVMomentum, tag, (optional (scaleLength,(
double),1)(scaleSize,(
double),1)(referencePoint,(OpenMBV::Arrow::ReferencePoint),OpenMBV::Arrow::fromPoint)(diffuseColor,(
const fmatvec::Vec3&),
"[-1;1;1]")(transparency,(
double),0))) {
55 OpenMBVArrow ombv(diffuseColor,transparency,OpenMBV::Arrow::toHead,referencePoint,scaleLength,scaleSize);
56 openMBVMomentum=ombv.createOpenMBV();
59 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVAngularMomentum, tag, (optional (scaleLength,(
double),1)(scaleSize,(
double),1)(referencePoint,(OpenMBV::Arrow::ReferencePoint),OpenMBV::Arrow::fromPoint)(diffuseColor,(
const fmatvec::Vec3&),
"[-1;1;1]")(transparency,(
double),0))) {
60 OpenMBVArrow ombv(diffuseColor,transparency,OpenMBV::Arrow::toDoubleHead,referencePoint,scaleLength,scaleSize);
61 openMBVAngularMomentum=ombv.createOpenMBV();
64 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVDerivativeOfMomentum, tag, (optional (scaleLength,(
double),1)(scaleSize,(
double),1)(referencePoint,(OpenMBV::Arrow::ReferencePoint),OpenMBV::Arrow::fromPoint)(diffuseColor,(
const fmatvec::Vec3&),
"[-1;1;1]")(transparency,(
double),0))) {
65 OpenMBVArrow ombv(diffuseColor,transparency,OpenMBV::Arrow::toHead,referencePoint,scaleLength,scaleSize);
66 openMBVDerivativeOfMomentum=ombv.createOpenMBV();
69 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVDerivativeOfAngularMomentum, tag, (optional (scaleLength,(
double),1)(scaleSize,(
double),1)(referencePoint,(OpenMBV::Arrow::ReferencePoint),OpenMBV::Arrow::fromPoint)(diffuseColor,(
const fmatvec::Vec3&),
"[-1;1;1]")(transparency,(
double),0))) {
70 OpenMBVArrow ombv(diffuseColor,transparency,OpenMBV::Arrow::toDoubleHead,referencePoint,scaleLength,scaleSize);
71 openMBVDerivativeOfAngularMomentum=ombv.createOpenMBV();
virtual void plot()
plots time dependent data
Definition: rigid_body_group_observer.cc:91
void init(InitStage stage)
plots time series header
Definition: rigid_body_group_observer.cc:37
Definition: openmbv_utils.h:54
Definition: rigid_body_group_observer.h:35
InitStage
The stages of the initialization.
Definition: element.h:97
std::string name
name of element
Definition: element.h:298
cartesian frame on bodies used for application of e.g. links and loads
Definition: frame.h:37
Definition: observer.h:26
rigid bodies with arbitrary kinematics
Definition: rigid_body.h:52