Skip to content

Commit

Permalink
[Python] Fix link name's default value for get* methods.
Browse files Browse the repository at this point in the history
Because `get``{Current, Reference}``{Pose, Position, Rotation, RPY}` methods handle the case where `lname` passed is None in their method's logic, those methods should allow missing `lname`.
  • Loading branch information
130s committed Mar 16, 2017
1 parent 7ef62f4 commit 0acea2b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/hrpsys_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ def getCurrentPosition(self, lname=None, frame_name=None):
pose = self.getCurrentPose(lname, frame_name)
return [pose[3], pose[7], pose[11]]

def getCurrentRotation(self, lname, frame_name=None):
def getCurrentRotation(self, lname=None, frame_name=None):
'''!@brief
Returns the current physical rotation of the specified joint.
cf. getReferenceRotation that returns commanded value.
Expand All @@ -1309,7 +1309,7 @@ def getCurrentRotation(self, lname, frame_name=None):
pose = self.getCurrentPose(lname, frame_name)
return [pose[0:3], pose[4:7], pose[8:11]]

def getCurrentRPY(self, lname, frame_name=None):
def getCurrentRPY(self, lname=None, frame_name=None):
'''!@brief
Returns the current physical rotation in RPY of the specified joint.
cf. getReferenceRPY that returns commanded value.
Expand All @@ -1327,7 +1327,7 @@ def getCurrentRPY(self, lname, frame_name=None):
raise RuntimeError("need to specify joint name")
return euler_from_matrix(self.getCurrentRotation(lname), 'sxyz')

def getReferencePose(self, lname, frame_name=None):
def getReferencePose(self, lname=None, frame_name=None):
'''!@brief
Returns the current commanded pose of the specified joint in the joint space.
cf. getCurrentPose that returns physical pose.
Expand Down Expand Up @@ -1359,7 +1359,7 @@ def getReferencePose(self, lname, frame_name=None):
raise RuntimeError("Could not find reference : " + lname)
return pose[1].data

def getReferencePosition(self, lname, frame_name=None):
def getReferencePosition(self, lname=None, frame_name=None):
'''!@brief
Returns the current commanded position of the specified joint in Cartesian space.
cf. getCurrentPosition that returns physical value.
Expand All @@ -1379,7 +1379,7 @@ def getReferencePosition(self, lname, frame_name=None):
pose = self.getReferencePose(lname, frame_name)
return [pose[3], pose[7], pose[11]]

def getReferenceRotation(self, lname, frame_name=None):
def getReferenceRotation(self, lname=None, frame_name=None):
'''!@brief
Returns the current commanded rotation of the specified joint.
cf. getCurrentRotation that returns physical value.
Expand All @@ -1404,7 +1404,7 @@ def getReferenceRotation(self, lname, frame_name=None):
pose = self.getReferencePose(lname, frame_name)
return [pose[0:3], pose[4:7], pose[8:11]]

def getReferenceRPY(self, lname, frame_name=None):
def getReferenceRPY(self, lname=None, frame_name=None):
'''!@brief
Returns the current commanded rotation in RPY of the specified joint.
cf. getCurrentRPY that returns physical value.
Expand Down

0 comments on commit 0acea2b

Please sign in to comment.