Overview
Here we explain how to create a view simulator client using a sample. ViewSimuratorRetrieve ViewSimurator. ViewSimulator_var viewSimulator; viewSimulator = checkCorbaServer <ViewSimulator, ViewSimulator_var> ("ViewSimulator", cxt); if (CORBA::is_nil(viewSimulator)) { std::cerr << "viewSimulator not found" << std::endl; return 1; } The model of a floor and a robot is registered into ViewSimurator. viewSimulator->registerCharacter(floor->name(), floor); viewSimulator->registerCharacter(body->name(), body); Update of a view simulatorWithin a simulation loop, a view simulator is updated. In this example, the data of a camera is acquired, it is thinned out and it is displaying on standard output. try { dynamicsSimulator -> getWorldState( state ); if((int)(time*500)%30==0){ viewSimulator->updateScene( state ); CameraSequence_var cameras; viewSimulator->getCameraSequence(cameras); for(int k=0; k Execution
In the case of Windows, please add (OpenHRP3)/bin to PATH. |