Fawkes API  Fawkes Development Version
fawkes::OpenRaveManipulator Class Referenceabstract

Class containing information about all manipulator motors. More...

#include <>>

Inheritance diagram for fawkes::OpenRaveManipulator:

Public Member Functions

 OpenRaveManipulator (unsigned int count, unsigned int count_device)
 Constructor. More...
 
virtual ~OpenRaveManipulator ()
 Destructor. More...
 
virtual OpenRaveManipulatorPtr copy ()=0
 Create a new copy of this OpenRaveManipulator instance. More...
 
void add_motor (unsigned int number, unsigned int number_device)
 Adds a motor to the list(vector) of motors. More...
 
template<typename T_from , typename T_to >
void angles_or_to_device (std::vector< T_from > &from, std::vector< T_to > &to) const
 Transform OpenRAVE motor angles to real device angles. More...
 
template<typename T >
void get_angles (std::vector< T > &to) const
 Get motor angles of OpenRAVE model. More...
 
template<typename T >
void get_angles_device (std::vector< T > &to) const
 Get motor angles of real device. More...
 
template<typename T >
void set_angles (std::vector< T > &angles)
 Set motor angles of OpenRAVE model. More...
 
template<typename T >
void set_angles_device (std::vector< T > &angles)
 Set motor angles of real device. More...
 

Protected Member Functions

virtual float angle_OR_to_device (unsigned int number, float angle) const =0
 Transform single OpenRAVE motor angle to real device angle. More...
 
virtual float angle_device_to_OR (unsigned int number, float angle) const =0
 Transform single device motor angle to OpenRAVE angle. More...
 

Protected Attributes

std::vector< motor_t__motors
 vector of motors More...
 
unsigned int __cnt
 number of motors on OpenRAVE model More...
 
unsigned int __cnt_device
 number of motors on real device More...
 

Detailed Description

Class containing information about all manipulator motors.

Author
Bahram Maleki-Fard

Definition at line 35 of file manipulator.h.

Constructor & Destructor Documentation

◆ OpenRaveManipulator()

fawkes::OpenRaveManipulator::OpenRaveManipulator ( unsigned int  count,
unsigned int  count_device 
)

Constructor.

Parameters
countnumber of motors of OpenRAVE model
count_devicenumber of motors of real device

Definition at line 41 of file manipulator.cpp.

◆ ~OpenRaveManipulator()

fawkes::OpenRaveManipulator::~OpenRaveManipulator ( )
virtual

Destructor.

Definition at line 48 of file manipulator.cpp.

Member Function Documentation

◆ add_motor()

void fawkes::OpenRaveManipulator::add_motor ( unsigned int  number,
unsigned int  number_device 
)

Adds a motor to the list(vector) of motors.

Parameters
numbermotor number in OpenRAVE
number_devicemotor number of real device

Definition at line 58 of file manipulator.cpp.

References __motors, fawkes::motor_t::angle, fawkes::motor_t::no, and fawkes::motor_t::no_device.

◆ angle_device_to_OR()

virtual float fawkes::OpenRaveManipulator::angle_device_to_OR ( unsigned int  number,
float  angle 
) const
protectedpure virtual

Transform single device motor angle to OpenRAVE angle.

Parameters
numbermotor number of real device
anglemotor angle of real device
Returns
transformed angle

Referenced by set_angles_device().

◆ angle_OR_to_device()

virtual float fawkes::OpenRaveManipulator::angle_OR_to_device ( unsigned int  number,
float  angle 
) const
protectedpure virtual

Transform single OpenRAVE motor angle to real device angle.

Parameters
numbermotor number of real device
anglemotor angle of OpenRAVE model
Returns
transformed angle

Referenced by angles_or_to_device().

◆ angles_or_to_device()

template<typename T_from , typename T_to >
void fawkes::OpenRaveManipulator::angles_or_to_device ( std::vector< T_from > &  from,
std::vector< T_to > &  to 
) const

Transform OpenRAVE motor angles to real device angles.

Parameters
frommotor angles of OpenRAVE model
tomotor angles of real device

Definition at line 110 of file manipulator.h.

References __cnt_device, __motors, and angle_OR_to_device().

Referenced by get_angles_device(), and fawkes::OpenRaveRobot::get_trajectory_device().

◆ copy()

◆ get_angles()

template<typename T >
void fawkes::OpenRaveManipulator::get_angles ( std::vector< T > &  to) const

◆ get_angles_device()

template<typename T >
void fawkes::OpenRaveManipulator::get_angles_device ( std::vector< T > &  to) const

Get motor angles of real device.

Parameters
totarget vector of angles

Definition at line 96 of file manipulator.h.

References angles_or_to_device(), and get_angles().

◆ set_angles()

template<typename T >
void fawkes::OpenRaveManipulator::set_angles ( std::vector< T > &  angles)

Set motor angles of OpenRAVE model.

Parameters
anglesmotor angles

Definition at line 126 of file manipulator.h.

References __motors.

Referenced by fawkes::OpenRaveRobot::release_all_objects(), fawkes::OpenRaveRobot::set_target_angles(), and fawkes::OpenRaveRobot::update_manipulator().

◆ set_angles_device()

template<typename T >
void fawkes::OpenRaveManipulator::set_angles_device ( std::vector< T > &  angles)

Set motor angles of real device.

Parameters
anglesmotor angles

Definition at line 141 of file manipulator.h.

References __motors, and angle_device_to_OR().

Referenced by JacoOpenraveThread::plot_first().

Member Data Documentation

◆ __cnt

unsigned int fawkes::OpenRaveManipulator::__cnt
protected

number of motors on OpenRAVE model

Definition at line 72 of file manipulator.h.

Referenced by get_angles().

◆ __cnt_device

unsigned int fawkes::OpenRaveManipulator::__cnt_device
protected

number of motors on real device

Definition at line 73 of file manipulator.h.

Referenced by angles_or_to_device().

◆ __motors

std::vector<motor_t> fawkes::OpenRaveManipulator::__motors
protected

vector of motors

Definition at line 71 of file manipulator.h.

Referenced by add_motor(), angles_or_to_device(), get_angles(), set_angles(), and set_angles_device().


The documentation for this class was generated from the following files: