-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sensors from JSON and more #2821
Changes from 2 commits
00f366f
f6d169f
5402063
41a8698
bcd3e0a
e1b13e8
aa7e96c
a4852eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,8 @@ struct ImuSimpleParams { | |
https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf | ||
For Allan Variance/Deviation plots see http://www.invensense.com/wp-content/uploads/2015/02/MPU-3300-Datasheet.pdf | ||
*/ | ||
Pose relative_pose; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see this being used anywhere? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, although relative pose is being consumed in the initialization of settings, it is not incorporated into the sensor model. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ACLeighner can you either remove this setting or make the corresponding changes in the sensor model. (My guess would be you were in the middle of doing the same?) |
||
|
||
struct Gyroscope { | ||
//angule random walk (ARW) | ||
real_T arw = 0.30f / sqrt(3600.0f) * M_PIf / 180; //deg/sqrt(hour) converted to rad/sqrt(sec) | ||
|
@@ -43,10 +45,35 @@ struct ImuSimpleParams { | |
} accel; | ||
|
||
real_T min_sample_time = 1 / 1000.0f; //internal IMU frequency | ||
|
||
void initializeFromSettings(const AirSimSettings::ImuSetting& settings) | ||
{ | ||
unused(settings); | ||
gyro.arw = settings.gyro_arw; | ||
gyro.tau = settings.gyro_tau; | ||
gyro.bias_stability = settings.gyro_bias_stability; | ||
gyro.turn_on_bias = settings.gyro_turn_on_bias; | ||
|
||
accel.vrw = settings.accel_vrw; | ||
accel.tau = settings.accel_tau; | ||
accel.bias_stability = settings.accel_bias_stability; | ||
accel.turn_on_bias = settings.accel_turn_on_bias; | ||
|
||
relative_pose.position = settings.position; | ||
if (std::isnan(relative_pose.position.x())) | ||
relative_pose.position.x() = 0; | ||
if (std::isnan(relative_pose.position.y())) | ||
relative_pose.position.y() = 0; | ||
if (std::isnan(relative_pose.position.z())) | ||
relative_pose.position.z() = 0; | ||
|
||
float pitch, roll, yaw; | ||
pitch = !std::isnan(settings.rotation.pitch) ? settings.rotation.pitch : 0; | ||
roll = !std::isnan(settings.rotation.roll) ? settings.rotation.roll : 0; | ||
yaw = !std::isnan(settings.rotation.yaw) ? settings.rotation.yaw : 0; | ||
relative_pose.orientation = VectorMath::toQuaternion( | ||
Utils::degreesToRadians(pitch), //pitch - rotation around Y axis | ||
Utils::degreesToRadians(roll), //roll - rotation around X axis | ||
Utils::degreesToRadians(yaw)); //yaw - rotation around Z axis | ||
} | ||
}; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused