iCub-main
Public Member Functions | List of all members
OdeSdlSimulation Class Reference

Main simulation driver, using SDL and ODE. More...

#include <iCub_Sim.h>

+ Inheritance diagram for OdeSdlSimulation:

Public Member Functions

 OdeSdlSimulation ()
 Constructor. More...
 
void init (RobotStreamer *streamer, RobotConfig *config)
 Initialization. More...
 
 ~OdeSdlSimulation ()
 Destructor. More...
 
void drawView (bool left, bool right, bool wide)
 Render the requested view. More...
 
void clearBuffer ()
 Signal that we're done with a view. More...
 
void simLoop (int h, int w)
 Run the simulation. More...
 
bool checkSync (bool reset=false)
 
virtual bool getImage (yarp::sig::ImageOf< yarp::sig::PixelRgb > &target)
 
virtual bool getTrqData (Bottle data)
 
- Public Member Functions inherited from Simulation
virtual ~Simulation ()
 Destructor. More...
 
virtual bool getTrqData (yarp::os::Bottle data)=0
 

Detailed Description

Main simulation driver, using SDL and ODE.

Definition at line 67 of file iCub_Sim.h.

Constructor & Destructor Documentation

◆ OdeSdlSimulation()

OdeSdlSimulation::OdeSdlSimulation ( )

Constructor.

Be sure to also call init().

Definition at line 1400 of file iCub_Sim.cpp.

◆ ~OdeSdlSimulation()

OdeSdlSimulation::~OdeSdlSimulation ( )

Destructor.

Definition at line 1611 of file iCub_Sim.cpp.

Member Function Documentation

◆ checkSync()

bool OdeSdlSimulation::checkSync ( bool  reset = false)
virtual

Implements Simulation.

Definition at line 1616 of file iCub_Sim.cpp.

◆ clearBuffer()

void OdeSdlSimulation::clearBuffer ( )
virtual

Signal that we're done with a view.

Implements Simulation.

Definition at line 1396 of file iCub_Sim.cpp.

◆ drawView()

void OdeSdlSimulation::drawView ( bool  left,
bool  right,
bool  wide 
)
virtual

Render the requested view.

Implements Simulation.

Definition at line 1328 of file iCub_Sim.cpp.

◆ getImage()

bool OdeSdlSimulation::getImage ( yarp::sig::ImageOf< yarp::sig::PixelRgb > &  target)
virtual

Implements Simulation.

Definition at line 1636 of file iCub_Sim.cpp.

◆ getTrqData()

bool OdeSdlSimulation::getTrqData ( Bottle  data)
virtual

Definition at line 1625 of file iCub_Sim.cpp.

◆ init()

void OdeSdlSimulation::init ( RobotStreamer streamer,
RobotConfig config 
)
virtual

Initialization.

Passed a streamer object, which during simulation will be called back to transport vision, touch, and inertial information.

Implements Simulation.

Definition at line 1403 of file iCub_Sim.cpp.

◆ simLoop()

void OdeSdlSimulation::simLoop ( int  h,
int  w 
)
virtual

Run the simulation.

This will not return until the simulation is terminated. This method creates a window for the simulation, and will process keyboard and mouse events related to that window.

Implements Simulation.

Definition at line 1229 of file iCub_Sim.cpp.


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