Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
wolf
Commits
8b800d41
Commit
8b800d41
authored
6 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
improvements and a bug fixed in ctr_analytic
parent
809540cf
No related branches found
No related tags found
1 merge request
!243
Constraint prior sensor params
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/constraint_analytic.cpp
+30
-12
30 additions, 12 deletions
src/constraint_analytic.cpp
with
30 additions
and
12 deletions
src/constraint_analytic.cpp
+
30
−
12
View file @
8b800d41
...
@@ -7,9 +7,19 @@ ConstraintAnalytic::ConstraintAnalytic(const std::string& _tp,
...
@@ -7,9 +7,19 @@ ConstraintAnalytic::ConstraintAnalytic(const std::string& _tp,
bool
_apply_loss_function
,
ConstraintStatus
_status
,
bool
_apply_loss_function
,
ConstraintStatus
_status
,
StateBlockPtr
_state0Ptr
,
StateBlockPtr
_state1Ptr
,
StateBlockPtr
_state2Ptr
,
StateBlockPtr
_state3Ptr
,
StateBlockPtr
_state4Ptr
,
StateBlockPtr
_state0Ptr
,
StateBlockPtr
_state1Ptr
,
StateBlockPtr
_state2Ptr
,
StateBlockPtr
_state3Ptr
,
StateBlockPtr
_state4Ptr
,
StateBlockPtr
_state5Ptr
,
StateBlockPtr
_state6Ptr
,
StateBlockPtr
_state7Ptr
,
StateBlockPtr
_state8Ptr
,
StateBlockPtr
_state9Ptr
)
:
StateBlockPtr
_state5Ptr
,
StateBlockPtr
_state6Ptr
,
StateBlockPtr
_state7Ptr
,
StateBlockPtr
_state8Ptr
,
StateBlockPtr
_state9Ptr
)
:
ConstraintBase
(
_tp
,
_apply_loss_function
,
_status
),
ConstraintBase
(
_tp
,
_apply_loss_function
,
_status
),
state_ptr_vector_
({
_state0Ptr
,
_state1Ptr
,
_state2Ptr
,
_state3Ptr
,
_state4Ptr
,
state_ptr_vector_
({
_state0Ptr
,
_state1Ptr
,
_state2Ptr
,
_state3Ptr
,
_state4Ptr
,
_state5Ptr
,
_state6Ptr
,
_state7Ptr
,
_state8Ptr
,
_state9Ptr
})
_state5Ptr
,
_state6Ptr
,
_state7Ptr
,
_state8Ptr
,
_state9Ptr
}),
state_block_sizes_vector_
({
_state0Ptr
?
(
unsigned
int
)
_state0Ptr
->
getSize
()
:
0
,
_state1Ptr
?
(
unsigned
int
)
_state1Ptr
->
getSize
()
:
0
,
_state2Ptr
?
(
unsigned
int
)
_state2Ptr
->
getSize
()
:
0
,
_state3Ptr
?
(
unsigned
int
)
_state3Ptr
->
getSize
()
:
0
,
_state4Ptr
?
(
unsigned
int
)
_state4Ptr
->
getSize
()
:
0
,
_state5Ptr
?
(
unsigned
int
)
_state5Ptr
->
getSize
()
:
0
,
_state6Ptr
?
(
unsigned
int
)
_state6Ptr
->
getSize
()
:
0
,
_state7Ptr
?
(
unsigned
int
)
_state7Ptr
->
getSize
()
:
0
,
_state8Ptr
?
(
unsigned
int
)
_state8Ptr
->
getSize
()
:
0
,
_state9Ptr
?
(
unsigned
int
)
_state9Ptr
->
getSize
()
:
0
})
{
{
resizeVectors
();
resizeVectors
();
}
}
...
@@ -23,9 +33,19 @@ ConstraintAnalytic::ConstraintAnalytic(const std::string& _tp,
...
@@ -23,9 +33,19 @@ ConstraintAnalytic::ConstraintAnalytic(const std::string& _tp,
bool
_apply_loss_function
,
ConstraintStatus
_status
,
bool
_apply_loss_function
,
ConstraintStatus
_status
,
StateBlockPtr
_state0Ptr
,
StateBlockPtr
_state1Ptr
,
StateBlockPtr
_state2Ptr
,
StateBlockPtr
_state3Ptr
,
StateBlockPtr
_state4Ptr
,
StateBlockPtr
_state0Ptr
,
StateBlockPtr
_state1Ptr
,
StateBlockPtr
_state2Ptr
,
StateBlockPtr
_state3Ptr
,
StateBlockPtr
_state4Ptr
,
StateBlockPtr
_state5Ptr
,
StateBlockPtr
_state6Ptr
,
StateBlockPtr
_state7Ptr
,
StateBlockPtr
_state8Ptr
,
StateBlockPtr
_state9Ptr
)
:
StateBlockPtr
_state5Ptr
,
StateBlockPtr
_state6Ptr
,
StateBlockPtr
_state7Ptr
,
StateBlockPtr
_state8Ptr
,
StateBlockPtr
_state9Ptr
)
:
ConstraintBase
(
_tp
,
_frame_other_ptr
,
_capture_other_ptr
,
_feature_other_ptr
,
_landmark_other_ptr
,
_processor_ptr
,
_apply_loss_function
,
_status
),
ConstraintBase
(
_tp
,
_frame_other_ptr
,
_capture_other_ptr
,
_feature_other_ptr
,
_landmark_other_ptr
,
_processor_ptr
,
_apply_loss_function
,
_status
),
state_ptr_vector_
({
_state0Ptr
,
_state1Ptr
,
_state2Ptr
,
_state3Ptr
,
_state4Ptr
,
state_ptr_vector_
({
_state0Ptr
,
_state1Ptr
,
_state2Ptr
,
_state3Ptr
,
_state4Ptr
,
_state5Ptr
,
_state6Ptr
,
_state7Ptr
,
_state8Ptr
,
_state9Ptr
})
_state5Ptr
,
_state6Ptr
,
_state7Ptr
,
_state8Ptr
,
_state9Ptr
}),
state_block_sizes_vector_
({
_state0Ptr
?
(
unsigned
int
)
_state0Ptr
->
getSize
()
:
0
,
_state1Ptr
?
(
unsigned
int
)
_state1Ptr
->
getSize
()
:
0
,
_state2Ptr
?
(
unsigned
int
)
_state2Ptr
->
getSize
()
:
0
,
_state3Ptr
?
(
unsigned
int
)
_state3Ptr
->
getSize
()
:
0
,
_state4Ptr
?
(
unsigned
int
)
_state4Ptr
->
getSize
()
:
0
,
_state5Ptr
?
(
unsigned
int
)
_state5Ptr
->
getSize
()
:
0
,
_state6Ptr
?
(
unsigned
int
)
_state6Ptr
->
getSize
()
:
0
,
_state7Ptr
?
(
unsigned
int
)
_state7Ptr
->
getSize
()
:
0
,
_state8Ptr
?
(
unsigned
int
)
_state8Ptr
->
getSize
()
:
0
,
_state9Ptr
?
(
unsigned
int
)
_state9Ptr
->
getSize
()
:
0
})
{
{
resizeVectors
();
resizeVectors
();
}
}
...
@@ -58,17 +78,15 @@ JacobianMethod ConstraintAnalytic::getJacobianMethod() const
...
@@ -58,17 +78,15 @@ JacobianMethod ConstraintAnalytic::getJacobianMethod() const
void
ConstraintAnalytic
::
resizeVectors
()
void
ConstraintAnalytic
::
resizeVectors
()
{
{
for
(
unsigned
int
ii
=
1
;
ii
<
state_ptr_vector_
.
size
();
ii
++
)
assert
(
state_ptr_vector_
[
0
]
!=
nullptr
&&
"at least one not null state block pointer required"
);
{
if
(
state_ptr_vector_
.
at
(
ii
)
!=
nullptr
)
state_block_sizes_vector_
.
push_back
(
state_ptr_vector_
.
at
(
ii
)
->
getSize
());
else
for
(
unsigned
int
ii
=
1
;
ii
<
state_ptr_vector_
.
size
();
ii
++
)
if
(
state_ptr_vector_
.
at
(
ii
)
==
nullptr
)
{
{
state_ptr_vector_
.
resize
(
ii
);
state_ptr_vector_
.
resize
(
ii
);
state_block_sizes_vector_
.
resize
(
ii
);
break
;
break
;
}
}
}
}
}
}
// namespace wolf
}
// namespace wolf
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