1 #ifndef INPUT_PROCESSOR_H 2 #define INPUT_PROCESSOR_H 5 #include "Planning/PlannerObjective.h" 6 #include <KrisLibrary/utils/AsyncIO.h> 7 #include <KrisLibrary/Timer.h> 20 virtual string Instructions()
const {
return ""; }
21 virtual void Activate(
bool enabled) {}
22 virtual bool HasUpdate() {
return true; }
23 virtual void Hover(
int mx,
int my) {}
24 virtual void Drag(
float dx,
float dy) {}
25 virtual void Spaceball(
const RigidTransform& T) {}
26 virtual void SetGlobalTime(Real time) { currentTime = time; }
27 virtual void SetPredictionTime(Real splitTime) {}
29 virtual void DrawGL() {}
32 Robot* GetRobot()
const;
33 void GetClickRay(
int mx,
int my, Ray3D& ray)
const;
36 Camera::Viewport* viewport;
47 virtual string Instructions()
const {
return "Click and drag to pose points on the robot"; }
48 virtual void Activate(
bool enabled);
49 virtual bool HasUpdate() {
return changed; }
50 virtual void Hover(
int mx,
int my);
51 virtual void Drag(
float dx,
float dy);
52 virtual void Spaceball(
const RigidTransform& T);
54 virtual void DrawGL();
59 Vector3 currentDestination;
61 RigidTransform currentDesiredTransform;
73 virtual void Activate(
bool enabled);
74 virtual bool HasUpdate() {
return true; }
75 virtual void Hover(
int mx,
int my);
76 virtual void Drag(
float mx,
float my);
77 virtual void SetPredictionTime(Real splitTime);
79 virtual void DrawGL();
81 Real currentInputTime;
85 Real weightDecay,speedDecay;
86 Real predictionOffset;
103 virtual void Activate(
bool enabled);
104 virtual bool HasUpdate();
107 AsyncReaderThread* reader;
122 virtual string Instructions() {
return "Reading objectives over socket..."; }
123 SocketReadWorker socketReader;
Reads an objective function from a socket.
Definition: InputProcessor.h:115
The main robot type used in RobotSim.
Definition: Robot.h:79
The main world class containing multiple robots, objects, and static geometries (terrains). Lights and other viewport information may also be stored here.
Definition: World.h:20
A base class for objective functionals in time/config/velocity space.
Definition: PlannerObjective.h:13
Reads an objective function from a reader thread.
Definition: InputProcessor.h:98