This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IMUTYPE gets overwritten
#1
Hi all, 

I have an LSM303DLHC sensor. As from the file RTIMULib.ini this corresponds to IMUType 4. 

The problem I'm facing is that this value gets overwritten every time I click on apply under the pypilot tab to the value 13. 

Is anybody having an idea what could be the cause of this behavior and how I can overcome this issue?

Any help welcome.

didi
  Reply
#2
The imu should get autodetected, but maybe it is detected wrong?

Can you stop all pypilot processes, in a terminal type:

$ killlall python... a few times until no more processes running
$ rm RTIMULIB.ini
$ pypilot_boatimu

Try running a few times, make sure it works every time.

paste the output here
  Reply
#3
Indeed it gets detected wrong. The system detects the sensor as:
IMU Name: L3G4200D + HMC5883L

I did some further tests and hardwired the sensor type to 4 or 8 (according to the RTIMULib.ini they are the same for the LSM303 chip) but did run into the following.

I was able to fix pypilot_boat to use IMUType 4 by editing boatimu.py by disabling auto detection. However, I get the following error in the terminal where I started pypilot_boatimu.

Using settings file RTIMULib.ini
Using fusion algorithm Kalman STATE4
IMU Name: L3GD20 + LSM303DLHC
min/max compass calibration not in use
Using ellipsoid compass calibration
Using accel calibration
Incorrect L3GD20 id 60
ERROR: IMU Init Failed, no inertial data available

Any ideas?

I tested the sensor with a little python script which gives me good readings with a driver for the LSM303DLHC.

best regards
didi
  Reply
#4
Could you clone:
https://github.com/seandepagnier/rtimulib2

Try the scripts. If it doesn't work, you need to modify the source code to detect your imu correctly. It seems strange that you would have a part that uses a different i2c id, is this really true?

Once you get the library working, everything should work. Be sure to make a pull request!
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)