Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sot-dynamic-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
sot-dynamic-pinocchio
Commits
fccc4771
Commit
fccc4771
authored
12 years ago
by
Florent Lamiraux
Browse files
Options
Downloads
Patches
Plain Diff
Remove obsolete hrp2.py file
This file is now defined by package sot-hrp2.
parent
c6376c9d
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
[major][cpp] starting point to integrate pinocchio
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/CMakeLists.txt
+0
-6
0 additions, 6 deletions
src/CMakeLists.txt
src/dynamic_graph/sot/dynamics/hrp2.py.in
+0
-190
0 additions, 190 deletions
src/dynamic_graph/sot/dynamics/hrp2.py.in
with
0 additions
and
196 deletions
src/CMakeLists.txt
+
0
−
6
View file @
fccc4771
...
...
@@ -78,12 +78,6 @@ INSTALL(FILES
)
IF
(
HRP2_DYNAMICS_FOUND
)
CONFIG_FILES
(
dynamic_graph/sot/dynamics/hrp2.py
)
INSTALL
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/dynamic_graph/sot/dynamics/hrp2.py
DESTINATION
${
PYTHON_SITELIB
}
/dynamic_graph/sot/dynamics
)
PKG_CONFIG_USE_DEPENDENCY
(
dynamic-hrp2 hrp2-dynamics
)
ENDIF
(
HRP2_DYNAMICS_FOUND
)
...
...
This diff is collapsed.
Click to expand it.
src/dynamic_graph/sot/dynamics/hrp2.py.in
deleted
100755 → 0
+
0
−
190
View file @
c6376c9d
# -*- coding: utf-8 -*-
# Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST
#
# This file is part of dynamic-graph.
# dynamic-graph is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# dynamic-graph is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# dynamic-graph. If not, see <http://www.gnu.org/licenses/>.
import numpy as np
from dynamic_graph.sot import SE3, R3, SO3
from dynamic_graph.sot.core import FeatureGeneric, FeatureJointLimits, Task, \
Constraint, GainAdaptive, SOT
from dynamic_graph.sot.dynamics import AngleEstimator
from dynamic_graph import enableTrace, plug
from dynamic_graph.sot.se3 import R3, SO3, SE3
from dynamic_graph.sot.dynamics.dynamic_hrp2 import DynamicHrp2
from dynamic_graph.sot.dynamics.dynamic_hrp2_10 import DynamicHrp2_10
from dynamic_graph.sot.dynamics.humanoid_robot import AbstractHumanoidRobot
hrp2_10_pkgdatarootdir = "@HRP2_10_PKGDATAROOTDIR@"
hrp2_14_pkgdatarootdir = "@HRP2_14_PKGDATAROOTDIR@"
# Internal helper tool.
def matrixToTuple(M):
tmp = M.tolist()
res = []
for i in tmp:
res.append(tuple(i))
return tuple(res)
class Hrp2(AbstractHumanoidRobot):
"""
This class instanciates a Hrp2 robot
"""
forceSensorInLeftAnkle = ((1.,0.,0.,0.),
(0.,1.,0.,0.),
(0.,0.,1.,-0.105),
(0.,0.,0.,1.))
forceSensorInRightAnkle = ((1.,0.,0.,0.),
(0.,1.,0.,0.),
(0.,0.,1.,-0.105),
(0.,0.,0.,1.))
def smallToFull(self, config):
res = (config + 10*(0.,))
return res
def __init__(self, name, modelDir, xmlDir, device, dynamicType,
tracer = None):
AbstractHumanoidRobot.__init__ (self, name, tracer)
self.OperationalPoints.append('waist')
self.device = device
modelName = 'HRP2JRLmainsmall.wrl'
specificitiesPath = xmlDir + '/HRP2SpecificitiesSmall.xml'
jointRankPath = xmlDir + '/HRP2LinkJointRankSmall.xml'
self.dynamic = self.loadModelFromJrlDynamics(
self.name + '_dynamic',
modelDir,
modelName,
specificitiesPath,
jointRankPath,
dynamicType)
self.dimension = self.dynamic.getDimension()
if self.dimension != len(self.halfSitting):
raise RuntimeError("invalid half-sitting pose")
self.initializeRobot()
class Hrp2Jrl (Hrp2):
"""
This class instanciates LAAS Hrp2 robot
"""
halfSitting = (
# Free flyer
0., 0., 0.648702, 0., 0. , 0.,
# Legs
0., 0., -0.453786, 0.872665, -0.418879, 0.,
0., 0., -0.453786, 0.872665, -0.418879, 0.,
# Chest and head
0., 0., 0., 0.,
# Arms
0.261799, -0.17453, 0., -0.523599, 0., 0., 0.1, 0.261799,
0.261799, 0.17453, 0., -0.523599, 0., 0., 0.1, 0.261799,
)
def __init__(self, name,
modelDir = hrp2_10_pkgdatarootdir,
xmlDir = hrp2_10_pkgdatarootdir,
device = None,
tracer = None):
Hrp2.__init__(self, name, modelDir, xmlDir, device, DynamicHrp2_10,
tracer)
class Hrp2Laas (Hrp2):
"""
This class instanciates LAAS Hrp2 robot
"""
halfSitting = (
# Free flyer
0., 0., 0.648702, 0., 0. , 0.,
# Legs
0., 0., -0.453786, 0.872665, -0.418879, 0.,
0., 0., -0.453786, 0.872665, -0.418879, 0.,
# Chest and head
0., 0., 0., 0.,
# Arms
0.261799, -0.17453, 0., -0.523599, 0., 0., 0.1,
0.261799, 0.17453, 0., -0.523599, 0., 0., 0.1,
)
def __init__(self, name,
modelDir = hrp2_14_pkgdatarootdir,
xmlDir = hrp2_14_pkgdatarootdir,
device = None,
tracer = None):
# Define camera positions w.r.t gaze.
# These positions have been copied from hrp2.geom and
# roughly checked. Do not trust them too much.
cameraBottomLeftPosition = np.matrix((
(0.98481, 0.00000, 0.17365, 0.035),
(0., 1., 0., 0.072),
(-0.17365, 0.00000, 0.98481, 0.075 - 0.03),
(0., 0., 0., 1.),
))
cameraBottomRightPosition = np.matrix((
(0.98481, 0.00000, 0.17365, 0.035),
(0., 1., 0., -0.072),
(-0.17365, 0.00000, 0.98481, 0.075 - 0.03),
(0., 0., 0., 1.),
))
cameraTopLeftPosition = np.matrix((
(0.99920, 0.00120, 0.03997, 0.01),
(0.00000, 0.99955,-0.03000, 0.029),
(-0.03999, 0.02997, 0.99875, 0.145 - 0.03),
(0., 0., 0., 1.),
))
cameraTopRightPosition = np.matrix((
(0.99920, 0.00000, 0.03999, 0.01),
(0.00000, 1.00000, 0.00000, -0.029),
(-0.03999, 0.00000, 0.99920, 0.145 - 0.03),
(0., 0., 0., 1.),
))
# Frames re-orientation:
# Z = depth (increase from near to far)
# X = increase from left to right
# Y = increase from top to bottom
c1_M_c = np.matrix(
[[ 0., 0., 1., 0.],
[-1., 0., 0., 0.],
[ 0., -1., 0., 0.],
[ 0., 0., 0., 1.]])
self.AdditionalFrames.append(
("cameraBottomLeft",
matrixToTuple(c1_M_c * cameraBottomLeftPosition), "gaze"))
self.AdditionalFrames.append(
("cameraBottomRight",
matrixToTuple(c1_M_c * cameraBottomRightPosition), "gaze"))
self.AdditionalFrames.append(
("cameraTopLeft",
matrixToTuple(c1_M_c * cameraTopLeftPosition), "gaze"))
self.AdditionalFrames.append(
("cameraTopRight",
matrixToTuple(c1_M_c * cameraTopRightPosition), "gaze"))
Hrp2.__init__(self, name, modelDir, xmlDir, device, DynamicHrp2, tracer)
__all__ = [Hrp2, Hrp2Jrl, Hrp2Laas]
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