20 #ifndef _KINEMATICS_OBSERVER_H__
21 #define _KINEMATICS_OBSERVER_H__
23 #include "mbsim/observers/observer.h"
25 #include <mbsim/utils/boost_parameters.h>
26 #include <mbsim/utils/openmbv_utils.h>
35 std::string saved_frame;
36 std::shared_ptr<OpenMBV::Group> openMBVPosGrp, openMBVVelGrp, openMBVAngVelGrp, openMBVAccGrp, openMBVAngAccGrp;
37 std::shared_ptr<OpenMBV::Arrow> openMBVPosition, openMBVVelocity, openMBVAngularVelocity, openMBVAcceleration, openMBVAngularAcceleration;
41 void setFrame(
Frame *frame_) { frame = frame_; }
44 virtual void initializeUsingXML(xercesc::DOMElement *element);
46 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVPosition, 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))) {
47 OpenMBVArrow ombv(diffuseColor,transparency,OpenMBV::Arrow::toHead,referencePoint,scaleLength,scaleSize);
48 openMBVPosition=ombv.createOpenMBV();
50 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVVelocity, 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))) {
51 OpenMBVArrow ombv(diffuseColor,transparency,OpenMBV::Arrow::toHead,referencePoint,scaleLength,scaleSize);
52 openMBVVelocity=ombv.createOpenMBV();
54 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVAngularVelocity, 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::toDoubleHead,referencePoint,scaleLength,scaleSize);
56 openMBVAngularVelocity=ombv.createOpenMBV();
58 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVAcceleration, 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))) {
59 OpenMBVArrow ombv(diffuseColor,transparency,OpenMBV::Arrow::toHead,referencePoint,scaleLength,scaleSize);
60 openMBVAcceleration=ombv.createOpenMBV();
62 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBVAngularAcceleration, 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))) {
63 OpenMBVArrow ombv(diffuseColor,transparency,OpenMBV::Arrow::toDoubleHead,referencePoint,scaleLength,scaleSize);
64 openMBVAngularAcceleration=ombv.createOpenMBV();
void init(InitStage stage)
plots time series header
Definition: kinematics_observer.cc:35
Definition: openmbv_utils.h:54
Definition: kinematics_observer.h:32
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
virtual void plot()
plots time dependent data
Definition: kinematics_observer.cc:99
Definition: observer.h:26