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
cbbaf81a
Commit
cbbaf81a
authored
4 years ago
by
Joseph Mirabel
Browse files
Options
Downloads
Patches
Plain Diff
[Minor] Clean code.
parent
81dbbc61
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/handle.cc
+13
-17
13 additions, 17 deletions
src/handle.cc
with
13 additions
and
17 deletions
src/handle.cc
+
13
−
17
View file @
cbbaf81a
...
...
@@ -32,6 +32,7 @@
#include
<hpp/constraints/generic-transformation.hh>
#include
<hpp/constraints/implicit.hh>
#include
<hpp/constraints/explicit/relative-pose.hh>
#include
<hpp/constraints/generic-transformation.hh>
#include
<hpp/manipulation/device.hh>
...
...
@@ -41,11 +42,13 @@ namespace hpp {
using
constraints
::
ImplicitPtr_t
;
using
constraints
::
Explicit
;
using
constraints
::
ExplicitPtr_t
;
using
constraints
::
DifferentiableFunction
;
std
::
string
Handle
::
className
(
"Handle"
);
namespace
{
static
const
matrix3_t
I3
=
matrix3_t
::
Identity
();
struct
ZeroDiffFunc
:
public
constraints
::
DifferentiableFunction
{
struct
ZeroDiffFunc
:
public
DifferentiableFunction
{
ZeroDiffFunc
(
size_type
sIn
,
size_type
sInD
,
std
::
string
name
=
std
::
string
(
"Empty function"
))
:
DifferentiableFunction
(
sIn
,
sInD
,
LiegroupSpace
::
empty
(),
name
)
...
...
@@ -58,9 +61,6 @@ namespace hpp {
};
}
using
constraints
::
Explicit
;
using
constraints
::
DifferentiableFunction
;
bool
isHandleOnFreeflyer
(
const
Handle
&
handle
)
{
const
JointPtr_t
&
joint
=
handle
.
joint
();
...
...
@@ -132,11 +132,9 @@ namespace hpp {
gripper
->
objectPositionInJoint
(),
localPosition
(),
mask_
,
ComparisonTypes_t
(
6
,
constraints
::
EqualToZero
));
}
return
constraints
::
Implicit
::
create
(
constraints
::
RelativeTransformation
::
create
return
Implicit
::
create
(
RelativeTransformation
::
create
(
n
,
robot
(),
gripper
->
joint
(),
joint
(),
gripper
->
objectPositionInJoint
(),
localPosition
(),
mask_
),
gripper
->
objectPositionInJoint
(),
localPosition
(),
mask_
),
ComparisonTypes_t
(
maskSize
(
mask_
),
constraints
::
EqualToZero
));
}
...
...
@@ -156,8 +154,7 @@ namespace hpp {
);
}
else
{
std
::
vector
<
bool
>
Cmask
=
complementMask
(
mask_
);
return
Implicit
::
create
(
constraints
::
RelativeTransformation
::
create
return
Implicit
::
create
(
RelativeTransformation
::
create
(
n
,
r
,
gripper
->
joint
(),
joint
(),
gripper
->
objectPositionInJoint
(),
localPosition
(),
Cmask
),
...
...
@@ -190,24 +187,23 @@ namespace hpp {
gripper
->
objectPositionInJoint
(),
localPosition
(),
std
::
vector
<
bool
>
(
6
,
true
),
comp
);
}
return
Implicit
::
create
(
constraints
::
RelativeTransformation
::
create
return
Implicit
::
create
(
RelativeTransformation
::
create
(
n
,
robot
(),
gripper
->
joint
(),
joint
(),
gripper
->
objectPositionInJoint
(),
localPosition
(),
std
::
vector
<
bool
>
(
6
,
true
)),
comp
);
std
::
vector
<
bool
>
(
6
,
true
)),
comp
);
}
ImplicitPtr_t
Handle
::
createPreGrasp
(
const
GripperPtr_t
&
gripper
,
const
value_type
&
shift
,
std
::
string
n
)
const
{
Transform3f
transform
=
gripper
->
objectPositionInJoint
()
Transform3f
M
=
gripper
->
objectPositionInJoint
()
*
Transform3f
(
I3
,
vector3_t
(
shift
,
0
,
0
));
if
(
n
.
empty
())
n
=
"Pregrasp_ "
+
maskToStr
(
mask_
)
+
"_"
+
name
()
+
"_"
+
gripper
->
name
();
ImplicitPtr_t
result
(
Implicit
::
create
(
constraints
::
RelativeTransformation
::
create
ImplicitPtr_t
result
(
Implicit
::
create
(
RelativeTransformation
::
create
(
n
,
robot
(),
gripper
->
joint
(),
joint
(),
transform
,
localPosition
(),
mask_
),
ComparisonTypes_t
(
maskSize
(
mask_
),
constraints
::
EqualToZero
)));
...
...
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