11 #ifndef REPLANNING_SIMULATOR_HPP
12 #define REPLANNING_SIMULATOR_HPP
14 #include "Replanner.hpp"
26 void setMultithreadGraphical(
bool enable);
33 int executeSimpleSimulation(
int (*fct)(p3d_rob* robot, p3d_localpath* localpathPt) );
34 int executeSoftmotionSimulation(
int (*fct)(p3d_rob* robot, p3d_localpath* localpathPt) );
38 void setDrawStep(
double step) { drawStep = step; }
39 void resetTrajectoriesToDraw() { currentLine.clear(); deviateLine.clear(); lastLine.clear(); }
44 void init(std::string robotName);
45 bool initFindRobotBasename( std::string& robotBaseName );
46 void initDeactivateAllCntrts( p3d_rob* rob );
47 bool initRobotSimulatedCntrtsAndCollisions();
49 void optimizeCurrentTraj();
52 void storeShortcut(
const API::Trajectory& traj,
double lPrev,
double lNext);
53 void storeHumanPosition();
56 bool timeSwitchAndId(
double s,
double s_rep,
int& id_switch,
API::Trajectory& traj,
double &s_switch);
67 Robot* robotSimulated;
75 bool isWritingDisplay;
76 bool isReadingDisplay;
81 std::vector< std::vector<double> > currentLine;
82 std::vector< std::vector<double> > lastLine;
83 std::vector< std::vector<double> > deviateLine;
87 extern Graph* globalRePlanningGraph;
90 extern SM_TRAJ globalManipPlannerLastTraj;
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
double timeSinceLastCall(bool &is_first_call, double &t_init)
first call stores the time of day in t_init the next calls will returns the substraction between timo...
Definition: ReplanningSimulator.cpp:616
void storeGraphToDraw(const Graph &graph)
Stores the graph to a local graph.
Definition: ReplanningSimulator.cpp:365
void storeTrajectoryToVect(API::Trajectory &traj, double step)
Stores the trajectory in a vector.
Definition: ReplanningSimulator.cpp:267
ReplanningSimulator()
Definition: ReplanningSimulator.cpp:55
Definition: trajectory.hpp:40
void draw()
Draws replanning features.
Definition: ReplanningSimulator.cpp:499
Base replanner.
Definition: Replanner.hpp:33
void storeTrajectoryToDraw(const API::Trajectory &traj, double step)
Stores the trajectory to a current trajectory.
Definition: ReplanningSimulator.cpp:308
Class for implementing a replanning simulator.
Definition: ReplanningSimulator.hpp:18
void storeExploration(const API::Trajectory &traj, double lPrev, double lNext, std::tr1::shared_ptr< Configuration > qNew)
Stores the trajectory to a current trajectory.
Definition: ReplanningSimulator.cpp:382