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
b071279c
Commit
b071279c
authored
2 years ago
by
Amanda Sanjuan Sánchez
Browse files
Options
Downloads
Patches
Plain Diff
Some bugs fixed
parent
acf09efe
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
+23
-3
23 additions, 3 deletions
...essor/processor_force_torque_inertial_preint_dynamics.cpp
test/gtest_factor_force_torque_inertial_dynamics.cpp
+3
-0
3 additions, 0 deletions
test/gtest_factor_force_torque_inertial_dynamics.cpp
with
26 additions
and
3 deletions
src/processor/processor_force_torque_inertial_preint_dynamics.cpp
+
23
−
3
View file @
b071279c
...
@@ -108,7 +108,10 @@ FactorBasePtr ProcessorForceTorqueInertialPreintDynamics::emplaceFactor(FeatureB
...
@@ -108,7 +108,10 @@ FactorBasePtr ProcessorForceTorqueInertialPreintDynamics::emplaceFactor(FeatureB
void
ProcessorForceTorqueInertialPreintDynamics
::
setCalibration
(
const
CaptureBasePtr
_capture
,
void
ProcessorForceTorqueInertialPreintDynamics
::
setCalibration
(
const
CaptureBasePtr
_capture
,
const
VectorXd
&
_calibration
)
const
VectorXd
&
_calibration
)
{
{
_capture
->
getStateBlock
(
'I'
)
->
setState
(
_calibration
);
// Set IMU bias
_capture
->
getStateBlock
(
'I'
)
->
setState
(
_calibration
.
segment
<
6
>
(
0
));
// Set IMU bias
_capture
->
getStateBlock
(
'C'
)
->
setState
(
_calibration
.
segment
<
3
>
(
6
));
// Set C
_capture
->
getStateBlock
(
'i'
)
->
setState
(
_calibration
.
segment
<
3
>
(
9
));
// Set i
_capture
->
getStateBlock
(
'm'
)
->
setState
(
_calibration
.
segment
<
1
>
(
12
));
// Set m
}
}
void
ProcessorForceTorqueInertialPreintDynamics
::
configure
(
SensorBasePtr
_sensor
)
void
ProcessorForceTorqueInertialPreintDynamics
::
configure
(
SensorBasePtr
_sensor
)
...
@@ -181,9 +184,26 @@ Eigen::VectorXd ProcessorForceTorqueInertialPreintDynamics::correctDelta(const E
...
@@ -181,9 +184,26 @@ Eigen::VectorXd ProcessorForceTorqueInertialPreintDynamics::correctDelta(const E
VectorXd
ProcessorForceTorqueInertialPreintDynamics
::
getCalibration
(
const
CaptureBaseConstPtr
_capture
)
const
VectorXd
ProcessorForceTorqueInertialPreintDynamics
::
getCalibration
(
const
CaptureBaseConstPtr
_capture
)
const
{
{
if
(
_capture
)
if
(
_capture
)
return
_capture
->
getStateBlock
(
'I'
)
->
getState
();
// IMU bias
{
//return _capture->getStateBlock('I')->getState(); // IMU bia
VectorXd
calibration
(
13
);
const
Vector6d
&
I_calib
=
_capture
->
getStateBlock
(
'I'
)
->
getState
();
const
Vector3d
&
C_calib
=
_capture
->
getStateBlock
(
'C'
)
->
getState
();
const
Vector3d
&
i_calib
=
_capture
->
getStateBlock
(
'i'
)
->
getState
();
const
Vector1d
&
m_calib
=
_capture
->
getStateBlock
(
'm'
)
->
getState
();
calibration
<<
I_calib
,
C_calib
,
i_calib
,
m_calib
;
return
calibration
;
}
else
else
return
getSensor
()
->
getStateBlock
(
'I'
)
->
getState
();
// IMU bias
//return getSensor()->getStateBlock('I')->getState(); // IMU bias
{
VectorXd
calibration
(
13
);
const
Vector6d
&
I_calib
=
getSensor
()
->
getStateBlock
(
'I'
)
->
getState
();
const
Vector3d
&
C_calib
=
getSensor
()
->
getStateBlock
(
'C'
)
->
getState
();
const
Vector3d
&
i_calib
=
getSensor
()
->
getStateBlock
(
'i'
)
->
getState
();
const
Vector1d
&
m_calib
=
getSensor
()
->
getStateBlock
(
'm'
)
->
getState
();
calibration
<<
I_calib
,
C_calib
,
i_calib
,
m_calib
;
return
calibration
;
}
}
}
}
/* namespace wolf */
}
/* namespace wolf */
...
...
This diff is collapsed.
Click to expand it.
test/gtest_factor_force_torque_inertial_dynamics.cpp
+
3
−
0
View file @
b071279c
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
#include
"bodydynamics/sensor/sensor_force_torque_inertial.h"
#include
"bodydynamics/sensor/sensor_force_torque_inertial.h"
#include
"bodydynamics/internal/config.h"
#include
"bodydynamics/internal/config.h"
#include
<core/sensor/factory_sensor.h>
#include
<core/utils/utils_gtest.h>
#include
<core/utils/utils_gtest.h>
#include
<core/utils/logging.h>
#include
<core/utils/logging.h>
#include
<core/yaml/parser_yaml.h>
#include
<core/yaml/parser_yaml.h>
...
@@ -169,6 +171,7 @@ class Test_FactorForceTorqueInertialDynamics : public testing::Test
...
@@ -169,6 +171,7 @@ class Test_FactorForceTorqueInertialDynamics : public testing::Test
TEST_F
(
Test_FactorForceTorqueInertialDynamics_yaml
,
constructor
)
TEST_F
(
Test_FactorForceTorqueInertialDynamics_yaml
,
constructor
)
{
{
//FactorySensor::registerCreator("SensorForceTorqueInertial", SensorForceTorqueInertial::create);
ASSERT_EQ
(
c1
->
getCapture
(),
C1
);
ASSERT_EQ
(
c1
->
getCapture
(),
C1
);
ASSERT_EQ
(
c1
->
getCalibPreint
().
size
(),
13
);
ASSERT_EQ
(
c1
->
getCalibPreint
().
size
(),
13
);
}
}
...
...
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