Comments (2)
Ive been working on something similar, my idea was to use it to compensate for tilt, so the mower position would be evaluated at the bottom of the wheels, but it can be used to select any arbitrary virtual antenna position.
Its a bit messy, it would be better to use the quaternion we get dirrectly from the imu but I havent gotten around to do that, using a 6dof imu complicates things too.
Here is how it looks like:
//update heading first
if ((imuDriver.imuFound) && (maps.useIMU)) {
// IMU available and should be used by planner
stateDelta = scalePI(stateDelta + stateDeltaIMU );
} else {
// odometry
stateDelta = scalePI(stateDelta + deltaOdometry);
}
quat_t x; x.setRotation({1,0,0}, imuDriver.pitch, false);
quat_t y; y.setRotation({0,1,0}, imuDriver.roll, false);
quat_t z; z.setRotation({0,0,1}, stateDelta, false);
quat_t rot = (z*y*x).norm();
vec3_t forward = rot.rotate({1,0,0}, GLOBAL_FRAME).norm();
vec3_t right = rot.rotate({0,-1,0}, GLOBAL_FRAME).norm();
vec3_t up = rot.rotate({0,0,1}, GLOBAL_FRAME).norm();
float posN = 0;
float posE = 0;
if (absolutePosSource){
relativeLL(absolutePosSourceLat, absolutePosSourceLon, gps.lat, gps.lon, posN, posE);
} else {
posN = gps.relPosN;
posE = gps.relPosE;
}
vec3_t tiltOffset = up * (-24.0 / 100.0); //distance from antenna to ground
posN += tiltOffset.y;
posE += tiltOffset.x;
Im using this library for vectors and quaternions.
from sunray.
Nice. I have added quaternions to the IMU software driver (
Sunray/sunray/src/driver/RobotDriver.h
Line 101 in f058a6a
imuDriver.quatW, imuDriver.quatX, imuDriver.quatY, imuDriver.quatZ
from sunray.
Related Issues (20)
- Signaltöne werden in der 1.0.289 nicht so ausgegeben wie beschrieben HOT 1
- Roaming HOT 1
- Making MQTT configurable via Sunray app
- code wastes stack memory on AGCM4 HOT 2
- Compile Error HOT 2
- Unterspannung in Kartendaten speichern
- Dynamic path planning with curve-point-inserter
- Kartendatenformat GeoJSON verwenden HOT 1
- Console running full with same message agter kidnapped detected
- Heatmaps: globale Farbskalen die besser skaliert sind
- Heatmaps: Reaktionszeit der App
- Disable mow motor at obstacle
- Mower correts path too agressively at low speeds. HOT 13
- Corrupt MPU FIFO (MPU6050, MPU9150 etc.) on Raspberry PI (quaternion is outside of acceptable threshold) HOT 2
- Alfred serial robot driver: incorrectly swapping left and right motor encoder values? HOT 1
- compilation error: undeclared 'SIOCGSTAMP_OLD' HOT 2
- cassandra
- docking / charging reporting
- compile warnings
- Obstacle -> back to route, violates the perimeter 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 sunray.