util/simulator/Simulator.h
Go to the documentation of this file.
1 #include <hrpCorba/OpenHRPCommon.hh>
2 #include <hrpModel/World.h>
4 #include <hrpUtil/TimeMeasure.h>
5 #include "hrpsys/util/Project.h"
6 #include "hrpsys/util/ThreadedObject.h"
7 #include "hrpsys/util/LogManager.h"
8 #include "hrpsys/util/ProjectUtil.h"
9 #include "SceneState.h"
10 
11 class BodyRTC;
12 class SDL_Thread;
13 
14 class Simulator : virtual public hrp::World<hrp::ConstraintForceSolver>,
15  public ThreadedObject
16 {
17 public:
19  void init(Project &prj, BodyFactory &factory);
20  bool oneStep();
21  void checkCollision(OpenHRP::CollisionSequence &collisions);
22  void checkCollision();
23  void realTime(bool flag) { adjustTime = flag; }
24  void setTotalTime(double time) { m_totalTime = time; }
25  double totalTime() { return m_totalTime; }
26  void setLogTimeStep(double time) { m_logTimeStep = time; }
27  void clear();
28  void appendLog();
29  void addCollisionCheckPair(BodyRTC *b1, BodyRTC *b2);
30  void kinematicsOnly(bool flag);
31 private:
33  std::vector<ClockReceiver> receivers;
34  std::vector<hrp::ColdetLinkPairPtr> pairs;
35  OpenHRP::CollisionSequence collisions;
40  std::deque<struct timeval> startTimes;
41  struct timeval beginTime;
42 };
struct timeval beginTime
Simulator(RTC::Manager *manager)
Constructor.
sample RT component which has one data input port and one data output port
TimeMeasure tm_dynamics
std::vector< ClockReceiver > receivers
void kinematicsOnly(bool flag)
OpenHRP::CollisionSequence collisions
void setLogTimeStep(double time)
void setTotalTime(double time)
std::vector< hrp::ColdetLinkPairPtr > pairs
void realTime(bool flag)
void addCollisionCheckPair(BodyRTC *b1, BodyRTC *b2)
TimeMeasure tm_collision
LogManager< SceneState > * log
std::deque< struct timeval > startTimes
png_infop png_uint_32 flag
boost::function2< hrp::BodyPtr, const std::string &, const ModelItem & > BodyFactory
Definition: ProjectUtil.h:9
TimeMeasure tm_control


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Thu May 6 2021 02:41:51