64 const std::string& type ) :
65 Model( world, parent, type ),
72 control_mode( CONTROL_VELOCITY ),
73 actuator_type( TYPE_LINEAR ),
99 const std::string& type_str =
102 if( type_str ==
"linear" )
104 else if ( type_str ==
"rotational" )
108 PRINT_ERR1(
"invalid actuator type specified: \"%s\" - should be one of: \"linear\" or \"rotational\". Using \"linear\" as default.", type_str.c_str() );
123 PRINT_ERR(
"zero length vector specified for actuator axis, using (1,0,0) instead" );
163 double cosa = cos(DesiredPose.
a);
164 double sina = sin(DesiredPose.
a);
269 outvel.
x =
axis.
x * velocity;
270 outvel.
y =
axis.
y * velocity;
271 outvel.
z =
axis.
z * velocity;
276 outvel.
x = outvel.
y = outvel.
z = 0;
286 PRINT_DEBUG4(
" Set Velocity: [ %.4f %.4f %.4f %.4f ]\n",
287 outvel.
x, outvel.
y, outvel.
z, outvel.
a );
int subs
the number of subscriptions to this model
The Stage library uses its own namespace.
void SetPose(const Pose &pose)
static const double WATTS_KGMS
ActuatorType actuator_type
const std::string ReadString(int entity, const char *name, const std::string &value)
int ReadTuple(const int entity, const char *name, const unsigned int first, const unsigned int num, const char *format,...)
#define PRINT_DEBUG2(m, a, b)
meters_t z
location in 3 axes
void SetSpeed(double speed)
bool PropertyExists(int section, const char *token)
void SetBlobReturn(bool val)
#define PRINT_DEBUG1(m, a)
double ReadFloat(int entity, const char *name, double value)
void SetWatts(watts_t watts)
#define PRINT_DEBUG4(m, a, b, c, d)
ModelActuator(World *world, Model *parent, const std::string &type)
radians_t a
rotation about the z axis.
static const double WATTS_BASE