Skip to content

Commit 8063b55

Browse files
committed
Added joint num in function call as well
1 parent b4e24f5 commit 8063b55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/machine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ def execute(self, userdata):
134134
# define state ChangePID
135135
class ChangePID(smach.State):
136136
def __init__(self):
137-
smach.State.__init__(self, outcomes=['changed', 'not_changed'], input_keys=['P', 'I', 'D'])
137+
smach.State.__init__(self, outcomes=['changed', 'not_changed'], input_keys=['joint_num','P', 'I', 'D'])
138138

139139
def execute(self, userdata):
140140
rospy.wait_for_service('SetPID')
141141
try:
142142
set_PID = rospy.ServiceProxy('SetPID', SetPID)
143-
response = set_PID(userdata.P, userdata.I, userdata.D)
143+
response = set_PID(userdata.joint_num, userdata.P, userdata.I, userdata.D)
144144
return 'changed'
145145
except rospy.ServiceException as e:
146146
rospy.logwarn("Service call failed:{0}".format(e))

0 commit comments

Comments
 (0)