3DM-GX3-25 throws std::runtime_error() "Time is Out of Dual 32-bit range" on Ros Fuerte/Ubuntu Precise
I was trying to get the 3DM-GX3-25 Inertial sensor up and running on Ros Fuerte/Ubuntu Precise using the Microstrain 3dM-GX2 IMU node in the Microstrain 3dM-gX2 package.
When I run the node, I get the following error:
jdavis@MyUbuntu:~/fuerte_workspace/sandbox/microstrain_3dmgx2_imu$ rosrun microstrain_3dmgx2_imu imu_node
[ INFO] [1345843227.742138299]: Connected to IMU [ 3DM-GX3-25] model [ 6223-4220] s/n [
6223.06644] options [ 5g 300d/s] [ INFO] [1345843227.742460665]:Calibrating IMU gyros. terminate called after throwing an instance of 'std::runtime_error' what(): Time is out of dual 32-bit range Aborted (core dumped)
I looked it up on answers.ros.org and saw that a similar error was thrown in rosbag file playing (this one) and (this one).
The IMU timestamps are measured in Uint64_ts and converted to Doubles for calculations, before converting them back to Uint64_t. Is this what I should be looking at?
Any ideas on how I can get around this would be great!
I got it to work by replacing data.header.stamp = ros::Time::now().FromNSec(time) to data.header.stamp = ros::Time::now() in the function getData() inside the imu_node.cc source file for the node. Conversion to ros::time threw the error?
Thanks, this solution worked for me too. I wish they have a look at it and integrate the solution or a better solution to the driver.
@jdavis I suggest you file a ticket here: https://github.com/ros-drivers/microstrain_3dmgx2_imu/issues so that the maintainers know there is an issue. Before doing so, try to see if Groovy includes a fix for this issue.