ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Imu data about xsens_driver

asked 2017-02-26 21:19:36 -0500

apanda gravatar image

when i got the sensor_msgs::Imu data by adding listener to the topic, but before i use the imu data, how could i judge the imu.linear_acceleration or imu.angular_velocity is valid or available. i saw the imu.linear_acceleration.x default value is -1f, so it dosen't have a easy way(or flag) to judge if i could use the data, right ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-02-27 20:57:50 -0500

tfoote gravatar image

-1 means invalid. See the documentation here:

edit flag offensive delete link more


I mean it's a float or double, so i can't judge if it's invalid by "==", is there a common way, like imu.isValid or imu.linear_acceleration.isValid. Thanks. BTW, linear_acceleration.x, y, z could be -1f, not defualt.

apanda gravatar image apanda  ( 2017-03-02 19:52:49 -0500 )edit

Question Tools

1 follower


Asked: 2017-02-26 21:19:36 -0500

Seen: 158 times

Last updated: Feb 27 '17