ros-drivers / um6

ROS driver for UM6 inertial measurement device.
4 stars 21 forks source link

error in setting the 'mag_ref' parameter in um6 imu package #19

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi all,

I am using a UM6 IMU from CH-Robotics on the Grizzly robot from Clearpath. In order to do the calibration of the sensor, I have to set the reference values of magnetometer and accelerometer. So I set the mag_ref parameter for x, y, z to desired numbers for 'um6 driver' but it publishes an error:

"Unable to configure vector"

I tried to debug the code it seems on the 75th line of the main.cpp file of the driver, it needs a '!' to make it more meaningful.

75    if (sensor->sendWaitAck(reg))        // we need to change it to !sensor to get rid of the error
76    {
77      throw std::runtime_error("Unable to configure vector.");
78    }

But after changing this the error goes away but it would not set the mag_ref parameter in the sensor registers.

Any one knows what is the problem?