I solved the problem. The BeagleBone Blue was in too close proximity to the DC motors that it drives. I removed the BBBL from the chassis and kept only the battery connected, and now I can calibrate the magnetometer successfully. I will have to reconsider the layout and move the BBBL further away from the motors. (Yes, there was a hardware bug, in my configuration. ☺)
The calibration file looks much better now. # cat /var/lib/roboticscape/mag.cal 27.653961 0.885905 27.744669 1.534232 1.562714 1.503506 On Saturday, May 13, 2017 at 4:32:27 PM UTC-4, Michael K Johnson wrote: > > Yeah, I know NaN. I've done plenty of work with floating point. > > By "hack" I meant *only* disabling the sanity check that prints "ERROR: > center of fitted ellipsoid out of bounds" to see what would happen without > the sanity check. I was curious what would be written to the magnetometer > calibration file if I disabled the sanity check, as a way of pursuing an > understanding of whether the problem was my BeagleBone Blue hardware or the > software running on it. > > The "*ERROR: center of fitted ellipsoid out of bounds*" message is > happening on my out-of-the-box pristine BeagleBone Blue, every time I run > rc_calibrate_mag as required for magnetometer use. > > I would *hope* that normal BeagleBone Blue devices have functioning > magnetometers, and that the rc_calibrate_mag program that you are required > to use in order to use the magnetometer in the IMU functions correctly. > > That would mean that my BeagleBone Blue is a faulty hardware unit. > > But before I pursue getting it replaced, I wanted to know whether there > was a software bug that affects everyone else's BeagleBone Blue IMU > magnetometers. > > It would be good to hear back from someone who knows something about the > BeagleBone Blue on whether there is a software fault or a hardware fault. > > Right now, I am *not able to use my BeagleBone Blue for its intended > purpose*, since that specifically includes using the magnetometer. > > > On Saturday, May 13, 2017 at 2:56:17 PM UTC-4, William Hermans wrote: >> >> >> >> On Sat, May 13, 2017 at 11:48 AM, William Hermans <[email protected]> >> wrote: >> >>> >>> >>> On Sat, May 13, 2017 at 11:46 AM, William Hermans <[email protected]> >>> wrote: >>> >>>> nan == "not a number". So something you've "hacked" is most likely >>>> causing that output. >>>> >>> >>> Quite possibly related to sending output from an unsigned char, or >>> character type without first converting( casting ) to a number type. In >>> your case, probably float or double. >>> >> >> Sorry, my bad, multi tasking here, and not thinking the problem through >> fully. Casting to a number type probably won't work. You'll need to use >> something like strtof() >> http://www.cplusplus.com/reference/cstdlib/strtof/ >> >> -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/612ce3a9-d678-430e-bb51-fdc91d58375a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
