set drive mode
This commit is contained in:
@@ -118,7 +118,7 @@ def run_full_arm_calibration(arm: MotorsBus, robot_type: str, arm_name: str, arm
|
|||||||
|
|
||||||
print(f"\nRunning calibration of {robot_type} {arm_name} {arm_type}...")
|
print(f"\nRunning calibration of {robot_type} {arm_name} {arm_type}...")
|
||||||
|
|
||||||
print("\nMove arm to homing position")
|
print("\nMove arm to homing position (middle)")
|
||||||
print(
|
print(
|
||||||
"See: " + URL_TEMPLATE.format(robot=robot_type, arm=arm_type, position="zero")
|
"See: " + URL_TEMPLATE.format(robot=robot_type, arm=arm_type, position="zero")
|
||||||
) # TODO(pepijn): replace with new instruction homing pos (all motors in center) in tutorial
|
) # TODO(pepijn): replace with new instruction homing pos (all motors in center) in tutorial
|
||||||
@@ -146,9 +146,12 @@ def run_full_arm_calibration(arm: MotorsBus, robot_type: str, arm_name: str, arm
|
|||||||
|
|
||||||
print(f"\n calibration of {robot_type} {arm_name} {arm_type} done!")
|
print(f"\n calibration of {robot_type} {arm_name} {arm_type} done!")
|
||||||
|
|
||||||
|
# Force drive_mode values: motors 2 and 5 -> drive_mode 1; all others -> 0.
|
||||||
|
drive_modes = [0, 1, 0, 0, 1, 0]
|
||||||
|
|
||||||
calib_dict = {
|
calib_dict = {
|
||||||
"homing_offset": encoder_offsets.astype(int).tolist(),
|
"homing_offset": encoder_offsets.astype(int).tolist(),
|
||||||
"drive_mode": np.zeros(len(arm.motor_indices), dtype=int).tolist(),
|
"drive_mode": drive_modes,
|
||||||
"start_pos": start_positions.astype(int).tolist(),
|
"start_pos": start_positions.astype(int).tolist(),
|
||||||
"end_pos": end_positions.astype(int).tolist(),
|
"end_pos": end_positions.astype(int).tolist(),
|
||||||
"calib_mode": get_calibration_modes(arm),
|
"calib_mode": get_calibration_modes(arm),
|
||||||
|
|||||||
Reference in New Issue
Block a user