42 const std::vector<std::string>& sensor_names = hw->
getNames();
43 for (
unsigned i=0; i<sensor_names.size(); i++)
44 ROS_DEBUG(
"Got sensor %s", sensor_names[i].c_str());
48 ROS_ERROR(
"Parameter 'publish_rate' not set");
52 for (
unsigned i=0; i<sensor_names.size(); i++){
100 if (
sensors_[i].getOrientationCovariance())
102 for (
unsigned j=0; j<
realtime_pubs_[i]->msg_.orientation_covariance.size(); ++j){
111 for (
unsigned j=0; j<
realtime_pubs_[i]->msg_.orientation_covariance.size(); ++j){
123 if (
sensors_[i].getAngularVelocity())
131 if (
sensors_[i].getAngularVelocityCovariance())
133 for (
unsigned j=0; j<
realtime_pubs_[i]->msg_.angular_velocity_covariance.size(); ++j){
139 if (
sensors_[i].getAngularVelocity())
142 for (
unsigned j=0; j<
realtime_pubs_[i]->msg_.angular_velocity_covariance.size(); ++j){
154 if (
sensors_[i].getLinearAcceleration())
162 if (
sensors_[i].getLinearAccelerationCovariance())
164 for (
unsigned j=0; j<
realtime_pubs_[i]->msg_.linear_acceleration_covariance.size(); ++j){
165 realtime_pubs_[i]->msg_.linear_acceleration_covariance[j] =
sensors_[i].getLinearAccelerationCovariance()[j];
170 if (
sensors_[i].getLinearAcceleration())
173 for (
unsigned j=0; j<
realtime_pubs_[i]->msg_.linear_acceleration_covariance.size(); ++j){
virtual void update(const ros::Time &time, const ros::Duration &)
virtual void stopping(const ros::Time &)
virtual bool init(hardware_interface::ImuSensorInterface *hw, ros::NodeHandle &root_nh, ros::NodeHandle &controller_nh)
std::vector< RtPublisherPtr > realtime_pubs_
std::vector< hardware_interface::ImuSensorHandle > sensors_
virtual void starting(const ros::Time &time)
ImuSensorHandle getHandle(const std::string &name)
bool getParam(const std::string &key, std::string &s) const
std::vector< ros::Time > last_publish_times_
std::vector< std::string > getNames() const
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)