Unverified Commit a2e0d13d authored by Guilhem Saurel's avatar Guilhem Saurel Committed by GitHub

Merge pull request #23 from olivier-stasse/devel

[python] Fix a bug during initialization phase introduced by #2f5d2c6b
parents 33539b85 e703a7b5
......@@ -48,8 +48,7 @@ class Robot(Talos):
[ 0., 0.])
def __init__(self, name, device=None, tracer=None, fromRosParam=None):
Talos.__init__(self, name, device, tracer,
fromRosParam=fromRosParam)
Talos.__init__(self, name, device=device, tracer=tracer, fromRosParam=fromRosParam)
"""
TODO:Confirm these values
# Define camera positions w.r.t gaze.
......
......@@ -3,11 +3,13 @@
from __future__ import print_function
import pinocchio
from dynamic_graph import plug
from dynamic_graph.sot.core.math_small_entities import Derivator_of_Vector
from dynamic_graph.sot.dynamic_pinocchio import DynamicPinocchio
from dynamic_graph.sot.dynamic_pinocchio.humanoid_robot import AbstractHumanoidRobot
import pinocchio
from dynamic_graph.sot.dynamic_pinocchio.humanoid_robot import \
AbstractHumanoidRobot
from rospkg import RosPack
......@@ -51,7 +53,7 @@ class Talos(AbstractHumanoidRobot):
res = config[0:27] + 7 * (0., ) + config[27:34] + 7 * (0., ) + config[34:]
return res
def __init__(self, name, initialConfig, device=None, tracer=None, fromRosParam=False):
def __init__(self, name, device=None, tracer=None, fromRosParam=False):
self.OperationalPointsMap = {
'left-wrist': 'arm_left_7_joint',
'right-wrist': 'arm_right_7_joint',
......@@ -70,16 +72,17 @@ class Talos(AbstractHumanoidRobot):
raise RuntimeError('"' + rosParamName + '" is not a ROS parameter.')
s = rospy.get_param(rosParamName)
self.loadModelFromString(s, rootJointType=pinocchio.JointModelFreeFlyer,
removeMimicJoints=True)
self.loadModelFromString(s, rootJointType=pinocchio.JointModelFreeFlyer, removeMimicJoints=True)
else:
self.loadModelFromUrdf(self.defaultFilename,
rootJointType=pinocchio.JointModelFreeFlyer,
removeMimicJoints=True)
rootJointType=pinocchio.JointModelFreeFlyer,
removeMimicJoints=True)
assert hasattr(self, "pinocchioModel")
assert hasattr(self, "pinocchioData")
if device is not None:
self.device = device
AbstractHumanoidRobot.__init__(self, name, tracer)
self.OperationalPoints.append('waist')
......@@ -92,7 +95,6 @@ class Talos(AbstractHumanoidRobot):
self.dynamic.displayModel()
self.dimension = self.dynamic.getDimension()
self.device = device
self.initializeRobot()
self.AdditionalFrames.append(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment