1 #ifndef PHIDGETS_IMU_IMU_ROS_I_H 2 #define PHIDGETS_IMU_IMU_ROS_I_H 9 #include <sensor_msgs/Imu.h> 10 #include <sensor_msgs/MagneticField.h> 11 #include <std_msgs/Bool.h> 12 #include <std_srvs/Empty.h> 19 const float G = 9.80665;
25 typedef sensor_msgs::MagneticField
MagMsg;
31 std_srvs::Empty::Response &res);
44 std::shared_ptr<diagnostic_updater::TopicDiagnostic>
88 void dataHandler(
const double acceleration[3],
const double angularRate[3],
89 const double magneticField[3],
double timestamp)
override;
104 #endif // PHIDGETS_IMU_IMU_ROS_I_H
ros::ServiceServer cal_srv_
const float MAX_TIMEDIFF_SECONDS
ImuRosI(ros::NodeHandle nh, ros::NodeHandle nh_private)
double target_publish_freq_
ros::Publisher imu_publisher_
double linear_acceleration_stdev_
sensor_msgs::MagneticField MagMsg
void attachHandler() override
bool calibrateService(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
void errorHandler(int error) override
ros::Time last_published_time_
std::shared_ptr< diagnostic_updater::TopicDiagnostic > imu_publisher_diag_ptr_
double magnetic_field_stdev_
double angular_velocity_stdev_
void phidgetsDiagnostics(diagnostic_updater::DiagnosticStatusWrapper &stat)
Main diagnostic method that takes care of collecting diagnostic data.
ros::NodeHandle nh_private_
ros::Publisher cal_publisher_
ros::Publisher mag_publisher_
diagnostic_updater::Updater diag_updater_
updater object of class Update. Used to add diagnostic tasks, set ID etc. refer package API...
void detachHandler() override
void dataHandler(const double acceleration[3], const double angularRate[3], const double magneticField[3], double timestamp) override