42 #include <selforg/configurable.h>
83 const SchlangeConf&
conf,
const std::string& name,
const std::string& revision);
165 virtual void setTexture(
const std::string& filename);
virtual void setMotorsIntern(const double *motors, int motornumber)=0
Reads the actual motor commands from an array, an sets all motors of the snake to this values...
double jointLimit
maximal angle for the joints (M_PI/4 = 45 degree)
Definition: schlange.h:56
virtual ~Schlange()
Definition: schlange.cpp:42
double segmMass
mass of one snake element
Definition: schlange.h:51
Data structure for accessing the ODE.
Definition: odehandle.h:44
bool created
Definition: schlange.h:76
virtual void destroy()
destroys vehicle and space
Definition: schlange.cpp:200
Matrixd Matrix
Definition: osgforwarddecl.h:47
charArray paramkey
Definition: avrtypes.h:36
virtual int getSegmentsPosition(std::vector< Position > &poslist)
returns a vector with the positions of all segments of the robot
Definition: schlange.cpp:63
virtual void setHeadTexture(const std::string &filename)
sets a texture to the head of the snake
Definition: schlange.cpp:184
Schlange(const OdeHandle &odeHandle, const OsgHandle &osgHandle, const SchlangeConf &conf, const std::string &name, const std::string &revision)
Definition: schlange.cpp:32
Definition: schlange.h:46
Data structure for accessing the OpenSceneGraph.
Definition: osghandle.h:79
virtual void setHeadColor(const Color &color)
sets the color of the head element
Definition: schlange.cpp:190
virtual int getSensorNumberIntern()=0
returns number of sensors
This is a class, which models a snake like robot.
Definition: schlange.h:72
std::string headColor
Definition: schlange.h:62
int segmNumber
number of snake elements
Definition: schlange.h:48
double velocity
maximal velocity of servos
Definition: schlange.h:58
virtual std::vector< Primitive * > getAllPrimitives() const
returns a list of all primitives of the robot (used to store and restore the robot) ...
Definition: schlange.h:159
virtual void placeIntern(const osg::Matrix &pose)
sets the pose of the vehicle
Definition: schlange.cpp:48
virtual void setTexture(const std::string &filename)
sets a texture to the body of the snake note: the head texture of the snake is set by this method too...
Definition: schlange.cpp:174
Interface class for primitives represented in the physical and graphical world.
Definition: primitive.h:80
double sensorFactor
scale for sensors
Definition: schlange.h:53
virtual void notifyOnChange(const paramkey &key)
Is called when a parameter was changes via setParam().
Definition: schlange.cpp:72
std::list< SensorAttachment > sensors
Definition: oderobot.h:269
std::vector< OdeHandle > spaces
Definition: schlange.h:178
double motorPower
power of the motors / servos
Definition: schlange.h:52
std::string bodyColor
Definition: schlange.h:63
virtual Primitive * createSegment(int index, const OdeHandle &odeHandle)
creates and initialised the segment with the given index
Definition: schlange.cpp:160
virtual int getMotorNumberIntern()=0
returns number of motors
OsgHandle osgHandle
Definition: oderobot.h:278
OdeHandle odeHandle
Definition: oderobot.h:277
double segmLength
length of one snake element
Definition: schlange.h:49
std::vector< AngularMotor * > frictionmotors
Definition: schlange.h:78
bool useServoVel
if true the new Servos are used (only for schlangeservo)
Definition: schlange.h:57
Abstract class for ODE robots.
Definition: oderobot.h:64
virtual int getSensorsIntern(double *sensors, int sensornumber)=0
Writes the sensor values to an array in the memory.
SchlangeConf conf
Definition: schlange.h:79
Primitives objects
list of objects (should be populated by subclasses)
Definition: oderobot.h:265
virtual Primitive * getMainPrimitive() const
the main object of the robot, which is used for position and speed tracking
Definition: schlange.h:151
double frictionJoint
friction within joint
Definition: schlange.h:54
virtual void create(const osg::Matrix &pose)
creates vehicle at desired pose
Definition: schlange.cpp:83
double frictionRatio
if != 1 then friction along the snake is the ratio fold
Definition: schlange.h:55
double segmDia
diameter of a snake element
Definition: schlange.h:50
bool useSpaces
if true the snake is divided into subspaces (performance)
Definition: schlange.h:60
static SchlangeConf getDefaultConf()
Definition: schlange.h:85
virtual void update()
update all primitives and joints
Definition: schlange.cpp:55
std::list< MotorAttachment > motors
Definition: oderobot.h:270