ThisSim Class Reference

Just create your own simulation, it's up to you. More...

Inherits lpzrobots::TaskedSimulation, and lpzrobots::Simulation.

Collaboration diagram for ThisSim:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void start (const OdeHandle &odeHandle, const OsgHandle &osgHandle, GlobalData &global)
 start() is called at the first start of the cycles and should create all the object (obstacles, agents...).
virtual bool command (const OdeHandle &, const OsgHandle &, GlobalData &globalData, int key, bool down)
 is called if a key was pressed.
virtual void bindingDescription (osg::ApplicationUsage &au) const
 this can be used to describe the key bindings used by command()
void start (const OdeHandle &odeHandle, const OsgHandle &osgHandle, GlobalData &global, SimulationTaskHandle &sTHandle, int taskId)
 starting function (executed once at the beginning of the simulation loop/first cycle) This function contains the additional parameters simTaskHandle and taskId, with these you have access to your global data.
virtual bool restart (const OdeHandle &odeHandle, const OsgHandle &osgHandle, GlobalData &global, SimulationTaskHandle &sTHandle, int taskId)
 restart() is called at the second and all following starts of the cylce The end of a cycle is determined by (simulation_time_reached==true)
virtual void addCallback (GlobalData &globalData, bool draw, bool pause, bool control)
 optional additional callback function which is called every simulation step.
virtual bool command (const OdeHandle &, const OsgHandle &, GlobalData &globalData, int key, bool down, SimulationTaskHandle &sTHandle, int taskI)
 is called if a key was pressed.

Public Attributes

AbstractControllercontroller
Sphererobot3Massessphere1
OdeRobotvehicle
OdeAgentagent

Detailed Description

Just create your own simulation, it's up to you.

It's essential that your simulation is deduced from TaskedSimulation instead of Simulation. With this little change you have access to the taskId and the global simTaskHandle.

Examples:

template_sphererobot/main.cpp.


Member Function Documentation

virtual void addCallback ( GlobalData globalData,
bool  draw,
bool  pause,
bool  control 
) [inline, virtual]

optional additional callback function which is called every simulation step.

Called between physical simulation step and drawing.

Parameters:
draw indicates that objects are drawn in this timestep
pause always false (only called of simulation is running)
control indicates that robots have been controlled this timestep

Reimplemented from Simulation.

virtual void bindingDescription ( osg::ApplicationUsage &  au  )  const [inline, virtual]

this can be used to describe the key bindings used by command()

Reimplemented from Simulation.

Examples:
template_sphererobot/main.cpp.
virtual bool command ( const OdeHandle ,
const OsgHandle ,
GlobalData globalData,
int  key,
bool  down,
SimulationTaskHandle ,
int  taskId 
) [inline, virtual]

is called if a key was pressed.

For keycodes see: osgGA::GUIEventAdapter

Returns:
true if the key was handled

Reimplemented from TaskedSimulation.

virtual bool command ( const OdeHandle ,
const OsgHandle ,
GlobalData globalData,
int  key,
bool  down 
) [inline, virtual]

is called if a key was pressed.

For keycodes see: osgGA::GUIEventAdapter

Returns:
true if the key was handled

Reimplemented from Simulation.

Examples:
template_sphererobot/main.cpp.
virtual bool restart ( const OdeHandle odeHandle,
const OsgHandle osgHandle,
GlobalData global,
SimulationTaskHandle sTHandle,
int  taskId 
) [inline, virtual]

restart() is called at the second and all following starts of the cylce The end of a cycle is determined by (simulation_time_reached==true)

Parameters:
the odeHandle
the osgHandle
globalData 
Returns:
if the simulation should be restarted; this is false by default

Reimplemented from TaskedSimulation.

void start ( const OdeHandle odeHandle,
const OsgHandle osgHandle,
GlobalData global,
SimulationTaskHandle sTHandle,
int  taskId 
) [inline, virtual]

starting function (executed once at the beginning of the simulation loop/first cycle) This function contains the additional parameters simTaskHandle and taskId, with these you have access to your global data.

Reimplemented from TaskedSimulation.

void start ( const OdeHandle ,
const OsgHandle ,
GlobalData globalData 
) [inline, virtual]

start() is called at the first start of the cycles and should create all the object (obstacles, agents...).

Implements Simulation.

Examples:
template_sphererobot/main.cpp.

Member Data Documentation


The documentation for this class was generated from the following files:
Generated on Thu Jun 28 14:48:20 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3