Skip to content

Commit

Permalink
Merge pull request #34 from iory/worm
Browse files Browse the repository at this point in the history
Set a baseline threshold value before sending joint angle commands with ref_angle in the wormmodule.
  • Loading branch information
iory authored Feb 11, 2024
2 parents 5dcac42 + a3c9872 commit e195dee
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions rcb4/armh7interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ def open(self, port='/dev/ttyUSB1', baudrate=1000000, timeout=0.01):
self.check_firmware_version()
self.copy_worm_params_from_flash()
self.search_worm_ids()
# Set a baseline threshold value
# before sending joint angle commands with ref_angle in the WormModule.
self.write_cstruct_slot_v(
WormmoduleStruct, 'thleshold', 30 * np.ones(max_sensor_num))
self.write_cstruct_slot_v(
WormmoduleStruct, 'thleshold_scale', np.ones(max_sensor_num))
self.search_servo_ids()
self.all_jointbase_sensors()
return True
Expand Down Expand Up @@ -1034,5 +1040,5 @@ def servo_states(self):


if __name__ == '__main__':
arm = ARMH7Interface()
print(arm.auto_open())
interface = ARMH7Interface()
print(interface.auto_open())

0 comments on commit e195dee

Please sign in to comment.