IRI ROS Specific Algorithm Class. More...
#include <artag_image_based_vs_alg_node.h>
Public Member Functions | |
ArtagImageBasedVsAlgNode (void) | |
Constructor. | |
ArtagImageBasedVsAlgNode (void) | |
Constructor. | |
~ArtagImageBasedVsAlgNode (void) | |
Destructor. | |
~ArtagImageBasedVsAlgNode (void) | |
Destructor. | |
Protected Member Functions | |
void | addNodeDiagnostics (void) |
node add diagnostics | |
void | addNodeDiagnostics (void) |
node add diagnostics | |
void | fill_msg (std_msgs::Float64MultiArray &msg, const Eigen::MatrixXd &data) |
Fill message. | |
void | get_marker_info (const ar_pose::ARMarkers::ConstPtr &msg) |
Get marker info. | |
void | mainNodeThread (void) |
main node thread | |
void | mainNodeThread (void) |
main node thread | |
void | node_config_update (Config &config, uint32_t level) |
dynamic reconfigure server callback | |
void | node_config_update (Config &config, uint32_t level) |
dynamic reconfigure server callback | |
void | virtual_features () |
Virtual features. | |
Private Member Functions | |
void | input_ARtag_callback (const ar_pose::ARMarkers::ConstPtr &msg) |
void | marker_callback (const ar_pose::ARMarkers::ConstPtr &msg) |
void | odom_callback (const nav_msgs::Odometry::ConstPtr &msg) |
Private Attributes | |
Eigen::MatrixXd | alfas_ |
std_msgs::Float64MultiArray | alfas_msg_ |
ros::Publisher | alfas_publisher_ |
ArtagImageBasedVsAlgorithm | artag_image_based_vs_alg_ |
Eigen::MatrixXd | cam_vel_ |
Eigen::MatrixXd | cj_0_ |
std_msgs::Float64MultiArray | cj_0_msg_ |
ros::Publisher | cj_0_publisher_ |
ros::Publisher | cmd_vel_cov_publisher_ |
Eigen::MatrixXd | cP_ |
std_msgs::Float64MultiArray | cP_msg_ |
ros::Publisher | cP_publisher_ |
Eigen::Matrix4d | cTo_ |
Eigen::MatrixXd | current_pose_ |
Eigen::MatrixXd | desired_pose_ |
double | dt_ |
double | fixed_to_id_ |
double | i_lim_ |
bool | init_ |
CMutex | input_ARtag_mutex_ |
ros::Subscriber | input_ARtag_subscriber_ |
Eigen::MatrixXd | kd_ |
Eigen::MatrixXd | ki_ |
Eigen::MatrixXd | kp_ |
CMutex | marker_mutex_ |
ros::Subscriber | marker_subscriber_ |
int | n_ |
bool | object_found_ |
std_msgs::Bool | object_found_msg_ |
ros::Publisher | object_found_publisher_ |
CMutex | odom_mutex_ |
ros::Subscriber | odom_subscriber_ |
Eigen::MatrixXd | P0_ |
std_msgs::Float64MultiArray | P0_msg_ |
ros::Publisher | P0_publisher_ |
bool | planar_ |
Eigen::MatrixXd | pn_ |
std_msgs::Float64MultiArray | pn_msg_ |
ros::Publisher | pn_publisher_ |
geometry_msgs::Pose | pose_ |
bool | random_points_ |
ar_pose::ARMarkers | target_artag_msg_ |
ros::Publisher | target_artag_publisher_ |
ros::Time | time_ |
ros::Time | time_last_ |
bool | traditional_ |
geometry_msgs::TwistWithCovariance | TwistWC_msg_ |
bool | underact_ |
Eigen::MatrixXd | v_rollpitch_ |
IRI ROS Specific Algorithm Class.
Definition at line 45 of file artag_image_based_vs_alg_node.h.
Constructor.
This constructor initializes specific class attributes and all ROS communications variables to enable message exchange.
Definition at line 3 of file artag_image_based_vs_alg_node.cpp.
Destructor.
This destructor frees all necessary dynamic memory allocated within this this class.
Definition at line 38 of file artag_image_based_vs_alg_node.cpp.
Constructor.
This constructor initializes specific class attributes and all ROS communications variables to enable message exchange.
Destructor.
This destructor frees all necessary dynamic memory allocated within this this class.
void ArtagImageBasedVsAlgNode::addNodeDiagnostics | ( | void | ) | [protected, virtual] |
node add diagnostics
In this abstract function additional ROS diagnostics applied to the specific algorithms may be added.
Implements algorithm_base::IriBaseAlgorithm< ArtagImageBasedVsAlgorithm >.
void ArtagImageBasedVsAlgNode::addNodeDiagnostics | ( | void | ) | [protected, virtual] |
node add diagnostics
In this abstract function additional ROS diagnostics applied to the specific algorithms may be added.
Implements algorithm_base::IriBaseAlgorithm< ArtagImageBasedVsAlgorithm >.
Definition at line 260 of file artag_image_based_vs_alg_node.cpp.
void ArtagImageBasedVsAlgNode::fill_msg | ( | std_msgs::Float64MultiArray & | msg, |
const Eigen::MatrixXd & | data | ||
) | [protected] |
Fill message.
Fill a std_msgs::Float64MultiArray message with data (2D matrix)
Definition at line 261 of file artag_virtual_features_alg_node.cpp.
void ArtagImageBasedVsAlgNode::get_marker_info | ( | const ar_pose::ARMarkers::ConstPtr & | msg | ) | [protected] |
Get marker info.
Extract marker data: time, pose and ID,
Definition at line 165 of file artag_image_based_vs_alg_node.cpp.
void ArtagImageBasedVsAlgNode::input_ARtag_callback | ( | const ar_pose::ARMarkers::ConstPtr & | msg | ) | [private] |
Definition at line 56 of file artag_image_based_vs_alg_node.cpp.
void ArtagImageBasedVsAlgNode::mainNodeThread | ( | void | ) | [protected, virtual] |
main node thread
This is the main thread node function. Code written here will be executed in every node loop while the algorithm is on running state. Loop frequency can be tuned by modifying loop_rate attribute.
Here data related to the process loop or to ROS topics (mainly data structs related to the MSG and SRV files) must be updated. ROS publisher objects must publish their data in this process. ROS client servers may also request data to the corresponding server topics.
Implements algorithm_base::IriBaseAlgorithm< ArtagImageBasedVsAlgorithm >.
void ArtagImageBasedVsAlgNode::mainNodeThread | ( | void | ) | [protected, virtual] |
main node thread
This is the main thread node function. Code written here will be executed in every node loop while the algorithm is on running state. Loop frequency can be tuned by modifying loop_rate attribute.
Here data related to the process loop or to ROS topics (mainly data structs related to the MSG and SRV files) must be updated. ROS publisher objects must publish their data in this process. ROS client servers may also request data to the corresponding server topics.
Implements algorithm_base::IriBaseAlgorithm< ArtagImageBasedVsAlgorithm >.
Definition at line 43 of file artag_image_based_vs_alg_node.cpp.
void ArtagImageBasedVsAlgNode::marker_callback | ( | const ar_pose::ARMarkers::ConstPtr & | msg | ) | [private] |
Definition at line 59 of file artag_virtual_features_alg_node.cpp.
void ArtagImageBasedVsAlgNode::node_config_update | ( | Config & | config, |
uint32_t | level | ||
) | [protected, virtual] |
dynamic reconfigure server callback
This method is called whenever a new configuration is received through the dynamic reconfigure. The derivated generic algorithm class must implement it.
config | an object with new configuration from all algorithm parameters defined in the config file. |
level | integer referring the level in which the configuration has been changed. |
Implements algorithm_base::IriBaseAlgorithm< ArtagImageBasedVsAlgorithm >.
void ArtagImageBasedVsAlgNode::node_config_update | ( | Config & | config, |
uint32_t | level | ||
) | [protected, virtual] |
dynamic reconfigure server callback
This method is called whenever a new configuration is received through the dynamic reconfigure. The derivated generic algorithm class must implement it.
config | an object with new configuration from all algorithm parameters defined in the config file. |
level | integer referring the level in which the configuration has been changed. |
Implements algorithm_base::IriBaseAlgorithm< ArtagImageBasedVsAlgorithm >.
Definition at line 218 of file artag_image_based_vs_alg_node.cpp.
void ArtagImageBasedVsAlgNode::odom_callback | ( | const nav_msgs::Odometry::ConstPtr & | msg | ) | [private] |
Definition at line 129 of file artag_image_based_vs_alg_node.cpp.
void ArtagImageBasedVsAlgNode::virtual_features | ( | ) | [protected] |
Virtual features.
Compute virtual features, its centered points, barycentric coordinates and the respective alfas. It could be randomly or not.
Definition at line 131 of file artag_virtual_features_alg_node.cpp.
Eigen::MatrixXd ArtagImageBasedVsAlgNode::alfas_ [private] |
Definition at line 78 of file artag_virtual_features_alg_node.h.
std_msgs::Float64MultiArray ArtagImageBasedVsAlgNode::alfas_msg_ [private] |
Definition at line 57 of file artag_virtual_features_alg_node.h.
Definition at line 56 of file artag_virtual_features_alg_node.h.
Definition at line 72 of file artag_image_based_vs_alg_node.h.
Eigen::MatrixXd ArtagImageBasedVsAlgNode::cam_vel_ [private] |
Definition at line 67 of file artag_image_based_vs_alg_node.h.
Eigen::MatrixXd ArtagImageBasedVsAlgNode::cj_0_ [private] |
Definition at line 76 of file artag_virtual_features_alg_node.h.
std_msgs::Float64MultiArray ArtagImageBasedVsAlgNode::cj_0_msg_ [private] |
Definition at line 53 of file artag_virtual_features_alg_node.h.
Definition at line 52 of file artag_virtual_features_alg_node.h.
Definition at line 49 of file artag_image_based_vs_alg_node.h.
Eigen::MatrixXd ArtagImageBasedVsAlgNode::cP_ [private] |
Definition at line 79 of file artag_virtual_features_alg_node.h.
std_msgs::Float64MultiArray ArtagImageBasedVsAlgNode::cP_msg_ [private] |
Definition at line 59 of file artag_virtual_features_alg_node.h.
Definition at line 58 of file artag_virtual_features_alg_node.h.
Eigen::Matrix4d ArtagImageBasedVsAlgNode::cTo_ [private] |
Definition at line 80 of file artag_virtual_features_alg_node.h.
Eigen::MatrixXd ArtagImageBasedVsAlgNode::current_pose_ [private] |
Definition at line 77 of file artag_image_based_vs_alg_node.h.
Eigen::MatrixXd ArtagImageBasedVsAlgNode::desired_pose_ [private] |
Definition at line 76 of file artag_image_based_vs_alg_node.h.
double ArtagImageBasedVsAlgNode::dt_ [private] |
Definition at line 70 of file artag_image_based_vs_alg_node.h.
double ArtagImageBasedVsAlgNode::fixed_to_id_ [private] |
Definition at line 85 of file artag_image_based_vs_alg_node.h.
double ArtagImageBasedVsAlgNode::i_lim_ [private] |
Definition at line 81 of file artag_image_based_vs_alg_node.h.
bool ArtagImageBasedVsAlgNode::init_ [private] |
Definition at line 83 of file artag_image_based_vs_alg_node.h.
CMutex ArtagImageBasedVsAlgNode::input_ARtag_mutex_ [private] |
Definition at line 58 of file artag_image_based_vs_alg_node.h.
Definition at line 56 of file artag_image_based_vs_alg_node.h.
Eigen::MatrixXd ArtagImageBasedVsAlgNode::kd_ [private] |
Definition at line 80 of file artag_image_based_vs_alg_node.h.
Eigen::MatrixXd ArtagImageBasedVsAlgNode::ki_ [private] |
Definition at line 80 of file artag_image_based_vs_alg_node.h.
Eigen::MatrixXd ArtagImageBasedVsAlgNode::kp_ [private] |
Definition at line 80 of file artag_image_based_vs_alg_node.h.
CMutex ArtagImageBasedVsAlgNode::marker_mutex_ [private] |
Definition at line 66 of file artag_virtual_features_alg_node.h.
Definition at line 65 of file artag_virtual_features_alg_node.h.
int ArtagImageBasedVsAlgNode::n_ [private] |
Definition at line 81 of file artag_virtual_features_alg_node.h.
bool ArtagImageBasedVsAlgNode::object_found_ [private] |
Definition at line 85 of file artag_virtual_features_alg_node.h.
std_msgs::Bool ArtagImageBasedVsAlgNode::object_found_msg_ [private] |
Definition at line 61 of file artag_virtual_features_alg_node.h.
Definition at line 60 of file artag_virtual_features_alg_node.h.
CMutex ArtagImageBasedVsAlgNode::odom_mutex_ [private] |
Definition at line 64 of file artag_image_based_vs_alg_node.h.
Definition at line 62 of file artag_image_based_vs_alg_node.h.
Eigen::MatrixXd ArtagImageBasedVsAlgNode::P0_ [private] |
Definition at line 77 of file artag_virtual_features_alg_node.h.
std_msgs::Float64MultiArray ArtagImageBasedVsAlgNode::P0_msg_ [private] |
Definition at line 55 of file artag_virtual_features_alg_node.h.
Definition at line 54 of file artag_virtual_features_alg_node.h.
bool ArtagImageBasedVsAlgNode::planar_ [private] |
Definition at line 83 of file artag_virtual_features_alg_node.h.
Eigen::MatrixXd ArtagImageBasedVsAlgNode::pn_ [private] |
Definition at line 75 of file artag_virtual_features_alg_node.h.
std_msgs::Float64MultiArray ArtagImageBasedVsAlgNode::pn_msg_ [private] |
Definition at line 51 of file artag_virtual_features_alg_node.h.
Definition at line 50 of file artag_virtual_features_alg_node.h.
Definition at line 87 of file artag_image_based_vs_alg_node.h.
bool ArtagImageBasedVsAlgNode::random_points_ [private] |
Definition at line 75 of file artag_image_based_vs_alg_node.h.
ar_pose::ARMarkers ArtagImageBasedVsAlgNode::target_artag_msg_ [private] |
Definition at line 52 of file artag_image_based_vs_alg_node.h.
Definition at line 51 of file artag_image_based_vs_alg_node.h.
ros::Time ArtagImageBasedVsAlgNode::time_ [private] |
Definition at line 69 of file artag_image_based_vs_alg_node.h.
Definition at line 69 of file artag_image_based_vs_alg_node.h.
bool ArtagImageBasedVsAlgNode::traditional_ [private] |
Definition at line 74 of file artag_image_based_vs_alg_node.h.
geometry_msgs::TwistWithCovariance ArtagImageBasedVsAlgNode::TwistWC_msg_ [private] |
Definition at line 50 of file artag_image_based_vs_alg_node.h.
bool ArtagImageBasedVsAlgNode::underact_ [private] |
Definition at line 78 of file artag_image_based_vs_alg_node.h.
Eigen::MatrixXd ArtagImageBasedVsAlgNode::v_rollpitch_ [private] |
Definition at line 79 of file artag_image_based_vs_alg_node.h.