20#ifndef _INVERSE_KINEMATICS_CONSTRAINT_OBSERVER_H__
21#define _INVERSE_KINEMATICS_CONSTRAINT_OBSERVER_H__
23#include "mbsim/observers/observer.h"
25#include <mbsim/utils/boost_parameters.h>
26#include <mbsim/utils/openmbv_utils.h>
30 class InverseKinematicsConstraint;
35 std::string saved_constraint;
36 std::shared_ptr<OpenMBVArrow> ombv;
37 std::vector<std::shared_ptr<OpenMBV::Arrow>> openMBVForce, openMBVMoment;
42 double evalNone(
int i) {
return 1; }
43 double evalAbsoluteForce(
int i);
44 double evalAbsoluteMoment(
int i);
49 void setOutputFrame(
Frame *outputFrame_) { outputFrame = outputFrame_; }
51 void init(
InitStage stage,
const InitConfigSet &config)
override;
53 void initializeUsingXML(xercesc::DOMElement *element)
override;
55 BOOST_PARAMETER_MEMBER_FUNCTION( (
void), enableOpenMBV, tag, (optional (scaleLength,(
double),1)(scaleSize,(
double),1)(referencePoint,(OpenMBVArrow::ReferencePoint),OpenMBVArrow::toPoint)(colorRepresentation,(OpenMBVArrow::ColorRepresentation),OpenMBVArrow::none)(minimalColorValue,(
double),0)(maximalColorValue,(
double),1)(diffuseColor,(
const fmatvec::Vec3&),fmatvec::Vec3(std::vector<double>{-1,1,1}))(transparency,(
double),0)(pointSize,(
double),0)(lineWidth,(
double),0))) {
56 ombv = std::shared_ptr<OpenMBVArrow>(
new OpenMBVArrow(scaleLength,scaleSize,OpenMBVArrow::toHead,referencePoint,colorRepresentation,minimalColorValue,maximalColorValue,diffuseColor,transparency,pointSize,lineWidth));
59 Frame *outputFrame {
nullptr };
60 std::string saved_outputFrame;
InitStage
The stages of the initialization.
Definition: element.h:62
std::string name
name of element
Definition: element.h:260
cartesian frame on bodies used for application of e.g. links and loads
Definition: frame.h:39
Definition: inverse_kinematics_constraint_observer.h:32
void plot() override
plots time dependent data
Definition: inverse_kinematics_constraint_observer.cc:95
void init(InitStage stage, const InitConfigSet &config) override
plots time series header
Definition: inverse_kinematics_constraint_observer.cc:45
Inverse kinematics contraint.
Definition: inverse_kinematics_constraint.h:36
Definition: observer.h:26
Definition: openmbv_utils.h:79
namespace MBSim
Definition: bilateral_constraint.cc:30