Skip to content

Commit 4fe5717

Browse files
committed
Revert "Dynamixelの値が正しく書き込まれているかを確認するデバッグ処理を一時追加"
This reverts commit db38e3f.
1 parent f7725cb commit 4fe5717

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

uiflow2/libs/DynamixelDriver.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ def setProfileVelocity(self, val):
174174
class PConrtol:
175175
#
176176
#
177-
# servoは Dynamixel が与えられる
178177
def __init__(self, servo, gain, saturation,
179178
name='servo', offset_pos=2048,
180179
min_pos=-180, max_pos=180):
@@ -204,19 +203,13 @@ def init(self):
204203
self.goalPosition = 0
205204
self.servo.setTorque(False)
206205
self.servo.setOperatingMode(OPERATING_MODE['CURRENT_BASED_POSITION'])
207-
self.servo.setGoalPosition(self.goalPosition + self._offset) # つまり現位置
208-
self._lastGoalPosition = self.goalPosition
209206
self.servo.setTorque(True)
210207
return
211208
#
212209
#
213210
def update(self):
214211
if self._lastGoalPosition != self.goalPosition:
215-
ok = self.servo.setGoalPosition(self.goalPosition+self._offset)
216-
if not ok:
217-
print("[ERR] setGoalPosition failed", self.name, self.goalPosition, self._offset)
218-
else:
219-
print("[OK] setGoalPosition succed", self.name, self.goalPosition, self._offset)
212+
self.servo.setGoalPosition(self.goalPosition+self._offset)
220213
self._lastGoalPosition = self.goalPosition
221214
result = self.servo.readPresentPosition()
222215
if result is None:

0 commit comments

Comments
 (0)