Commit dda0e2e3 authored by Olivier Stasse's avatar Olivier Stasse

[python] Fix a bug during initialization phase introduced by #2f5d2c6b

If the device is provided in argument then the robot already exist
and no simulation is needed.
On talos.py the useless initialConfig argument is removed
parent 33539b85
......@@ -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.
......
......@@ -51,7 +51,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',
......@@ -80,6 +80,8 @@ class Talos(AbstractHumanoidRobot):
assert hasattr(self, "pinocchioModel")
assert hasattr(self, "pinocchioData")
if device!=None:
self.device = device
AbstractHumanoidRobot.__init__(self, name, tracer)
self.OperationalPoints.append('waist')
......@@ -92,7 +94,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