IRI ROS Specific Algorithm Class. More...
#include <kinton_odom_alg_node.h>
Public Member Functions | |
KintonOdomAlgNode (void) | |
Constructor. | |
KintonOdomAlgNode (void) | |
Constructor. | |
~KintonOdomAlgNode (void) | |
Destructor. | |
~KintonOdomAlgNode (void) | |
Destructor. | |
Protected Member Functions | |
void | addNodeDiagnostics (void) |
node add diagnostics | |
void | addNodeDiagnostics (void) |
node add diagnostics | |
Eigen::Matrix4d | getTransform (const tf::StampedTransform &transform) |
Get transform matrix. | |
Eigen::Matrix4d | getTransform (const tf::StampedTransform &transform) |
Get transform matrix. | |
void | ini_zeros () |
initialization | |
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 | |
Protected Attributes | |
tf::TransformBroadcaster | odom_broadcaster_ |
Private Member Functions | |
void | height_callback (const mav_msgs::Height::ConstPtr &msg) |
void | height_point_callback (const geometry_msgs::PointStamped::ConstPtr &msg) |
void | imu_callback (const sensor_msgs::Imu::ConstPtr &msg) |
void | imu_callback (const sensor_msgs::Imu::ConstPtr &msg) |
Private Attributes | |
Eigen::MatrixXd | acc_lin_imu_ |
std::string | base_link_id_ |
ros::Time | current_time_ |
double | height_ |
double | height_init_ |
geometry_msgs::PointStamped | Height_msg_ |
CMutex | height_mutex_ |
CMutex | height_point_mutex_ |
ros::Subscriber | height_point_subscriber_ |
ros::Publisher | height_publisher_ |
ros::Subscriber | height_subscriber_ |
sensor_msgs::Imu | Imu_msg_ |
CMutex | imu_mutex_ |
ros::Publisher | imu_publisher_ |
ros::Subscriber | imu_subscriber_ |
bool | init_ |
ros::Time | last_time_ |
std::string | odom_id_ |
ros::Publisher | odom_publisher_ |
nav_msgs::Odometry | Odometry_msg_ |
Eigen::MatrixXd | pos_ang_imu_ |
Eigen::MatrixXd | pos_ang_odom_ |
Eigen::MatrixXd | pos_lin_odom_ |
geometry_msgs::PoseWithCovariance | pose_ |
bool | publish_tf_ |
Eigen::Matrix3d | Rquad_ |
Eigen::Matrix4d | T_acc_ |
Eigen::Matrix4d | T_comp_ |
Eigen::Matrix4d | T_gyr_ |
std::string | tf_prefix_ |
geometry_msgs::Transform | transform_ |
geometry_msgs::TwistWithCovariance | twist_ |
Eigen::MatrixXd | vel_ang_imu_ |
Eigen::MatrixXd | vel_lin_odom_ |
IRI ROS Specific Algorithm Class.
Definition at line 53 of file kinton_odom_alg_node.h.
KintonOdomAlgNode::KintonOdomAlgNode | ( | void | ) |
Constructor.
This constructor initializes specific class attributes and all ROS communications variables to enable message exchange.
Definition at line 3 of file kinton_odom_alg_node.cpp.
Destructor.
This destructor frees all necessary dynamic memory allocated within this this class.
Definition at line 77 of file kinton_odom_alg_node.cpp.
KintonOdomAlgNode::KintonOdomAlgNode | ( | void | ) |
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 KintonOdomAlgNode::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< KintonOdomAlgorithm >.
void KintonOdomAlgNode::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< KintonOdomAlgorithm >.
Definition at line 366 of file kinton_odom_alg_node.cpp.
Eigen::Matrix4d KintonOdomAlgNode::getTransform | ( | const tf::StampedTransform & | transform | ) | [protected] |
Get transform matrix.
From TransformStamped to Eigen 4x4
Eigen::Matrix4d KintonOdomAlgNode::getTransform | ( | const tf::StampedTransform & | transform | ) | [protected] |
Get transform matrix.
From TransformStamped to Eigen 4x4
Definition at line 335 of file kinton_odom_alg_node.cpp.
void KintonOdomAlgNode::height_callback | ( | const mav_msgs::Height::ConstPtr & | msg | ) | [private] |
Definition at line 145 of file kinton_std_msgs_node.cpp.
void KintonOdomAlgNode::height_point_callback | ( | const geometry_msgs::PointStamped::ConstPtr & | msg | ) | [private] |
Definition at line 279 of file kinton_odom_alg_node.cpp.
void KintonOdomAlgNode::imu_callback | ( | const sensor_msgs::Imu::ConstPtr & | msg | ) | [private] |
void KintonOdomAlgNode::imu_callback | ( | const sensor_msgs::Imu::ConstPtr & | msg | ) | [private] |
Definition at line 196 of file kinton_odom_alg_node.cpp.
void KintonOdomAlgNode::ini_zeros | ( | ) | [protected] |
initialization
Initialize class vars to zero
Definition at line 306 of file kinton_odom_alg_node.cpp.
void KintonOdomAlgNode::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< KintonOdomAlgorithm >.
void KintonOdomAlgNode::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< KintonOdomAlgorithm >.
Definition at line 82 of file kinton_odom_alg_node.cpp.
void KintonOdomAlgNode::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< KintonOdomAlgorithm >.
void KintonOdomAlgNode::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< KintonOdomAlgorithm >.
Definition at line 359 of file kinton_odom_alg_node.cpp.
Eigen::MatrixXd KintonOdomAlgNode::acc_lin_imu_ [private] |
Definition at line 84 of file kinton_odom_alg_node.h.
std::string KintonOdomAlgNode::base_link_id_ [private] |
Definition at line 111 of file kinton_odom_alg_node.h.
ros::Time KintonOdomAlgNode::current_time_ [private] |
Definition at line 78 of file kinton_odom_alg_node.h.
double KintonOdomAlgNode::height_ [private] |
Definition at line 100 of file kinton_odom_alg_node.h.
double KintonOdomAlgNode::height_init_ [private] |
Definition at line 101 of file kinton_odom_alg_node.h.
geometry_msgs::PointStamped KintonOdomAlgNode::Height_msg_ [private] |
Definition at line 56 of file kinton_std_msgs_node.h.
CMutex KintonOdomAlgNode::height_mutex_ [private] |
Definition at line 65 of file kinton_std_msgs_node.h.
CMutex KintonOdomAlgNode::height_point_mutex_ [private] |
Definition at line 67 of file kinton_odom_alg_node.h.
Definition at line 65 of file kinton_odom_alg_node.h.
Definition at line 55 of file kinton_std_msgs_node.h.
Definition at line 63 of file kinton_std_msgs_node.h.
sensor_msgs::Imu KintonOdomAlgNode::Imu_msg_ [private] |
Definition at line 53 of file kinton_std_msgs_node.h.
CMutex KintonOdomAlgNode::imu_mutex_ [private] |
Definition at line 63 of file kinton_odom_alg_node.h.
Definition at line 52 of file kinton_std_msgs_node.h.
Definition at line 61 of file kinton_odom_alg_node.h.
bool KintonOdomAlgNode::init_ [private] |
Definition at line 102 of file kinton_odom_alg_node.h.
ros::Time KintonOdomAlgNode::last_time_ [private] |
Definition at line 77 of file kinton_odom_alg_node.h.
Definition at line 134 of file kinton_odom_alg_node.h.
std::string KintonOdomAlgNode::odom_id_ [private] |
Definition at line 110 of file kinton_odom_alg_node.h.
Definition at line 57 of file kinton_odom_alg_node.h.
nav_msgs::Odometry KintonOdomAlgNode::Odometry_msg_ [private] |
Definition at line 58 of file kinton_odom_alg_node.h.
Eigen::MatrixXd KintonOdomAlgNode::pos_ang_imu_ [private] |
Definition at line 84 of file kinton_odom_alg_node.h.
Eigen::MatrixXd KintonOdomAlgNode::pos_ang_odom_ [private] |
Definition at line 93 of file kinton_odom_alg_node.h.
Eigen::MatrixXd KintonOdomAlgNode::pos_lin_odom_ [private] |
Definition at line 96 of file kinton_odom_alg_node.h.
geometry_msgs::PoseWithCovariance KintonOdomAlgNode::pose_ [private] |
Definition at line 104 of file kinton_odom_alg_node.h.
bool KintonOdomAlgNode::publish_tf_ [private] |
Definition at line 112 of file kinton_odom_alg_node.h.
Eigen::Matrix3d KintonOdomAlgNode::Rquad_ [private] |
Definition at line 87 of file kinton_odom_alg_node.h.
Eigen::Matrix4d KintonOdomAlgNode::T_acc_ [private] |
Definition at line 81 of file kinton_odom_alg_node.h.
Eigen::Matrix4d KintonOdomAlgNode::T_comp_ [private] |
Definition at line 81 of file kinton_odom_alg_node.h.
Eigen::Matrix4d KintonOdomAlgNode::T_gyr_ [private] |
Definition at line 81 of file kinton_odom_alg_node.h.
std::string KintonOdomAlgNode::tf_prefix_ [private] |
Definition at line 109 of file kinton_odom_alg_node.h.
geometry_msgs::Transform KintonOdomAlgNode::transform_ [private] |
Definition at line 106 of file kinton_odom_alg_node.h.
geometry_msgs::TwistWithCovariance KintonOdomAlgNode::twist_ [private] |
Definition at line 105 of file kinton_odom_alg_node.h.
Eigen::MatrixXd KintonOdomAlgNode::vel_ang_imu_ [private] |
Definition at line 84 of file kinton_odom_alg_node.h.
Eigen::MatrixXd KintonOdomAlgNode::vel_lin_odom_ [private] |
Definition at line 90 of file kinton_odom_alg_node.h.