|
imu_stim300
|
The task context provides and requires services. It uses an ExecutionEngine to perform its functions. Essential interfaces are operations, data flow ports and properties. These interfaces have been defined using the oroGen specification. In order to modify the interfaces you should (re)use oroGen and rely on the associated workflow. More...
#include <Task.hpp>
Public Member Functions | |
| Task (std::string const &name="imu_stim300::Task") | |
| Task (std::string const &name, RTT::ExecutionEngine *engine) | |
| ~Task () | |
| bool | configureHook () |
| The following lines are template definitions for the various state machine. More... | |
| bool | startHook () |
| void | updateHook () |
| void | errorHook () |
| void | stopHook () |
| void | cleanupHook () |
| Eigen::Quaternion< double > | deltaHeading (const Eigen::Vector3d &angvelo, Eigen::Matrix4d &oldomega, const double delta_t) |
| void | outputPortSamples (imu_stim300::Stim300Base *driver, filter::Ikf< double, true, true > &myfilter, base::samples::IMUSensors &imusamples) |
| Port out the values. More... | |
Static Public Member Functions | |
| static double | GravityModel (double latitude, double altitude) |
| This computes the theoretical gravity value according to the WGS-84 ellipsoid Earth model. More... | |
| static void | SubtractEarthRotation (Eigen::Vector3d &u, const Eigen::Quaterniond &q, const double latitude) |
| Subtract the Earth rotation from the gyroscopes readout. More... | |
| static Eigen::Quaternion< double > | deltaQuaternion (const Eigen::Vector3d &angvelo, const Eigen::Matrix4d &oldomega4, const Eigen::Matrix4d &omega4, const double dt) |
| Delta quaternion rotation. Integration of small (given by the current angular velo) variation in attitude. More... | |
Protected Attributes | |
| bool | initAttitude |
| unsigned int | initial_alignment_idx |
| FilterConfiguration | config |
| InertialNoiseParameters | accnoise |
| InertialNoiseParameters | gyronoise |
| InertialNoiseParameters | incnoise |
| AdaptiveAttitudeConfig | adaptiveconfigAcc |
| AdaptiveAttitudeConfig | adaptiveconfigInc |
| LocationConfiguration | location |
| base::Time | prev_ts |
| int | correction_numbers |
| int | correction_idx |
| double | sampling_frequency |
| imu_stim300::Stim300Base * | imu_stim300_driver |
| aggregator::TimestampEstimator * | timestamp_estimator |
| Eigen::Vector3d | correctionAcc |
| Eigen::Vector3d | correctionInc |
| Eigen::Matrix< double, 3, Eigen::Dynamic > | initial_alignment_gyro |
| Eigen::Matrix< double, 3, Eigen::Dynamic > | initial_alignment_acc |
| filter::Ikf< double, true, true > | myfilter |
| Eigen::Quaterniond | deltaquat |
| Eigen::Quaterniond | deltahead |
| Eigen::Quaterniond | attitude |
| Eigen::Matrix4d | oldomega |
| base::samples::RigidBodyState | orientation_out |
Friends | |
| class | TaskBase |
The task context provides and requires services. It uses an ExecutionEngine to perform its functions. Essential interfaces are operations, data flow ports and properties. These interfaces have been defined using the oroGen specification. In order to modify the interfaces you should (re)use oroGen and rely on the associated workflow.
Accepted error for the gravity value in [m/s^2]
The name of a TaskContext is primarily defined via:
deployment 'deployment_name'
task('custom_task_name','imu_stim300::Task')
end
It can be dynamically adapted when the deployment is called with a prefix argument.
| Task::Task | ( | std::string const & | name = "imu_stim300::Task" | ) |
the output orientation TaskContext constructor for Task
| name | Name of the task. This name needs to be unique to make it identifiable via nameservices. |
| initial_state | The initial TaskState of the TaskContext. Default is Stopped state. |
| Task::Task | ( | std::string const & | name, |
| RTT::ExecutionEngine * | engine | ||
| ) |
TaskContext constructor for Task
| name | Name of the task. This name needs to be unique to make it identifiable for nameservices. |
| engine | The RTT Execution engine to be used for this task, which serialises the execution of all commands, programs, state machines and incoming events for a task. |
| Task::~Task | ( | ) |
Default deconstructor of Task
| void Task::cleanupHook | ( | ) |
This hook is called by Orocos when the state machine transitions from Stopped to PreOperational, requiring the call to configureHook() before calling start() again.
| bool Task::configureHook | ( | ) |
The following lines are template definitions for the various state machine.
This hook is called by Orocos when the state machine transitions from PreOperational to Stopped. If it returns false, then the component will stay in PreOperational. Otherwise, it goes into Stopped.
It is meaningful only if the #needs_configuration has been specified in the task context definition with (for example):
task_context "TaskName" do needs_configuration ... end
Configuration of the driver
Set the baudrate to the value in the rock property
Set the packageTimeout
Calculate the sampling frequency
Set the frequency
Open the port
Configuration of the attitude filter
Initial vector state
Measurement noise covariance matrix for accelerometers
Measurement noise covariance matrix for gyros
Measurement noise covariance matrix for mag
Measurement noise covariance matrix for inclinometers
Initial covariance matrix
Noise for the gyros bias instability
Noise for the accelerometers bias instability
Noise for the inclinometers bias instability
Read configuration
Configuration of Time estimator
Configuration frequencies
Correction configuration
Noise configuration
Noise depends on frequency bandwidth
Noise depends on frequency bandwidth
Noise depends on frequency bandwidth
Noise depends on frequency bandwidth
Noise depends on frequency bandwidth
It does not have magnetometers
Noise for error in gyros bias instability
Noise for error in accelerometers bias instability
Noise for error in inclinometers bias instability
Initial error covariance
Theoretical Gravity
Initialize the filter, including the adaptive part
Leveling configuration
Set the index to Zero
Set the correction index
Oldomega initial
Initial attitude
Output variable
| Eigen::Quaternion< double > Task::deltaHeading | ( | const Eigen::Vector3d & | angvelo, |
| Eigen::Matrix4d & | oldomega, | ||
| const double | delta_t | ||
| ) |
Performs heading independent integration
|
inlinestatic |
Delta quaternion rotation. Integration of small (given by the current angular velo) variation in attitude.
Identity quaternion
Third-order gyroscopes integration accuracy
| void Task::errorHook | ( | ) |
This hook is called by Orocos when the component is in the RunTimeError state, at each activity step. See the discussion in updateHook() about triggering options.
Call recover() to go back in the Runtime state.
|
inlinestatic |
This computes the theoretical gravity value according to the WGS-84 ellipsoid Earth model.
| [in] | latitude | double the latitude value in radian |
| [in] | altitude | double with the altitude value in meters |
g magnitude at zero altitude
Nominal Gravity model
Gravity affects by the altitude (aprox the value r = Re
| void Task::outputPortSamples | ( | imu_stim300::Stim300Base * | driver, |
| filter::Ikf< double, true, true > & | myfilter, | ||
| base::samples::IMUSensors & | imusamples | ||
| ) |
Port out the values.
Temperature sensors
Temperature on the International Units
Raw calibrated inertial sensor
Compensated and calibrated inertial sensor
| bool Task::startHook | ( | ) |
This hook is called by Orocos when the state machine transitions from Stopped to Running. If it returns false, then the component will stay in Stopped. Otherwise, it goes into Running and updateHook() will be called.
| void Task::stopHook | ( | ) |
This hook is called by Orocos when the state machine transitions from Running to Stopped after stop() has been called.
|
inlinestatic |
Subtract the Earth rotation from the gyroscopes readout.
This function computes the subtraction of the rotation of the Earth (EARTHW) from the gyroscope values. This function uses quaternion of transformation from the geographic to body frame and the latitude in radians.
| [in,out] | u | angular velocity in body frame |
| [in] | q | quaternion from body to geographic(world) frame v_body = q_body_2_geo * v_geo |
| [in] | latitude | location latitude angle in radians |
vector of earth rotation components expressed in the geographic frame according to the latitude
Compute the v vector expressed in the body frame
Subtract the earth rotation to the vector of inputs (u = u-v
| void Task::updateHook | ( | ) |
This hook is called by Orocos when the component is in the Running state, at each activity step. Here, the activity gives the "ticks" when the hook should be called.
The error(), exception() and fatal() calls, when called in this hook, allow to get into the associated RunTimeError, Exception and FatalError states.
In the first case, updateHook() is still called, and recover() allows you to go back into the Running state. In the second case, the errorHook() will be called instead of updateHook(). In Exception, the component is stopped and recover() needs to be called before starting it again. Finally, FatalError cannot be recovered.
Inertial sensor values
Process the current package
Time is current time minus the latency
Package counter incrementation
Checksum is good: Take the sensor values from the driver
Short term solution: the mag carries inclinometers info (FINAL SOLUTION REQUIRES: e.g. to change IMUSensor base/types)
Attitude filter
Calculate the initial alignment to the local geographic frame
Set attitude to identity
Acceleration
Angular velocity
Override the gravity model value with the sensed from the sensors
Compute the local horizontal plane
Set the attitude
The angular velocity in the local horizontal plane
Gyro_ho = Tho_body * gyro_body
Determine the heading or azimuthal orientation
Set the attitude
Compute the Initial Bias
Eliminate Earth rotation
Predict
Accumulate correction measurements
Update/Correction
Timestamp estimator status
Output information
|
friend |
|
protected |
Accelerometers noise parameters
|
protected |
Adaptive Measurement Configuration
|
protected |
|
protected |
|
protected |
Filter configuration values
|
protected |
|
protected |
|
protected |
Correction Variables
|
protected |
|
protected |
|
protected |
The adaptive Indirect Kalman filter
|
protected |
Gyroscopes noise parameters
|
protected |
Driver variables
|
protected |
Inclinometers noise parameters
|
protected |
Initial Attitude
|
protected |
|
protected |
Initial values of Accelerometers/Inclinometers for Pitch and Roll calculation
|
protected |
Index for initializing attitude
|
protected |
Location configuration variables
|
protected |
|
protected |
|
protected |
Output port variables
|
protected |
|
protected |
|
protected |
1.8.13