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
b4f7b70c
Commit
b4f7b70c
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Add frame structure string
parent
a025de77
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!323
Resolve "New data structure for storing stateblocks"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/frame/frame_base.h
+1
-0
1 addition, 0 deletions
include/core/frame/frame_base.h
src/frame/frame_base.cpp
+21
-0
21 additions, 0 deletions
src/frame/frame_base.cpp
with
22 additions
and
0 deletions
include/core/frame/frame_base.h
+
1
−
0
View file @
b4f7b70c
...
...
@@ -39,6 +39,7 @@ class FrameBase : public NodeBase, public HasStateBlocks, public std::enable_sha
TrajectoryBaseWPtr
trajectory_ptr_
;
CaptureBasePtrList
capture_list_
;
FactorBasePtrList
constrained_by_list_
;
std
::
string
structure_
;
// std::vector<StateBlockPtr> state_block_vec_; ///< vector of state blocks, in the order: Position, Orientation, Velocity.
static
unsigned
int
frame_id_count_
;
...
...
This diff is collapsed.
Click to expand it.
src/frame/frame_base.cpp
+
21
−
0
View file @
b4f7b70c
...
...
@@ -14,17 +14,27 @@ unsigned int FrameBase::frame_id_count_ = 0;
FrameBase
::
FrameBase
(
const
TimeStamp
&
_ts
,
StateBlockPtr
_p_ptr
,
StateBlockPtr
_o_ptr
,
StateBlockPtr
_v_ptr
)
:
NodeBase
(
"FRAME"
,
"Base"
),
trajectory_ptr_
(),
structure_
(
""
),
// state_block_vec_(3), // allow for 3 state blocks by default. Resize in derived constructors if needed.
frame_id_
(
++
frame_id_count_
),
type_
(
NON_ESTIMATED
),
time_stamp_
(
_ts
)
{
if
(
_p_ptr
)
{
setStateBlock
(
"P"
,
_p_ptr
);
structure_
+=
"P"
;
}
if
(
_o_ptr
)
{
setStateBlock
(
"O"
,
_o_ptr
);
structure_
+=
"O"
;
}
if
(
_v_ptr
)
{
setStateBlock
(
"V"
,
_v_ptr
);
structure_
+=
"V"
;
}
// state_block_vec_[0] = _p_ptr;
// state_block_vec_[1] = _o_ptr;
// state_block_vec_[2] = _v_ptr;
...
...
@@ -33,17 +43,27 @@ FrameBase::FrameBase(const TimeStamp& _ts, StateBlockPtr _p_ptr, StateBlockPtr _
FrameBase
::
FrameBase
(
const
FrameType
&
_tp
,
const
TimeStamp
&
_ts
,
StateBlockPtr
_p_ptr
,
StateBlockPtr
_o_ptr
,
StateBlockPtr
_v_ptr
)
:
NodeBase
(
"FRAME"
,
"Base"
),
trajectory_ptr_
(),
structure_
(
""
),
// state_block_vec_(3), // allow for 3 state blocks by default. Resize in derived constructors if needed.
frame_id_
(
++
frame_id_count_
),
type_
(
_tp
),
time_stamp_
(
_ts
)
{
if
(
_p_ptr
)
{
setStateBlock
(
"P"
,
_p_ptr
);
structure_
+=
"P"
;
}
if
(
_o_ptr
)
{
setStateBlock
(
"O"
,
_o_ptr
);
structure_
+=
"O"
;
}
if
(
_v_ptr
)
{
setStateBlock
(
"V"
,
_v_ptr
);
structure_
+=
"V"
;
}
// state_block_vec_[0] = _p_ptr;
// state_block_vec_[1] = _o_ptr;
// state_block_vec_[2] = _v_ptr;
...
...
@@ -52,6 +72,7 @@ FrameBase::FrameBase(const FrameType & _tp, const TimeStamp& _ts, StateBlockPtr
FrameBase
::
FrameBase
(
const
std
::
string
_frame_structure
,
const
SizeEigen
_dim
,
const
FrameType
&
_tp
,
const
TimeStamp
&
_ts
,
const
Eigen
::
VectorXs
&
_x
)
:
NodeBase
(
"FRAME"
,
"Base"
),
trajectory_ptr_
(),
structure_
(
_frame_structure
),
// state_block_vec_(3), // allow for 3 state blocks by default. Resize in derived constructors if needed.
frame_id_
(
++
frame_id_count_
),
type_
(
_tp
),
...
...
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