Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bodydynamics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
plugins
bodydynamics
Commits
890b8500
Commit
890b8500
authored
2 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Fix Array contruction
parent
6fbc0e4c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!31
devel->main
,
!29
Add functionality for UAV
,
!27
Fix test with acc_x = 2 m/s2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/processor/processor_force_torque_inertial_preint_dynamics.cpp
+10
-8
10 additions, 8 deletions
...essor/processor_force_torque_inertial_preint_dynamics.cpp
test/gtest_solve_problem_force_torque_inertial_dynamics.cpp
+4
-0
4 additions, 0 deletions
test/gtest_solve_problem_force_torque_inertial_dynamics.cpp
with
14 additions
and
8 deletions
src/processor/processor_force_torque_inertial_preint_dynamics.cpp
+
10
−
8
View file @
890b8500
...
@@ -116,10 +116,14 @@ void ProcessorForceTorqueInertialPreintDynamics::emplaceFeaturesAndFactors(Captu
...
@@ -116,10 +116,14 @@ void ProcessorForceTorqueInertialPreintDynamics::emplaceFeaturesAndFactors(Captu
FactorBase
::
emplace
<
FactorForceTorqueInertialDynamics
>
(
FactorBase
::
emplace
<
FactorForceTorqueInertialDynamics
>
(
ftr_fti
,
ftr_fti
,
_capture_origin
,
shared_from_this
(),
params_
->
apply_loss_function
);
ftr_fti
,
ftr_fti
,
_capture_origin
,
shared_from_this
(),
params_
->
apply_loss_function
);
// 2. Feature and factor L -- angular moment
// 2. Feature and factor L -- angular moment
um
//-------------------------------------------
//-------------------------------------------
--
// - feature has the current gyro measurement
// - feature has the current gyro measurement
// - factor relates w_measured, IMU_bias(last capture), L(last capture) and i(sensor)
// - factor relates w_measured, IMU_bias(last capture), L(last capture) and i(sensor)
// auto measurement_gyro = motion.data_.segment<3>(3);
// auto meas_cov = sensor_fti_->getNoiseCov().block<3,3>(3,3); // ??
// 3. Feature and factor bias -- IMU bias drift for acc and gyro
// 3. Feature and factor bias -- IMU bias drift for acc and gyro
//---------------------------------------------------------------
//---------------------------------------------------------------
...
@@ -173,12 +177,10 @@ void ProcessorForceTorqueInertialPreintDynamics::configure(SensorBasePtr _sensor
...
@@ -173,12 +177,10 @@ void ProcessorForceTorqueInertialPreintDynamics::configure(SensorBasePtr _sensor
auto
acc_drift_std
=
sensor_fti_
->
getParamsSensorForceTorqueInertial
()
->
acc_drift_std
;
auto
acc_drift_std
=
sensor_fti_
->
getParamsSensorForceTorqueInertial
()
->
acc_drift_std
;
auto
gyro_drift_std
=
sensor_fti_
->
getParamsSensorForceTorqueInertial
()
->
gyro_drift_std
;
auto
gyro_drift_std
=
sensor_fti_
->
getParamsSensorForceTorqueInertial
()
->
gyro_drift_std
;
gyro_noise_cov_
=
Eigen
::
Array3d
(
gyro_noise_std
,
gyro_noise_std
,
gyro_noise_std
).
square
().
matrix
().
asDiagonal
();
ArrayXd
imu_drift_sigmas
(
6
);
imu_drift_cov_
=
imu_drift_sigmas
<<
acc_drift_std
,
acc_drift_std
,
acc_drift_std
,
gyro_drift_std
,
gyro_drift_std
,
gyro_drift_std
;
Eigen
::
Array
<
double
,
6
,
1
>
(
acc_drift_std
,
acc_drift_std
,
acc_drift_std
,
gyro_drift_std
,
gyro_drift_std
,
gyro_drift_std
)
imu_drift_cov_
=
imu_drift_sigmas
.
square
().
matrix
().
asDiagonal
();
.
square
()
gyro_noise_cov_
=
Array3d
(
gyro_noise_std
,
gyro_noise_std
,
gyro_noise_std
).
square
().
matrix
().
asDiagonal
();
.
matrix
()
.
asDiagonal
();
}
}
void
ProcessorForceTorqueInertialPreintDynamics
::
data2tangent
(
const
Eigen
::
VectorXd
&
_data
,
void
ProcessorForceTorqueInertialPreintDynamics
::
data2tangent
(
const
Eigen
::
VectorXd
&
_data
,
...
...
This diff is collapsed.
Click to expand it.
test/gtest_solve_problem_force_torque_inertial_dynamics.cpp
+
4
−
0
View file @
890b8500
...
@@ -101,6 +101,7 @@ TEST_F(Test_SolveProblemForceTorqueInertialPreintDynamics_yaml, mass_only_hoveri
...
@@ -101,6 +101,7 @@ TEST_F(Test_SolveProblemForceTorqueInertialPreintDynamics_yaml, mass_only_hoveri
S
->
getStateBlock
(
'C'
)
->
fix
();
S
->
getStateBlock
(
'C'
)
->
fix
();
S
->
getStateBlock
(
'i'
)
->
fix
();
S
->
getStateBlock
(
'i'
)
->
fix
();
S
->
getStateBlock
(
'm'
)
->
unfix
();
S
->
getStateBlock
(
'm'
)
->
unfix
();
// S->setStateBlockDynamic('I');
CaptureMotionPtr
C0_0
=
std
::
make_shared
<
CaptureMotion
>
(
"CaptureMotion"
,
0.0
,
S
,
data
,
data_cov
,
nullptr
);
CaptureMotionPtr
C0_0
=
std
::
make_shared
<
CaptureMotion
>
(
"CaptureMotion"
,
0.0
,
S
,
data
,
data_cov
,
nullptr
);
CaptureMotionPtr
C1_0
=
std
::
make_shared
<
CaptureMotion
>
(
"CaptureMotion"
,
0.2
,
S
,
data
,
data_cov
,
nullptr
);
CaptureMotionPtr
C1_0
=
std
::
make_shared
<
CaptureMotion
>
(
"CaptureMotion"
,
0.2
,
S
,
data
,
data_cov
,
nullptr
);
...
@@ -145,6 +146,9 @@ TEST_F(Test_SolveProblemForceTorqueInertialPreintDynamics_yaml, mass_only_hoveri
...
@@ -145,6 +146,9 @@ TEST_F(Test_SolveProblemForceTorqueInertialPreintDynamics_yaml, mass_only_hoveri
WOLF_INFO
(
"-----------------------------"
);
WOLF_INFO
(
"-----------------------------"
);
}
}
P
->
print
(
4
,
1
,
1
,
1
);
ASSERT_NEAR
(
S
->
getStateBlock
(
'm'
)
->
getState
()(
0
),
mass_true
,
1e-3
);
ASSERT_NEAR
(
S
->
getStateBlock
(
'm'
)
->
getState
()(
0
),
mass_true
,
1e-3
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment