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
32476206
Commit
32476206
authored
8 years ago
by
Valenza Florian
Browse files
Options
Downloads
Patches
Plain Diff
[Python] Adding missing algorithm working on configurations
parent
5d340189
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
bindings/python/algorithm/expose-joints.cpp
+24
-0
24 additions, 0 deletions
bindings/python/algorithm/expose-joints.cpp
with
24 additions
and
0 deletions
bindings/python/algorithm/expose-joints.cpp
+
24
−
0
View file @
32476206
...
...
@@ -57,6 +57,21 @@ namespace se3
{
return
randomConfiguration
(
*
model
,
lowerPosLimit
,
upperPosLimit
);
}
static
void
normalize_proxy
(
const
ModelHandler
&
model
,
VectorXd_fx
&
config
)
{
Eigen
::
VectorXd
q
(
config
);
normalize
(
*
model
,
q
);
config
=
q
;
}
static
bool
isSameConfiguration_proxy
(
const
ModelHandler
&
model
,
const
VectorXd_fx
&
q1
,
const
VectorXd_fx
&
q2
)
{
return
isSameConfiguration
(
*
model
,
q1
,
q2
);
}
void
exposeJointsAlgo
()
{
...
...
@@ -88,6 +103,15 @@ namespace se3
"Joint lower limits (size Model::nq)"
,
"Joint upper limits (size Model::nq)"
),
"Generate a random configuration ensuring provied joint limits are respected "
);
bp
::
def
(
"normalize"
,
normalize_proxy
,
bp
::
args
(
"Model"
,
"Configuration q (size Model::nq)"
),
"return the configuration normalized "
);
bp
::
def
(
"isSameConfiguration"
,
isSameConfiguration_proxy
,
bp
::
args
(
"Model"
,
"Configuration q1 (size Model::nq)"
,
"Configuration q2 (size Model::nq)"
),
"Return true if two configurations are equivalent"
);
}
}
// namespace python
...
...
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