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
1261502a
Commit
1261502a
authored
5 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Patches
Plain Diff
Modify Wolf elements' labels in Problem::print()
parent
58e114a9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!340
Resolve "Problem::check() more exhaustive"
Pipeline
#4990
passed
5 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/problem/problem.cpp
+24
-24
24 additions, 24 deletions
src/problem/problem.cpp
with
24 additions
and
24 deletions
src/problem/problem.cpp
+
24
−
24
View file @
1261502a
...
@@ -885,7 +885,7 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
...
@@ -885,7 +885,7 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
// Sensors =======================================================================================
// Sensors =======================================================================================
for
(
auto
S
:
getHardware
()
->
getSensorList
())
for
(
auto
S
:
getHardware
()
->
getSensorList
())
{
{
cout
<<
" S"
<<
S
->
id
()
<<
" "
<<
S
->
getType
()
<<
"
\"
"
<<
S
->
getName
()
<<
"
\"
"
;
cout
<<
" S
en
"
<<
S
->
id
()
<<
" "
<<
S
->
getType
()
<<
"
\"
"
<<
S
->
getName
()
<<
"
\"
"
;
if
(
depth
<
2
)
if
(
depth
<
2
)
cout
<<
" -- "
<<
S
->
getProcessorList
().
size
()
<<
"p"
;
cout
<<
" -- "
<<
S
->
getProcessorList
().
size
()
<<
"p"
;
cout
<<
endl
;
cout
<<
endl
;
...
@@ -929,28 +929,28 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
...
@@ -929,28 +929,28 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
{
{
if
(
p
->
isMotion
())
if
(
p
->
isMotion
())
{
{
std
::
cout
<<
"
pm
"
<<
p
->
id
()
<<
" "
<<
p
->
getType
()
<<
"
\"
"
<<
p
->
getName
()
<<
"
\"
"
<<
endl
;
std
::
cout
<<
"
PrcM
"
<<
p
->
id
()
<<
" "
<<
p
->
getType
()
<<
"
\"
"
<<
p
->
getName
()
<<
"
\"
"
<<
endl
;
ProcessorMotionPtr
pm
=
std
::
static_pointer_cast
<
ProcessorMotion
>
(
p
);
ProcessorMotionPtr
pm
=
std
::
static_pointer_cast
<
ProcessorMotion
>
(
p
);
if
(
pm
->
getOrigin
())
if
(
pm
->
getOrigin
())
cout
<<
" o: C"
<<
pm
->
getOrigin
()
->
id
()
<<
" - "
<<
(
pm
->
getOrigin
()
->
getFrame
()
->
isKeyOrAux
()
?
(
pm
->
getOrigin
()
->
getFrame
()
->
isKey
()
?
" KF"
:
" A
uxF
"
)
:
" F"
)
cout
<<
" o: C"
<<
pm
->
getOrigin
()
->
id
()
<<
" - "
<<
(
pm
->
getOrigin
()
->
getFrame
()
->
isKeyOrAux
()
?
(
pm
->
getOrigin
()
->
getFrame
()
->
isKey
()
?
" KF
rm
"
:
" A
Frm
"
)
:
" F
rm
"
)
<<
pm
->
getOrigin
()
->
getFrame
()
->
id
()
<<
endl
;
<<
pm
->
getOrigin
()
->
getFrame
()
->
id
()
<<
endl
;
if
(
pm
->
getLast
())
if
(
pm
->
getLast
())
cout
<<
" l: C"
<<
pm
->
getLast
()
->
id
()
<<
" - "
<<
(
pm
->
getLast
()
->
getFrame
()
->
isKeyOrAux
()
?
(
pm
->
getLast
()
->
getFrame
()
->
isKey
()
?
" KF"
:
" A
uxF
"
)
:
" F"
)
cout
<<
" l: C"
<<
pm
->
getLast
()
->
id
()
<<
" - "
<<
(
pm
->
getLast
()
->
getFrame
()
->
isKeyOrAux
()
?
(
pm
->
getLast
()
->
getFrame
()
->
isKey
()
?
" KF
rm
"
:
" A
Frm
"
)
:
" F
rm
"
)
<<
pm
->
getLast
()
->
getFrame
()
->
id
()
<<
endl
;
<<
pm
->
getLast
()
->
getFrame
()
->
id
()
<<
endl
;
if
(
pm
->
getIncoming
())
if
(
pm
->
getIncoming
())
cout
<<
" i: C"
<<
pm
->
getIncoming
()
->
id
()
<<
endl
;
cout
<<
" i: C"
<<
pm
->
getIncoming
()
->
id
()
<<
endl
;
}
}
else
else
{
{
cout
<<
"
pt
"
<<
p
->
id
()
<<
" "
<<
p
->
getType
()
<<
"
\"
"
<<
p
->
getName
()
<<
"
\"
"
<<
endl
;
cout
<<
"
PrcT
"
<<
p
->
id
()
<<
" "
<<
p
->
getType
()
<<
"
\"
"
<<
p
->
getName
()
<<
"
\"
"
<<
endl
;
ProcessorTrackerPtr
pt
=
std
::
dynamic_pointer_cast
<
ProcessorTracker
>
(
p
);
ProcessorTrackerPtr
pt
=
std
::
dynamic_pointer_cast
<
ProcessorTracker
>
(
p
);
if
(
pt
)
if
(
pt
)
{
{
if
(
pt
->
getOrigin
())
if
(
pt
->
getOrigin
())
cout
<<
" o: C"
<<
pt
->
getOrigin
()
->
id
()
<<
" - "
<<
(
pt
->
getOrigin
()
->
getFrame
()
->
isKeyOrAux
()
?
(
pt
->
getOrigin
()
->
getFrame
()
->
isKey
()
?
" KF"
:
" A
uxF
"
)
:
" F"
)
cout
<<
" o: C"
<<
pt
->
getOrigin
()
->
id
()
<<
" - "
<<
(
pt
->
getOrigin
()
->
getFrame
()
->
isKeyOrAux
()
?
(
pt
->
getOrigin
()
->
getFrame
()
->
isKey
()
?
" KF
rm
"
:
" A
Frm
"
)
:
" F
rm
"
)
<<
pt
->
getOrigin
()
->
getFrame
()
->
id
()
<<
endl
;
<<
pt
->
getOrigin
()
->
getFrame
()
->
id
()
<<
endl
;
if
(
pt
->
getLast
())
if
(
pt
->
getLast
())
cout
<<
" l: C"
<<
pt
->
getLast
()
->
id
()
<<
" - "
<<
(
pt
->
getLast
()
->
getFrame
()
->
isKeyOrAux
()
?
(
pt
->
getLast
()
->
getFrame
()
->
isKey
()
?
" KF"
:
" A
uxF
"
)
:
" F"
)
cout
<<
" l: C"
<<
pt
->
getLast
()
->
id
()
<<
" - "
<<
(
pt
->
getLast
()
->
getFrame
()
->
isKeyOrAux
()
?
(
pt
->
getLast
()
->
getFrame
()
->
isKey
()
?
" KF
rm
"
:
" A
Frm
"
)
:
" F
rm
"
)
<<
pt
->
getLast
()
->
getFrame
()
->
id
()
<<
endl
;
<<
pt
->
getLast
()
->
getFrame
()
->
id
()
<<
endl
;
if
(
pt
->
getIncoming
())
if
(
pt
->
getIncoming
())
cout
<<
" i: C"
<<
pt
->
getIncoming
()
->
id
()
<<
endl
;
cout
<<
" i: C"
<<
pt
->
getIncoming
()
->
id
()
<<
endl
;
...
@@ -966,12 +966,12 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
...
@@ -966,12 +966,12 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
// Frames =======================================================================================
// Frames =======================================================================================
for
(
auto
F
:
getTrajectory
()
->
getFrameList
())
for
(
auto
F
:
getTrajectory
()
->
getFrameList
())
{
{
cout
<<
(
F
->
isKeyOrAux
()
?
(
F
->
isKey
()
?
" KF"
:
" A
uxF
"
)
:
" F"
)
<<
F
->
id
()
<<
((
depth
<
2
)
?
" -- "
+
std
::
to_string
(
F
->
getCaptureList
().
size
())
+
"C "
:
""
);
cout
<<
(
F
->
isKeyOrAux
()
?
(
F
->
isKey
()
?
" KF
rm
"
:
" A
Frm
"
)
:
" F
rm
"
)
<<
F
->
id
()
<<
((
depth
<
2
)
?
" -- "
+
std
::
to_string
(
F
->
getCaptureList
().
size
())
+
"C "
:
""
);
if
(
constr_by
)
if
(
constr_by
)
{
{
cout
<<
" <-- "
;
cout
<<
" <-- "
;
for
(
auto
cby
:
F
->
getConstrainedByList
())
for
(
auto
cby
:
F
->
getConstrainedByList
())
cout
<<
"c"
<<
cby
->
id
()
<<
"
\t
"
;
cout
<<
"
Fa
c"
<<
cby
->
id
()
<<
"
\t
"
;
}
}
cout
<<
endl
;
cout
<<
endl
;
if
(
metric
)
if
(
metric
)
...
@@ -995,11 +995,11 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
...
@@ -995,11 +995,11 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
// Captures =======================================================================================
// Captures =======================================================================================
for
(
auto
C
:
F
->
getCaptureList
())
for
(
auto
C
:
F
->
getCaptureList
())
{
{
cout
<<
" C"
<<
(
C
->
isMotion
()
?
"M"
:
""
)
<<
C
->
id
()
<<
" "
<<
C
->
getType
();
cout
<<
" C
ap
"
<<
(
C
->
isMotion
()
?
"M"
:
""
)
<<
C
->
id
()
<<
" "
<<
C
->
getType
();
if
(
C
->
getSensor
()
!=
nullptr
)
if
(
C
->
getSensor
()
!=
nullptr
)
{
{
cout
<<
" -> S"
<<
C
->
getSensor
()
->
id
();
cout
<<
" -> S
en
"
<<
C
->
getSensor
()
->
id
();
}
}
else
else
cout
<<
" -> S-"
;
cout
<<
" -> S-"
;
...
@@ -1008,9 +1008,9 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
...
@@ -1008,9 +1008,9 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
auto
CM
=
std
::
static_pointer_cast
<
CaptureMotion
>
(
C
);
auto
CM
=
std
::
static_pointer_cast
<
CaptureMotion
>
(
C
);
if
(
auto
OC
=
CM
->
getOriginCapture
())
if
(
auto
OC
=
CM
->
getOriginCapture
())
{
{
cout
<<
" -> OC"
<<
OC
->
id
();
cout
<<
" -> OC
ap
"
<<
OC
->
id
();
if
(
auto
OF
=
OC
->
getFrame
())
if
(
auto
OF
=
OC
->
getFrame
())
cout
<<
" ; OF"
<<
OF
->
id
();
cout
<<
" ; OF
rm
"
<<
OF
->
id
();
}
}
}
}
...
@@ -1019,7 +1019,7 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
...
@@ -1019,7 +1019,7 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
{
{
cout
<<
" <-- "
;
cout
<<
" <-- "
;
for
(
auto
cby
:
C
->
getConstrainedByList
())
for
(
auto
cby
:
C
->
getConstrainedByList
())
cout
<<
"c"
<<
cby
->
id
()
<<
"
\t
"
;
cout
<<
"
Fa
c"
<<
cby
->
id
()
<<
"
\t
"
;
}
}
cout
<<
endl
;
cout
<<
endl
;
...
@@ -1058,12 +1058,12 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
...
@@ -1058,12 +1058,12 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
// Features =======================================================================================
// Features =======================================================================================
for
(
auto
f
:
C
->
getFeatureList
())
for
(
auto
f
:
C
->
getFeatureList
())
{
{
cout
<<
"
f
"
<<
f
->
id
()
<<
" trk"
<<
f
->
trackId
()
<<
" "
<<
f
->
getType
()
<<
((
depth
<
4
)
?
" -- "
+
std
::
to_string
(
f
->
getFactorList
().
size
())
+
"c "
:
""
);
cout
<<
"
Ftr
"
<<
f
->
id
()
<<
" trk"
<<
f
->
trackId
()
<<
" "
<<
f
->
getType
()
<<
((
depth
<
4
)
?
" -- "
+
std
::
to_string
(
f
->
getFactorList
().
size
())
+
"c "
:
""
);
if
(
constr_by
)
if
(
constr_by
)
{
{
cout
<<
" <--
\t
"
;
cout
<<
" <--
\t
"
;
for
(
auto
cby
:
f
->
getConstrainedByList
())
for
(
auto
cby
:
f
->
getConstrainedByList
())
cout
<<
"c"
<<
cby
->
id
()
<<
"
\t
"
;
cout
<<
"
Fa
c"
<<
cby
->
id
()
<<
"
\t
"
;
}
}
cout
<<
endl
;
cout
<<
endl
;
if
(
metric
)
if
(
metric
)
...
@@ -1074,17 +1074,17 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
...
@@ -1074,17 +1074,17 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
// Factors =======================================================================================
// Factors =======================================================================================
for
(
auto
c
:
f
->
getFactorList
())
for
(
auto
c
:
f
->
getFactorList
())
{
{
cout
<<
" c"
<<
c
->
id
()
<<
" "
<<
c
->
getType
()
<<
" -->"
;
cout
<<
"
Fa
c"
<<
c
->
id
()
<<
" "
<<
c
->
getType
()
<<
" -->"
;
if
(
c
->
getFrameOther
()
==
nullptr
&&
c
->
getCaptureOther
()
==
nullptr
&&
c
->
getFeatureOther
()
==
nullptr
&&
c
->
getLandmarkOther
()
==
nullptr
)
if
(
c
->
getFrameOther
()
==
nullptr
&&
c
->
getCaptureOther
()
==
nullptr
&&
c
->
getFeatureOther
()
==
nullptr
&&
c
->
getLandmarkOther
()
==
nullptr
)
cout
<<
" A"
;
cout
<<
" A
bs
"
;
if
(
c
->
getFrameOther
()
!=
nullptr
)
if
(
c
->
getFrameOther
()
!=
nullptr
)
cout
<<
" F"
<<
c
->
getFrameOther
()
->
id
();
cout
<<
" F
rm
"
<<
c
->
getFrameOther
()
->
id
();
if
(
c
->
getCaptureOther
()
!=
nullptr
)
if
(
c
->
getCaptureOther
()
!=
nullptr
)
cout
<<
" C"
<<
c
->
getCaptureOther
()
->
id
();
cout
<<
" C
ap
"
<<
c
->
getCaptureOther
()
->
id
();
if
(
c
->
getFeatureOther
()
!=
nullptr
)
if
(
c
->
getFeatureOther
()
!=
nullptr
)
cout
<<
"
f
"
<<
c
->
getFeatureOther
()
->
id
();
cout
<<
"
Fac
"
<<
c
->
getFeatureOther
()
->
id
();
if
(
c
->
getLandmarkOther
()
!=
nullptr
)
if
(
c
->
getLandmarkOther
()
!=
nullptr
)
cout
<<
" L"
<<
c
->
getLandmarkOther
()
->
id
();
cout
<<
" L
mk
"
<<
c
->
getLandmarkOther
()
->
id
();
cout
<<
endl
;
cout
<<
endl
;
}
// for c
}
// for c
}
}
...
@@ -1100,12 +1100,12 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
...
@@ -1100,12 +1100,12 @@ void Problem::print(int depth, bool constr_by, bool metric, bool state_blocks) c
// Landmarks =======================================================================================
// Landmarks =======================================================================================
for
(
auto
L
:
getMap
()
->
getLandmarkList
())
for
(
auto
L
:
getMap
()
->
getLandmarkList
())
{
{
cout
<<
" L"
<<
L
->
id
()
<<
" "
<<
L
->
getType
();
cout
<<
" L
mk
"
<<
L
->
id
()
<<
" "
<<
L
->
getType
();
if
(
constr_by
)
if
(
constr_by
)
{
{
cout
<<
"
\t
<-- "
;
cout
<<
"
\t
<-- "
;
for
(
auto
cby
:
L
->
getConstrainedByList
())
for
(
auto
cby
:
L
->
getConstrainedByList
())
cout
<<
"c"
<<
cby
->
id
()
<<
"
\t
"
;
cout
<<
"
Fa
c"
<<
cby
->
id
()
<<
"
\t
"
;
}
}
cout
<<
endl
;
cout
<<
endl
;
if
(
metric
)
if
(
metric
)
...
...
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