1 #include <boost/bind.hpp> 2 #include <boost/function.hpp> 4 #include <hrpModel/World.h> 6 #include <hrpModel/ModelLoaderUtil.h> 7 #include <hrpUtil/TimeMeasure.h> 15 std::vector<BodyRTCPtr> *bodies,
18 std::cout <<
"createBody(" << name <<
"," << url <<
")" << std::endl;
20 std::string args =
"BodyRTC?instance_name="+name;
25 std::cerr <<
"failed to load model[" << url <<
"]" << std::endl;
29 body->createDataPorts();
30 bodies->push_back(body);
42 std::cout <<
"number of receivers:" <<
receivers.size() << std::endl;
50 for (
unsigned int i=0;
i<
bodies.size();
i++){
54 for (
unsigned int i=0;
i<
bodies.size();
i++){
74 <<
"[ms/frame]" << std::endl;
77 <<
"[ms/frame]" << std::endl;
RTObject_impl * createComponent(const char *comp_args)
void deleteComponent(RTObject_impl *comp)
double timeStep(void) const
boost::intrusive_ptr< BodyRTC > BodyRTCPtr
sample RT component which has one data input port and one data output port
CosNaming::NamingContext_ptr getRootContext()
std::vector< CollisionInfo > collisions
OpenHRP::WorldState state
hrp::World< hrp::ConstraintForceSolver > world
static Manager & instance()
std::vector< ClockReceiver > receivers
boost::shared_ptr< Body > BodyPtr
void getWorldState(WorldState &state, WorldBase &world)
void initWorldState(WorldState &state, WorldBase &world)
int loadBodyFromModelLoader(::World *world, const char *name, const char *url, CosNaming::NamingContext_var cxt)
double averageTime() const
virtual void calcNextState(OpenHRP::CollisionSequence &corbaCollisionSequence)
void initRTS(Project &prj, std::vector< ClockReceiver > &receivers)
TConstraintForceSolver constraintForceSolver
hrp::BodyPtr createBody(const std::string &name, const std::string &url, std::vector< BodyRTCPtr > *bodies, RTC::CorbaNaming *naming)
void clearExternalForces()
void init(Project &prj, GLscene *i_scene, RTC::CorbaNaming &naming)
double currentTime(void) const
boost::function2< hrp::BodyPtr, const std::string &, const ModelItem & > BodyFactory
std::vector< BodyRTCPtr > bodies
void initWorld(Project &prj, BodyFactory &factory, hrp::World< hrp::ConstraintForceSolver > &world, std::vector< hrp::ColdetLinkPairPtr > &pairs)