#include <imu_filter.h>
Public Member Functions | |
ImuFilter (ros::NodeHandle nh, ros::NodeHandle nh_private) | |
virtual | ~ImuFilter () |
Private Types | |
typedef imu_filter_madgwick::ImuFilterMadgwickConfig | FilterConfig |
typedef dynamic_reconfigure::Server < FilterConfig > | FilterConfigServer |
typedef sensor_msgs::Imu | ImuMsg |
typedef message_filters::Subscriber < ImuMsg > | ImuSubscriber |
typedef geometry_msgs::Vector3Stamped | MagMsg |
typedef message_filters::Subscriber < MagMsg > | MagSubscriber |
typedef message_filters::Synchronizer < SyncPolicy > | Synchronizer |
typedef message_filters::sync_policies::ApproximateTime < ImuMsg, MagMsg > | SyncPolicy |
Private Member Functions | |
void | imuCallback (const ImuMsg::ConstPtr &imu_msg_raw) |
void | imuMagCallback (const ImuMsg::ConstPtr &imu_msg_raw, const MagMsg::ConstPtr &mav_msg) |
void | madgwickAHRSupdate (float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz, float dt) |
void | madgwickAHRSupdateIMU (float gx, float gy, float gz, float ax, float ay, float az, float dt) |
void | publishFilteredMsg (const ImuMsg::ConstPtr &imu_msg_raw) |
void | publishTransform (const ImuMsg::ConstPtr &imu_msg_raw) |
void | reconfigCallback (FilterConfig &config, uint32_t level) |
Static Private Member Functions | |
static float | invSqrt (float x) |
Private Attributes | |
FilterConfigServer | config_server_ |
double | constant_dt_ |
std::string | fixed_frame_ |
double | gain_ |
std::string | imu_frame_ |
ros::Publisher | imu_publisher_ |
boost::shared_ptr< ImuSubscriber > | imu_subscriber_ |
bool | initialized_ |
ros::Time | last_time_ |
boost::shared_ptr< MagSubscriber > | mag_subscriber_ |
boost::mutex | mutex_ |
ros::NodeHandle | nh_ |
ros::NodeHandle | nh_private_ |
bool | publish_tf_ |
double | q0 |
double | q1 |
double | q2 |
double | q3 |
boost::shared_ptr< Synchronizer > | sync_ |
tf::TransformBroadcaster | tf_broadcaster_ |
bool | use_mag_ |
float | w_bx_ |
float | w_by_ |
float | w_bz_ |
double | zeta_ |
Definition at line 42 of file imu_filter.h.
typedef imu_filter_madgwick::ImuFilterMadgwickConfig ImuFilter::FilterConfig [private] |
Definition at line 52 of file imu_filter.h.
typedef dynamic_reconfigure::Server<FilterConfig> ImuFilter::FilterConfigServer [private] |
Definition at line 53 of file imu_filter.h.
typedef sensor_msgs::Imu ImuFilter::ImuMsg [private] |
Definition at line 44 of file imu_filter.h.
typedef message_filters::Subscriber<ImuMsg> ImuFilter::ImuSubscriber [private] |
Definition at line 49 of file imu_filter.h.
typedef geometry_msgs::Vector3Stamped ImuFilter::MagMsg [private] |
Definition at line 45 of file imu_filter.h.
typedef message_filters::Subscriber<MagMsg> ImuFilter::MagSubscriber [private] |
Definition at line 50 of file imu_filter.h.
typedef message_filters::Synchronizer<SyncPolicy> ImuFilter::Synchronizer [private] |
Definition at line 48 of file imu_filter.h.
typedef message_filters::sync_policies::ApproximateTime<ImuMsg, MagMsg> ImuFilter::SyncPolicy [private] |
Definition at line 47 of file imu_filter.h.
ImuFilter::ImuFilter | ( | ros::NodeHandle | nh, |
ros::NodeHandle | nh_private | ||
) |
Definition at line 27 of file imu_filter.cpp.
ImuFilter::~ImuFilter | ( | ) | [virtual] |
Definition at line 97 of file imu_filter.cpp.
void ImuFilter::imuCallback | ( | const ImuMsg::ConstPtr & | imu_msg_raw | ) | [private] |
Definition at line 102 of file imu_filter.cpp.
void ImuFilter::imuMagCallback | ( | const ImuMsg::ConstPtr & | imu_msg_raw, |
const MagMsg::ConstPtr & | mav_msg | ||
) | [private] |
Definition at line 151 of file imu_filter.cpp.
static float ImuFilter::invSqrt | ( | float | x | ) | [inline, static, private] |
Definition at line 117 of file imu_filter.h.
void ImuFilter::madgwickAHRSupdate | ( | float | gx, |
float | gy, | ||
float | gz, | ||
float | ax, | ||
float | ay, | ||
float | az, | ||
float | mx, | ||
float | my, | ||
float | mz, | ||
float | dt | ||
) | [private] |
Definition at line 235 of file imu_filter.cpp.
void ImuFilter::madgwickAHRSupdateIMU | ( | float | gx, |
float | gy, | ||
float | gz, | ||
float | ax, | ||
float | ay, | ||
float | az, | ||
float | dt | ||
) | [private] |
Definition at line 359 of file imu_filter.cpp.
void ImuFilter::publishFilteredMsg | ( | const ImuMsg::ConstPtr & | imu_msg_raw | ) | [private] |
Definition at line 220 of file imu_filter.cpp.
void ImuFilter::publishTransform | ( | const ImuMsg::ConstPtr & | imu_msg_raw | ) | [private] |
Definition at line 207 of file imu_filter.cpp.
void ImuFilter::reconfigCallback | ( | FilterConfig & | config, |
uint32_t | level | ||
) | [private] |
Definition at line 431 of file imu_filter.cpp.
FilterConfigServer ImuFilter::config_server_ [private] |
Definition at line 74 of file imu_filter.h.
double ImuFilter::constant_dt_ [private] |
Definition at line 84 of file imu_filter.h.
std::string ImuFilter::fixed_frame_ [private] |
Definition at line 82 of file imu_filter.h.
double ImuFilter::gain_ [private] |
Definition at line 78 of file imu_filter.h.
std::string ImuFilter::imu_frame_ [private] |
Definition at line 83 of file imu_filter.h.
ros::Publisher ImuFilter::imu_publisher_ [private] |
Definition at line 71 of file imu_filter.h.
boost::shared_ptr<ImuSubscriber> ImuFilter::imu_subscriber_ [private] |
Definition at line 68 of file imu_filter.h.
bool ImuFilter::initialized_ [private] |
Definition at line 89 of file imu_filter.h.
ros::Time ImuFilter::last_time_ [private] |
Definition at line 91 of file imu_filter.h.
boost::shared_ptr<MagSubscriber> ImuFilter::mag_subscriber_ [private] |
Definition at line 69 of file imu_filter.h.
boost::mutex ImuFilter::mutex_ [private] |
Definition at line 88 of file imu_filter.h.
ros::NodeHandle ImuFilter::nh_ [private] |
Definition at line 64 of file imu_filter.h.
ros::NodeHandle ImuFilter::nh_private_ [private] |
Definition at line 65 of file imu_filter.h.
bool ImuFilter::publish_tf_ [private] |
Definition at line 81 of file imu_filter.h.
double ImuFilter::q0 [private] |
Definition at line 90 of file imu_filter.h.
double ImuFilter::q1 [private] |
Definition at line 90 of file imu_filter.h.
double ImuFilter::q2 [private] |
Definition at line 90 of file imu_filter.h.
double ImuFilter::q3 [private] |
Definition at line 90 of file imu_filter.h.
boost::shared_ptr<Synchronizer> ImuFilter::sync_ [private] |
Definition at line 67 of file imu_filter.h.
Definition at line 72 of file imu_filter.h.
bool ImuFilter::use_mag_ [private] |
Definition at line 80 of file imu_filter.h.
float ImuFilter::w_bx_ [private] |
Definition at line 92 of file imu_filter.h.
float ImuFilter::w_by_ [private] |
Definition at line 92 of file imu_filter.h.
float ImuFilter::w_bz_ [private] |
Definition at line 92 of file imu_filter.h.
double ImuFilter::zeta_ [private] |
Definition at line 79 of file imu_filter.h.