Fawkes API
Fawkes Development Version
|
Class containing information about all manipulator motors. More...
#include <>>
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... | |
Class containing information about all manipulator motors.
Definition at line 35 of file manipulator.h.
fawkes::OpenRaveManipulator::OpenRaveManipulator | ( | unsigned int | count, |
unsigned int | count_device | ||
) |
Constructor.
count | number of motors of OpenRAVE model |
count_device | number of motors of real device |
Definition at line 41 of file manipulator.cpp.
|
virtual |
Destructor.
Definition at line 48 of file manipulator.cpp.
void fawkes::OpenRaveManipulator::add_motor | ( | unsigned int | number, |
unsigned int | number_device | ||
) |
Adds a motor to the list(vector) of motors.
number | motor number in OpenRAVE |
number_device | motor 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.
|
protectedpure virtual |
Transform single device motor angle to OpenRAVE angle.
number | motor number of real device |
angle | motor angle of real device |
Referenced by set_angles_device().
|
protectedpure virtual |
Transform single OpenRAVE motor angle to real device angle.
number | motor number of real device |
angle | motor angle of OpenRAVE model |
Referenced by angles_or_to_device().
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.
from | motor angles of OpenRAVE model |
to | motor 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().
|
pure virtual |
Create a new copy of this OpenRaveManipulator instance.
Implemented in fawkes::OpenRaveManipulatorKatana6M180, fawkes::OpenRaveManipulatorKinovaJaco, and fawkes::OpenRaveManipulatorNeuronicsKatana.
Referenced by fawkes::OpenRaveRobot::OpenRaveRobot(), JacoOpenraveThread::plot_first(), and fawkes::OpenRaveRobot::set_manipulator().
void fawkes::OpenRaveManipulator::get_angles | ( | std::vector< T > & | to | ) | const |
Get motor angles of OpenRAVE model.
to | target tvector of angles |
Definition at line 83 of file manipulator.h.
References __cnt, and __motors.
Referenced by fawkes::OpenRaveRobot::calibrate(), get_angles_device(), fawkes::OpenRaveRobot::get_planner_params(), JacoOpenraveThread::plot_first(), fawkes::OpenRaveEnvironment::run_planner(), and fawkes::OpenRaveRobot::update_model().
void fawkes::OpenRaveManipulator::get_angles_device | ( | std::vector< T > & | to | ) | const |
Get motor angles of real device.
to | target vector of angles |
Definition at line 96 of file manipulator.h.
References angles_or_to_device(), and get_angles().
void fawkes::OpenRaveManipulator::set_angles | ( | std::vector< T > & | angles | ) |
Set motor angles of OpenRAVE model.
angles | motor 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().
void fawkes::OpenRaveManipulator::set_angles_device | ( | std::vector< T > & | angles | ) |
Set motor angles of real device.
angles | motor angles |
Definition at line 141 of file manipulator.h.
References __motors, and angle_device_to_OR().
Referenced by JacoOpenraveThread::plot_first().
|
protected |
number of motors on OpenRAVE model
Definition at line 72 of file manipulator.h.
Referenced by get_angles().
|
protected |
number of motors on real device
Definition at line 73 of file manipulator.h.
Referenced by angles_or_to_device().
|
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().