Comments (17)
I've created a fixed version.
https://github.com/arduino-libraries/MadgwickAHRS/blob/master/extras/Visualizer/Visualizer.pde
from arduinocore-arc32.
Thanks @PaulStoffregen, I'll look at integrating your corrected version.
from arduinocore-arc32.
@PaulStoffregen sorry about the delay on this, I finally got round to trying this out today. You're right, the Processing sketch given produces wrong movement for me too. However, when I tried your Processing sketch, I got no movement at all.
Since we've had a release since your original posting, would you mind trying this again with the latest corelibs, IDE and processing?
from arduinocore-arc32.
Sorry, I put all that motion sensor stuff away a couple months ago, to focus on another really important project. I will look at this again, but probably not until after summer.
from arduinocore-arc32.
OK, no worries I'll take a look at it.
from arduinocore-arc32.
Hello, thanks guys for taking a look at it..
just to make sure I am not alone:
Madgwick library available from arduino's official link is different from this, right?
Also, this new (4 month ago) library version will not compile, right?
from arduinocore-arc32.
@bontempos, I am not sure about Paul's version of the library; I only tried "official" one from the Arduino tutorial. But, I'll try Paul's one and let you know what I get.
from arduinocore-arc32.
This example is totally useless out-of-box, I think it's gotten even worse since @PaulStoffregen reported the original issue. Seems like the sketch was written to depend on the default ranges on the Gyro and Accel (setGyroRange() and setAccelerometerRange() are not used), and these defaults must have changed at some point since just moving the board a hair causes the model to spin violently on the screen.
So, I played around with different ranges, and these ones significantly improved the result;
CurieIMU.setGyroRange(2000);
CurieIMU.setAccelerometerRange(16);
But, it seems that the issue Paul originally reported has since been obscured by additional issues.
This whole tutorial probably needs a revamp.
from arduinocore-arc32.
When I worked on this IMU stuff, back in March (2016), I created alternate Arduino & Processing sketches for the visualization. You can find them here:
https://github.com/arduino-libraries/MadgwickAHRS/blob/master/examples/Visualize101/Visualize101.ino
https://github.com/arduino-libraries/MadgwickAHRS/blob/master/extras/Visualizer/Visualizer.pde
Maybe these could be useful as a starting point for updating the tutorial & documentation?
I believe these are correct. Of course, they're based on the CurieIMU API which existed in March. Any problems or fixes should be submitted as issues or pull requests to the MadgwickAHRS repository.
Again, I do not plan to work on IMU stuff until at least October at the very earliest. My only purpose in this message is to point you to that work I did months ago, which might save you some time and avoid duplication of effort. Hope it helps?
from arduinocore-arc32.
One more quick thing... these filter algorithms depend on the gyroscope data rate as well as its range. Even if the range is correct, if you alter the rate of data, you'll skew the results.
I know there is a tremendous desire to keep examples simple, both for the sake of the end user and also on the part of the authors writing them. But distributing examples to the Arduino world where the data rate collected from the gyroscope depends on the speed of the surrounding code and also the specific performance of the Wire library really does a disservice to novice end users. When they attempt to adapt the rate-sensitive example into their own projects, they'll almost certainly change the speed that loop() manages to run. Even if they preserve the rate, when/if the Wire library improves (or worsens) the rate may also change, causing the results to vary.
If you look at the example sketch I wrote for MagwickAHRS, there's an attempt to poll the millis() function and collect the IMU data at a fixed rate.
For the sake of users who will ultimately try to adapt the samples and tutorials, I hope you'll do something similar, so both the data range and data rate are well controlled.
from arduinocore-arc32.
Yes, you're right. Really I want to make use of the BMI160s internal FIFOs to provide an IMU.available() function, as discussed in issue #150, I just haven't had time to do it yet.
Appreciate the extra material, I'll check it out.
from arduinocore-arc32.
The sketches Paul linked are not showing the issues from before so I think the demo is nice. I will run it past some others since I don't have much time with IMU. The image is fairly stable and I don't see the issues with the heading settings causing the pitch and roll to both control the pitch or something like that. I think we should use this.
from arduinocore-arc32.
@russmcinnis Can you verify if this is fixed in Castor or prior?
from arduinocore-arc32.
I was able to see this all working back in August without any issues when it was assigned to me. If we got the correct processor sketch it was working. Because of some other issues I think this issue was left open. The latest activity was January 30, 2017
We had an issue once with a string/number conversion(dtostrf()) later which would cause jitter (Sept. 7, 2016). That was quickly fixed. Then Erik updated the sketch for some new IMU features added on January 23, 2017.
"The CurieIMU library now has the features we were waiting for. I can update this sketch now and work the Arduino docs people this week to get this tutorial updated."
January 24, 2017
"And I have created a pull request in the Madgwick library to update the Visualize101.ino sketch it contains."
arduino-libraries/MadgwickAHRS#16
January 30, 2017 "No updates-- still waiting for release to Arduino before changing public tutorial."
from arduinocore-arc32.
@kitsunami please understand that the work to fix this issue has been done, we have the right sketch code for this tutorial to be updated. However, we can't change the public tutorial on arduino.cc until the next corelibs release is available in the IDE, since the sketch code wouldn't compile otherwise.
Since this ticket is specifically regarding that public tutorial not working, I am not going to close this until we're able to update the tutorial.
from arduinocore-arc32.
To be verified after Deneb release.
from arduinocore-arc32.
@eriknyquist and @PaulStoffregen (FYI). See this post on FIFO implementation. https://forum.arduino.cc/index.php?topic=462729.0
from arduinocore-arc32.
Related Issues (20)
- Error compiling for board Arduino/Genuino 101. HOT 7
- Peripheral not connectable when broadcasting characteristic value
- Incorrect capitalization of true in CurieIMU documentation HOT 3
- some EEPROM.CPP ERROR HOT 1
- SPI.beginTransaction allows SPISettings faster than 8 MHz
- Cannot discover attributes HOT 1
- Limited error messages, when selecting the wrong COM port
- How to using UART ISR ?
- [Urgent][Stuck Problem] BLE setValue in callback function!
- Can't send BLE data less than 25ms? HOT 3
- Crashing when three or more characteristics are updated every 30ms? HOT 1
- CurieBLE - BLECommon dosen't existe .. HOT 2
- CurieBLE for HM-11
- Should extra_flags be empty in platform.txt? HOT 1
- SoftwareSerial core library
- IPAddress missing definition of operator!=()
- When I try to upload a simple sketch to the Arduino 101, I get the following error on Mac M1 (macOS Monterey) HOT 3
- No tag for 2.0.6 release
- error: #error "This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor." #error "This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor." HOT 2
- Placing the breadboard with BMI160 to horizontally(remapping axis) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinocore-arc32.