Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
c
d
e
f
g
i
k
l
m
n
p
q
r
s
t
u
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Classes
Class List
Class Hierarchy
Class Members
All
!
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
!
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
f
k
l
m
n
o
p
r
s
t
v
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
:
a
b
c
d
e
g
h
i
l
m
n
o
p
r
s
t
u
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
x
z
Enumerations
Enumerator
b
c
e
f
g
i
l
m
n
o
p
r
s
t
u
v
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
gtsam_unstable
dynamics
tests
testVelocityConstraint3.cpp
Go to the documentation of this file.
1
6
#include <
CppUnitLite/TestHarness.h
>
7
8
#include <
gtsam/inference/Symbol.h
>
9
#include <
gtsam_unstable/dynamics/VelocityConstraint3.h
>
10
11
using namespace
gtsam
;
12
using namespace
gtsam::symbol_shorthand
;
13
14
/* ************************************************************************* */
15
// evaluateError
16
TEST
( testVelocityConstraint3, evaluateError) {
17
18
const
double
tol
= 1
e
-5;
19
const
double
dt
= 1.0;
20
double
x1
(1.0),
x2
(2.0),
v
(1.0);
21
22
// hard constraints don't need a noise model
23
VelocityConstraint3
constraint(
X
(1),
X
(2),
V
(1),
dt
);
24
25
// verify error function
26
EXPECT
(
assert_equal
(Z_1x1, constraint.
evaluateError
(
x1
,
x2
,
v
),
tol
));
27
}
28
29
/* ************************************************************************* */
30
int
main
() {
31
TestResult
tr;
32
return
TestRegistry::runAllTests
(tr);
33
}
34
/* ************************************************************************* */
TestRegistry::runAllTests
static int runAllTests(TestResult &result)
Definition:
TestRegistry.cpp:27
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
EXPECT
#define EXPECT(condition)
Definition:
Test.h:150
TestHarness.h
dt
const double dt
Definition:
testVelocityConstraint.cpp:15
gtsam::symbol_shorthand
Definition:
inference/Symbol.h:147
gtsam::VelocityConstraint3::evaluateError
Vector evaluateError(const double &x1, const double &x2, const double &v, OptionalMatrixType H1, OptionalMatrixType H2, OptionalMatrixType H3) const override
Definition:
VelocityConstraint3.h:42
gtsam::symbol_shorthand::X
Key X(std::uint64_t j)
Definition:
inference/Symbol.h:171
x1
Pose3 x1
Definition:
testPose3.cpp:692
VelocityConstraint3.h
A simple 3-way factor constraining double poses and velocity.
Symbol.h
TestResult
Definition:
TestResult.h:26
main
int main()
Definition:
testVelocityConstraint3.cpp:30
gtsam
traits
Definition:
SFMdata.h:40
gtsam::TEST
TEST(SmartFactorBase, Pinhole)
Definition:
testSmartFactorBase.cpp:38
v
Array< int, Dynamic, 1 > v
Definition:
Array_initializer_list_vector_cxx11.cpp:1
gtsam::assert_equal
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
Definition:
Matrix.cpp:41
gtsam::tol
const G double tol
Definition:
Group.h:79
gtsam::VelocityConstraint3
Definition:
VelocityConstraint3.h:13
gtsam::symbol_shorthand::V
Key V(std::uint64_t j)
Definition:
inference/Symbol.h:169
x2
Pose3 x2(Rot3::Ypr(0.0, 0.0, 0.0), l2)
gtsam
Author(s):
autogenerated on Fri Mar 28 2025 03:08:26