NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgUnidirComprSprActuator::Config Struct Reference

#include <tgUnidirComprSprActuator.h>

Inheritance diagram for tgUnidirComprSprActuator::Config:
Collaboration diagram for tgUnidirComprSprActuator::Config:

Public Member Functions

 Config (bool iFEA=false, double s=1000.0, double d=10.0, double rL=0.0, bool moveCPA=true, bool moveCPB=true, btVector3 *dir=(new btVector3(0, 1, 0)))
 

Public Attributes

btVector3 * direction
 
bool isFreeEndAttached
 
double stiffness
 
double damping
 
double restLength
 
bool moveCablePointAToEdge
 
bool moveCablePointBToEdge
 

Detailed Description

The config struct. As of 2016-08-02, since this compression spring is unactuated, the config struct only needs a small number of the parameters in tgSpringCableActuator. Note that this is NOT re-declaring the config struct from tgCompressionSpringActuator. Instead, it is extending that struct, since structs can be inherited like classes in C++. It's extended here because of the inclusion of the 'dir' variable.

Definition at line 77 of file tgUnidirComprSprActuator.h.

Constructor & Destructor Documentation

tgUnidirComprSprActuator::Config::Config ( bool  iFEA = false,
double  s = 1000.0,
double  d = 10.0,
double  rL = 0.0,
bool  moveCPA = true,
bool  moveCPB = true,
btVector3 *  dir = (new btVector3(0, 1, 0)) 
)

Parameter defaults : Is this creating a memory leak by immediately copying the result of new btVector3 ?

Definition at line 50 of file tgUnidirComprSprActuator.cpp.

Member Data Documentation

double tgCompressionSpringActuator::Config::damping
inherited

Specifies the damping (b) term in the linear force equation. Units are mass / seconds Must be non-negative.

Definition at line 105 of file tgCompressionSpringActuator.h.

btVector3* tgUnidirComprSprActuator::Config::direction

List of the new parameters. See tgBulletCompressionSpringActuator for info about the others. All are passed in to tgBulletUnidirComprSpr. Direction vector along which the force from this spring acts. Should be checked in constructor: only allowed to be a unit vector along one of the three axes. NOTE: to have springs where the To node is in the negative direction with respect to the From node, this direction parameter should be negative.

Definition at line 109 of file tgUnidirComprSprActuator.h.

bool tgCompressionSpringActuator::Config::isFreeEndAttached
inherited

List of the parameters themselves. All are passed in to tgBulletCompressionSpring. Boolean flag for attached-ness of the free end of the spring. If no, the spring only provides compression force. If yes, the spring is "attached" to both anchors, and provides a tension force too when the distance between anchors is greater than rest length.

Definition at line 90 of file tgCompressionSpringActuator.h.

bool tgCompressionSpringActuator::Config::moveCablePointAToEdge
inherited

Control the automatic re-locating of cable anchor points.

When true, the default behavior, the specified attachment point of a cable is moved from the actual node location (for example, at the center of the circle at the end of a rod) to a location at the edge of the rigid body it's attached to (for example, on the edge of the circle at the end of a rod.)

If unsure, leave default, because when set to 'false', the cable will likely clip through the rod. Disabling automatic movement of anchor points is most useful for structures that need very particular cable placement. Here, cable attachment point "A" corresponds to the first of the two anchors of the spring-cable, or the "From" point in the tgcreator files. The "B" point corresponds to the second anchor location, or the "To" point in the tgcreator files.

These parameters are used in the createTgBulletSpringCable method inside the tgBasicActuatorInfo class.

Definition at line 135 of file tgCompressionSpringActuator.h.

double tgCompressionSpringActuator::Config::restLength
inherited

Rest length of the spring. At distances above this amount, no force will be applied. Must be non-negative.

Definition at line 112 of file tgCompressionSpringActuator.h.

double tgCompressionSpringActuator::Config::stiffness
inherited

Linear Hookean stiffness of the spring (k). Must be non-negative. Upper limit depends on the timestep - stiffer springs will require a lower timestep. Units are mass / seconds^2

Definition at line 98 of file tgCompressionSpringActuator.h.


The documentation for this struct was generated from the following files: