23 #ifndef __PLUGINS_OPENRAVE_MANIPULATOR_H_ 24 #define __PLUGINS_OPENRAVE_MANIPULATOR_H_ 46 void add_motor(
unsigned int number,
unsigned int number_device);
48 template <
typename T_from,
typename T_to>
void angles_or_to_device(std::vector<T_from>& from, std::vector<T_to>& to)
const;
49 template <
typename T>
void get_angles(std::vector<T>& to)
const;
52 template <
typename T>
void set_angles(std::vector<T>& angles);
86 for (
unsigned int i=0; i<
__motors.size(); i++) {
87 to[
__motors[i].no] = (T)__motors[i].angle;
98 std::vector<float> tmp;
108 template <
typename T_from,
typename T_to>
114 for (
unsigned int i=0; i<
__motors.size(); i++) {
124 template <
typename T>
128 if( angles.size() <
__motors.size() ) {
131 for (
unsigned int i=0; i<
__motors.size(); i++) {
139 template <
typename T>
143 if( angles.size() <
__motors.size() ) {
146 for (
unsigned int i=0; i<
__motors.size(); i++) {
void set_angles_device(std::vector< T > &angles)
Set motor angles of real device.
virtual OpenRaveManipulatorPtr copy()=0
Create a new copy of this OpenRaveManipulator instance.
Fawkes library namespace.
virtual float angle_device_to_OR(unsigned int number, float angle) const =0
Transform single device motor angle to OpenRAVE angle.
unsigned int __cnt_device
number of motors on real device
unsigned int __cnt
number of motors on OpenRAVE model
void set_angles(std::vector< T > &angles)
Set motor angles of OpenRAVE model.
OpenRaveManipulator(unsigned int count, unsigned int count_device)
Constructor.
Class containing information about all manipulator motors.
void get_angles_device(std::vector< T > &to) const
Get motor angles of real device.
void get_angles(std::vector< T > &to) const
Get motor angles of OpenRAVE model.
virtual float angle_OR_to_device(unsigned int number, float angle) const =0
Transform single OpenRAVE motor angle to real device angle.
void angles_or_to_device(std::vector< T_from > &from, std::vector< T_to > &to) const
Transform OpenRAVE motor angles to real device angles.
virtual ~OpenRaveManipulator()
Destructor.
void add_motor(unsigned int number, unsigned int number_device)
Adds a motor to the list(vector) of motors.
std::vector< motor_t > __motors
vector of motors