Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
robotis_op::DirectControlModule Class Reference

#include <direct_control_module.h>

Inheritance diagram for robotis_op::DirectControlModule:
Inheritance graph
[legend]

Public Member Functions

 DirectControlModule ()
 
void initialize (const int control_cycle_msec, robotis_framework::Robot *robot)
 
bool isRunning ()
 
void onModuleDisable ()
 
void onModuleEnable ()
 
void process (std::map< std::string, robotis_framework::Dynamixel * > dxls, std::map< std::string, double > sensors)
 
void stop ()
 
virtual ~DirectControlModule ()
 
- Public Member Functions inherited from robotis_framework::MotionModule
ControlMode getControlMode ()
 
bool getModuleEnable ()
 
std::string getModuleName ()
 
void setModuleEnable (bool enable)
 
virtual ~MotionModule ()
 

Private Types

enum  TraIndex { Position = 0, Velocity = 1, Acceleration = 2, Count }
 

Private Member Functions

Eigen::MatrixXd calcMinimumJerkTraPVA (double pos_start, double vel_start, double accel_start, double pos_end, double vel_end, double accel_end, double smp_time, double mov_time)
 
bool checkSelfCollision ()
 
void finishMoving ()
 
bool getDiff (OP3KinematicsDynamics *kinematics, int end_index, int base_index, double &diff)
 
void jointTraGeneThread ()
 
void publishStatusMsg (unsigned int type, std::string msg)
 
void queueThread ()
 
void setJointCallback (const sensor_msgs::JointState::ConstPtr &msg)
 
void startMoving ()
 
void stopMoving ()
 

Private Attributes

const int BASE_INDEX
 
Eigen::MatrixXd calc_joint_accel_tra_
 
Eigen::MatrixXd calc_joint_tra_
 
Eigen::MatrixXd calc_joint_vel_tra_
 
bool check_collision_
 
std::map< std::string, bool > collision_
 
int control_cycle_msec_
 
const bool DEBUG
 
double default_moving_angle_
 
double default_moving_time_
 
Eigen::MatrixXd goal_acceleration_
 
Eigen::MatrixXd goal_position_
 
Eigen::MatrixXd goal_velocity_
 
const int HEAD_INDEX
 
bool is_blocked_
 
bool is_moving_
 
bool is_updated_
 
double l_min_diff_
 
std::string last_msg_
 
ros::Time last_msg_time_
 
const int LEFT_ELBOW_INDEX
 
const int LEFT_END_EFFECTOR_INDEX
 
std::map< int, double > max_angle_
 
std::map< int, double > min_angle_
 
double moving_time_
 
OP3KinematicsDynamicsop3_kinematics_
 
Eigen::MatrixXd present_position_
 
boost::thread queue_thread_
 
double r_min_diff_
 
const int RIGHT_ELBOW_INDEX
 
const int RIGHT_END_EFFECTOR_INDEX
 
ros::Publisher status_msg_pub_
 
bool stop_process_
 
Eigen::MatrixXd target_position_
 
int tra_count_
 
boost::thread * tra_gene_thread_
 
boost::mutex tra_lock_
 
int tra_size_
 
std::map< std::string, int > using_joint_name_
 
bool will_be_collision_
 

Additional Inherited Members

- Static Public Member Functions inherited from robotis_framework::Singleton< DirectControlModule >
static void destroyInstance ()
 
static T * getInstance ()
 
- Public Attributes inherited from robotis_framework::MotionModule
std::map< std::string, DynamixelState * > result_
 
- Protected Member Functions inherited from robotis_framework::Singleton< DirectControlModule >
Singletonoperator= (Singleton const &)
 
 Singleton (Singleton const &)
 
 Singleton ()
 
- Protected Attributes inherited from robotis_framework::MotionModule
ControlMode control_mode_
 
bool enable_
 
std::string module_name_
 

Detailed Description

Definition at line 40 of file direct_control_module.h.

Member Enumeration Documentation

Enumerator
Position 
Velocity 
Acceleration 
Count 

Definition at line 56 of file direct_control_module.h.

Constructor & Destructor Documentation

robotis_op::DirectControlModule::DirectControlModule ( )

Definition at line 25 of file direct_control_module.cpp.

robotis_op::DirectControlModule::~DirectControlModule ( )
virtual

Definition at line 54 of file direct_control_module.cpp.

Member Function Documentation

Eigen::MatrixXd robotis_op::DirectControlModule::calcMinimumJerkTraPVA ( double  pos_start,
double  vel_start,
double  accel_start,
double  pos_end,
double  vel_end,
double  accel_end,
double  smp_time,
double  mov_time 
)
private

Definition at line 403 of file direct_control_module.cpp.

bool robotis_op::DirectControlModule::checkSelfCollision ( )
private

Definition at line 451 of file direct_control_module.cpp.

void robotis_op::DirectControlModule::finishMoving ( )
private

Definition at line 360 of file direct_control_module.cpp.

bool robotis_op::DirectControlModule::getDiff ( OP3KinematicsDynamics kinematics,
int  end_index,
int  base_index,
double &  diff 
)
private

Definition at line 528 of file direct_control_module.cpp.

void robotis_op::DirectControlModule::initialize ( const int  control_cycle_msec,
robotis_framework::Robot robot 
)
virtual

Implements robotis_framework::MotionModule.

Definition at line 59 of file direct_control_module.cpp.

bool robotis_op::DirectControlModule::isRunning ( )
virtual

Implements robotis_framework::MotionModule.

Definition at line 335 of file direct_control_module.cpp.

void robotis_op::DirectControlModule::jointTraGeneThread ( )
private

Definition at line 547 of file direct_control_module.cpp.

void robotis_op::DirectControlModule::onModuleDisable ( )
virtual

Reimplemented from robotis_framework::MotionModule.

Definition at line 348 of file direct_control_module.cpp.

void robotis_op::DirectControlModule::onModuleEnable ( )
virtual

Reimplemented from robotis_framework::MotionModule.

Definition at line 340 of file direct_control_module.cpp.

void robotis_op::DirectControlModule::process ( std::map< std::string, robotis_framework::Dynamixel * >  dxls,
std::map< std::string, double >  sensors 
)
virtual

Implements robotis_framework::MotionModule.

Definition at line 228 of file direct_control_module.cpp.

void robotis_op::DirectControlModule::publishStatusMsg ( unsigned int  type,
std::string  msg 
)
private

Definition at line 597 of file direct_control_module.cpp.

void robotis_op::DirectControlModule::queueThread ( )
private

Definition at line 101 of file direct_control_module.cpp.

void robotis_op::DirectControlModule::setJointCallback ( const sensor_msgs::JointState::ConstPtr &  msg)
private

Definition at line 117 of file direct_control_module.cpp.

void robotis_op::DirectControlModule::startMoving ( )
private

Definition at line 353 of file direct_control_module.cpp.

void robotis_op::DirectControlModule::stop ( )
virtual

Implements robotis_framework::MotionModule.

Definition at line 323 of file direct_control_module.cpp.

void robotis_op::DirectControlModule::stopMoving ( )
private

Definition at line 375 of file direct_control_module.cpp.

Member Data Documentation

const int robotis_op::DirectControlModule::BASE_INDEX
private

Definition at line 64 of file direct_control_module.h.

Eigen::MatrixXd robotis_op::DirectControlModule::calc_joint_accel_tra_
private

Definition at line 117 of file direct_control_module.h.

Eigen::MatrixXd robotis_op::DirectControlModule::calc_joint_tra_
private

Definition at line 115 of file direct_control_module.h.

Eigen::MatrixXd robotis_op::DirectControlModule::calc_joint_vel_tra_
private

Definition at line 116 of file direct_control_module.h.

bool robotis_op::DirectControlModule::check_collision_
private

Definition at line 93 of file direct_control_module.h.

std::map<std::string, bool> robotis_op::DirectControlModule::collision_
private

Definition at line 86 of file direct_control_module.h.

int robotis_op::DirectControlModule::control_cycle_msec_
private

Definition at line 95 of file direct_control_module.h.

const bool robotis_op::DirectControlModule::DEBUG
private

Definition at line 100 of file direct_control_module.h.

double robotis_op::DirectControlModule::default_moving_angle_
private

Definition at line 92 of file direct_control_module.h.

double robotis_op::DirectControlModule::default_moving_time_
private

Definition at line 91 of file direct_control_module.h.

Eigen::MatrixXd robotis_op::DirectControlModule::goal_acceleration_
private

Definition at line 114 of file direct_control_module.h.

Eigen::MatrixXd robotis_op::DirectControlModule::goal_position_
private

Definition at line 112 of file direct_control_module.h.

Eigen::MatrixXd robotis_op::DirectControlModule::goal_velocity_
private

Definition at line 113 of file direct_control_module.h.

const int robotis_op::DirectControlModule::HEAD_INDEX
private

Definition at line 65 of file direct_control_module.h.

bool robotis_op::DirectControlModule::is_blocked_
private

Definition at line 104 of file direct_control_module.h.

bool robotis_op::DirectControlModule::is_moving_
private

Definition at line 102 of file direct_control_module.h.

bool robotis_op::DirectControlModule::is_updated_
private

Definition at line 103 of file direct_control_module.h.

double robotis_op::DirectControlModule::l_min_diff_
private

Definition at line 108 of file direct_control_module.h.

std::string robotis_op::DirectControlModule::last_msg_
private

Definition at line 124 of file direct_control_module.h.

ros::Time robotis_op::DirectControlModule::last_msg_time_
private

Definition at line 123 of file direct_control_module.h.

const int robotis_op::DirectControlModule::LEFT_ELBOW_INDEX
private

Definition at line 69 of file direct_control_module.h.

const int robotis_op::DirectControlModule::LEFT_END_EFFECTOR_INDEX
private

Definition at line 68 of file direct_control_module.h.

std::map<int, double> robotis_op::DirectControlModule::max_angle_
private

Definition at line 120 of file direct_control_module.h.

std::map<int, double> robotis_op::DirectControlModule::min_angle_
private

Definition at line 121 of file direct_control_module.h.

double robotis_op::DirectControlModule::moving_time_
private

Definition at line 107 of file direct_control_module.h.

OP3KinematicsDynamics* robotis_op::DirectControlModule::op3_kinematics_
private

Definition at line 126 of file direct_control_module.h.

Eigen::MatrixXd robotis_op::DirectControlModule::present_position_
private

Definition at line 111 of file direct_control_module.h.

boost::thread robotis_op::DirectControlModule::queue_thread_
private

Definition at line 96 of file direct_control_module.h.

double robotis_op::DirectControlModule::r_min_diff_
private

Definition at line 108 of file direct_control_module.h.

const int robotis_op::DirectControlModule::RIGHT_ELBOW_INDEX
private

Definition at line 67 of file direct_control_module.h.

const int robotis_op::DirectControlModule::RIGHT_END_EFFECTOR_INDEX
private

Definition at line 66 of file direct_control_module.h.

ros::Publisher robotis_op::DirectControlModule::status_msg_pub_
private

Definition at line 99 of file direct_control_module.h.

bool robotis_op::DirectControlModule::stop_process_
private

Definition at line 101 of file direct_control_module.h.

Eigen::MatrixXd robotis_op::DirectControlModule::target_position_
private

Definition at line 110 of file direct_control_module.h.

int robotis_op::DirectControlModule::tra_count_
private

Definition at line 106 of file direct_control_module.h.

boost::thread* robotis_op::DirectControlModule::tra_gene_thread_
private

Definition at line 97 of file direct_control_module.h.

boost::mutex robotis_op::DirectControlModule::tra_lock_
private

Definition at line 98 of file direct_control_module.h.

int robotis_op::DirectControlModule::tra_size_
private

Definition at line 106 of file direct_control_module.h.

std::map<std::string, int> robotis_op::DirectControlModule::using_joint_name_
private

Definition at line 119 of file direct_control_module.h.

bool robotis_op::DirectControlModule::will_be_collision_
private

Definition at line 105 of file direct_control_module.h.


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


op3_direct_control_module
Author(s): Kayman
autogenerated on Mon Jun 10 2019 14:41:17