23 #ifndef __PLUGINS_KATANA_CONTROLLER_OPENRAVE_H_ 24 #define __PLUGINS_KATANA_CONTROLLER_OPENRAVE_H_ 26 #include "controller.h" 28 #include <core/utils/refptr.h> 31 #include <plugins/openrave/types.h> 32 #include <openrave/openrave.h> 45 class OpenRaveConnector;
56 virtual void set_max_velocity(
unsigned int vel);
60 virtual bool joint_angles();
61 virtual bool joint_encoders();
64 virtual void calibrate();
66 virtual void turn_on();
67 virtual void turn_off();
68 virtual void read_coordinates(
bool refresh =
false);
69 virtual void read_motor_data();
70 virtual void read_sensor_data();
71 virtual void gripper_open(
bool blocking =
false);
72 virtual void gripper_close(
bool blocking =
false);
73 virtual void move_to(
float x,
float y,
float z,
float phi,
float theta,
float psi,
bool blocking =
false);
74 virtual void move_to(std::vector<int> encoders,
bool blocking =
false);
75 virtual void move_to(std::vector<float> angles,
bool blocking =
false);
76 virtual void move_motor_to(
unsigned short id,
int enc,
bool blocking =
false);
77 virtual void move_motor_to(
unsigned short id,
float angle,
bool blocking =
false);
78 virtual void move_motor_by(
unsigned short id,
int enc,
bool blocking =
false);
79 virtual void move_motor_by(
unsigned short id,
float angle,
bool blocking =
false);
86 virtual double theta();
88 virtual void get_sensors(std::vector<int>& to,
bool refresh =
false);
89 virtual void get_encoders(std::vector<int>& to,
bool refresh =
false);
90 virtual void get_angles(std::vector<float>& to,
bool refresh =
false);
94 double __phi, __theta, __psi;
100 OpenRAVE::EnvironmentBasePtr __env;
101 OpenRAVE::RobotBasePtr __robot;
102 OpenRAVE::RobotBase::ManipulatorPtr __manip;
106 std::vector<short> __active_motors;
108 void update_manipulator();
109 void wait_finished();
112 bool motor_oor(
unsigned short id);
113 #endif //HAVE_OPENRAVE Fawkes library namespace.
Abstract class for a Neuronics Katana controller.
Controller class for a Neuronics Katana, using libkni to interact with the real Katana arm...
Interface for a OpenRave connection creator.
RefPtr<> is a reference-counting shared smartpointer.