diff --git a/src/dynamic_graph/sot/dynamics_pinocchio/humanoid_robot.py b/src/dynamic_graph/sot/dynamics_pinocchio/humanoid_robot.py index 5cd36d2ae4ef972cb02889a6182833e98ce82d79..f80fae2257344d186feb1ac0bbc7fe43b3e9cacb 100755 --- a/src/dynamic_graph/sot/dynamics_pinocchio/humanoid_robot.py +++ b/src/dynamic_graph/sot/dynamics_pinocchio/humanoid_robot.py @@ -65,89 +65,89 @@ class AbstractHumanoidRobot (object): """ + def _initialize (self): + self.OperationalPoints = ['left-wrist', 'right-wrist', + 'left-ankle', 'right-ankle', + 'gaze'] - OperationalPoints = ['left-wrist', 'right-wrist', - 'left-ankle', 'right-ankle', - 'gaze'] + """ + Operational points are specific interesting points of the robot + used to control it. - """ - Operational points are specific interesting points of the robot - used to control it. - - When an operational point is defined, signals corresponding to the - point position and jacobian are created. + When an operational point is defined, signals corresponding to the + point position and jacobian are created. - For instance if creating an operational point for the left-wrist, - the associated signals will be called "left-wrist" and - "Jleft-wrist" for respectively the position and the jacobian. - """ + For instance if creating an operational point for the left-wrist, + the associated signals will be called "left-wrist" and + "Jleft-wrist" for respectively the position and the jacobian. + """ - AdditionalFrames = [] - """ - Additional frames are frames which are defined w.r.t an operational point - and provides an interesting transformation. + self.AdditionalFrames = [] + """ + Additional frames are frames which are defined w.r.t an operational point + and provides an interesting transformation. - It can be used, for instance, to store the sensor location. + It can be used, for instance, to store the sensor location. - The contained elements must be triplets matching: - - additional frame name, - - transformation w.r.t to the operational point, - - operational point file. - """ + The contained elements must be triplets matching: + - additional frame name, + - transformation w.r.t to the operational point, + - operational point file. + """ - frames = dict() - """ - Additional frames defined by using OpPointModifier. - """ + self.frames = dict() + """ + Additional frames defined by using OpPointModifier. + """ - #FIXME: the following options are /not/ independent. - # zmp requires acceleration which requires velocity. - """ - Enable velocity computation. - """ - enableVelocityDerivator = False - """ - Enable acceleration computation. - """ - enableAccelerationDerivator = False - """ - Enable ZMP computation - """ - enableZmpComputation = False + #FIXME: the following options are /not/ independent. + # zmp requires acceleration which requires velocity. + """ + Enable velocity computation. + """ + self.enableVelocityDerivator = False + """ + Enable acceleration computation. + """ + self.enableAccelerationDerivator = False + """ + Enable ZMP computation + """ + self.enableZmpComputation = False - """ - Tracer used to log data. - """ - tracer = None + """ + Tracer used to log data. + """ + self.tracer = None - """ - How much data will be logged. - """ - tracerSize = 2**20 + """ + How much data will be logged. + """ + self.tracerSize = 2**20 - """ - Automatically recomputed signals through the use - of device.after. - This list is maintained in order to clean the - signal list device.after before exiting. - """ - autoRecomputedSignals = [] + """ + Automatically recomputed signals through the use + of device.after. + This list is maintained in order to clean the + signal list device.after before exiting. + """ + self.autoRecomputedSignals = [] - """ - Which signals should be traced. - """ - tracedSignals = { - 'dynamic': ["com", "zmp", "angularmomentum", - "position", "velocity", "acceleration"], - 'device': ['zmp', 'control', 'state'] - } + """ + Which signals should be traced. + """ + self.tracedSignals = { + 'dynamic': ["com", "zmp", "angularmomentum", + "position", "velocity", "acceleration"], + 'device': ['zmp', 'control', 'state'] + } - """ - Robot timestep - """ - timeStep = 0.005 + """ + Robot timestep + """ + self.timeStep = 0.005 def help (self): print (AbstractHumanoidRobot.__doc__) @@ -325,6 +325,8 @@ class AbstractHumanoidRobot (object): def __init__(self, name, tracer = None): + self._initialize() + self.name = name # Initialize tracer if necessary.