Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-manipulation
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
Humanoid Path Planner
hpp-manipulation
Commits
88ea5194
Commit
88ea5194
authored
9 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use Containers class instead of Container
parent
f5671375
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/hpp/manipulation/device.hh
+13
-47
13 additions, 47 deletions
include/hpp/manipulation/device.hh
src/device.cc
+2
-2
2 additions, 2 deletions
src/device.cc
with
15 additions
and
49 deletions
include/hpp/manipulation/device.hh
+
13
−
47
View file @
88ea5194
...
@@ -34,15 +34,23 @@ namespace hpp {
...
@@ -34,15 +34,23 @@ namespace hpp {
/// it is compatible with hpp::model::urdf::loadHumanoidRobot
/// it is compatible with hpp::model::urdf::loadHumanoidRobot
///
///
/// This class also contains model::Gripper, Handle and \ref JointAndTriangles_t
/// This class also contains model::Gripper, Handle and \ref JointAndTriangles_t
class
HPP_MANIPULATION_DLLAPI
Device
:
public
model
::
HumanoidRobot
,
class
HPP_MANIPULATION_DLLAPI
Device
:
protected
core
::
Container
<
HandlePtr_t
>
,
public
model
::
HumanoidRobot
,
protected
core
::
Container
<
model
::
GripperPtr_t
>
,
public
core
::
Containers
<
protected
core
::
Container
<
JointAndShapes_t
>
,
boost
::
mpl
::
vector
<
HandlePtr_t
,
protected
core
::
Container
<
model
::
JointVector_t
>
model
::
GripperPtr_t
,
JointAndShapes_t
,
model
::
JointVector_t
>
>
{
{
public:
public:
typedef
model
::
HumanoidRobot
Parent_t
;
typedef
model
::
HumanoidRobot
Parent_t
;
typedef
core
::
Containers
<
boost
::
mpl
::
vector
<
HandlePtr_t
,
model
::
GripperPtr_t
,
JointAndShapes_t
,
model
::
JointVector_t
>
>
Containers_t
;
/// Constructor
/// Constructor
/// \param name of the new instance,
/// \param name of the new instance,
static
DevicePtr_t
create
(
const
std
::
string
&
name
)
static
DevicePtr_t
create
(
const
std
::
string
&
name
)
...
@@ -56,48 +64,6 @@ namespace hpp {
...
@@ -56,48 +64,6 @@ namespace hpp {
/// Print object in a stream
/// Print object in a stream
virtual
std
::
ostream
&
print
(
std
::
ostream
&
os
)
const
;
virtual
std
::
ostream
&
print
(
std
::
ostream
&
os
)
const
;
/// \name Accessors to container elements
/// Contained elements are of type model::Gripper, Handle and
/// \ref JointAndTriangles_t
/// \{
/// Get an element of a container
template
<
typename
Element
>
const
Element
&
get
(
const
std
::
string
&
name
)
const
{
return
core
::
Container
<
Element
>::
get
(
name
);
}
/// Check if a Container has a key.
template
<
typename
Element
>
bool
has
(
const
std
::
string
&
name
)
const
{
return
core
::
Container
<
Element
>::
has
(
name
);
}
/// Get the keys of a container
template
<
typename
Element
,
typename
ReturnType
>
ReturnType
getKeys
()
const
{
return
core
::
Container
<
Element
>::
template
getKeys
<
ReturnType
>
();
}
/// Get the underlying map of a container
template
<
typename
Element
>
const
typename
core
::
Container
<
Element
>::
ElementMap_t
&
getAll
()
const
{
return
core
::
Container
<
Element
>::
getAll
();
}
/// Add an element to a container
template
<
typename
Element
>
void
add
(
const
std
::
string
&
name
,
const
Element
&
element
)
{
core
::
Container
<
Element
>::
add
(
name
,
element
);
}
/// \}
/// \name Collisions
/// \name Collisions
/// \{
/// \{
...
...
This diff is collapsed.
Click to expand it.
src/device.cc
+
2
−
2
View file @
88ea5194
...
@@ -58,10 +58,10 @@ namespace hpp {
...
@@ -58,10 +58,10 @@ namespace hpp {
Parent_t
::
print
(
os
);
Parent_t
::
print
(
os
);
// print handles
// print handles
os
<<
"Handles:"
<<
std
::
endl
;
os
<<
"Handles:"
<<
std
::
endl
;
Container
<
HandlePtr_t
>
::
printPointer
(
os
);
Container
s_t
::
print
<
HandlePtr_t
>
(
os
);
// print grippers
// print grippers
os
<<
"Grippers:"
<<
std
::
endl
;
os
<<
"Grippers:"
<<
std
::
endl
;
Container
<
model
::
GripperPtr_t
>
::
printPointer
(
os
);
Container
s_t
::
print
<
model
::
GripperPtr_t
>
(
os
);
return
os
;
return
os
;
}
}
...
...
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