Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pinocchio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Stack Of Tasks
pinocchio
Commits
c2900ab8
Commit
c2900ab8
authored
8 years ago
by
jcarpent
Browse files
Options
Downloads
Patches
Plain Diff
[C++] Add dis method to joint + remove useless constness const
parent
088561f6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/multibody/joint/joint-base.hpp
+22
-5
22 additions, 5 deletions
src/multibody/joint/joint-base.hpp
with
22 additions
and
5 deletions
src/multibody/joint/joint-base.hpp
+
22
−
5
View file @
c2900ab8
...
...
@@ -353,19 +353,36 @@ namespace se3
int
i_q
;
// Index of the joint configuration in the joint configuration vector.
int
i_v
;
// Index of the joint velocity in the joint velocity vector.
int
nv
()
const
{
return
derived
().
nv_impl
();
}
int
nq
()
const
{
return
derived
().
nq_impl
();
}
// Both _impl methods are reimplemented by dynamic-size joints.
int
nv_impl
()
const
{
return
NV
;
}
int
nq_impl
()
const
{
return
NQ
;
}
const
int
&
idx_q
()
const
{
return
i_q
;
}
const
int
&
idx_v
()
const
{
return
i_v
;
}
const
JointIndex
&
id
()
const
{
return
i_id
;
}
int
idx_q
()
const
{
return
i_q
;
}
int
idx_v
()
const
{
return
i_v
;
}
JointIndex
id
()
const
{
return
i_id
;
}
void
setIndexes
(
JointIndex
id
,
int
q
,
int
v
)
{
i_id
=
id
,
i_q
=
q
;
i_v
=
v
;
}
void
disp
(
std
::
ostream
&
os
)
const
{
using
namespace
std
;
os
<<
shortname
()
<<
endl
<<
" index: "
<<
i_id
<<
endl
<<
" index q: "
<<
i_q
<<
endl
<<
" index v: "
<<
i_v
<<
endl
<<
" nq: "
<<
nq
()
<<
endl
<<
" nv: "
<<
nv
()
<<
endl
;
}
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
JointModelBase
<
Derived
>
&
joint
)
{
joint
.
disp
(
os
);
return
os
;
}
std
::
string
shortname
()
const
{
return
derived
().
shortname
();
}
...
...
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