From 5a86d4aeefa72f0412788c38fa1247fdea7995ce Mon Sep 17 00:00:00 2001 From: Vinman Date: Sat, 28 Sep 2024 15:52:13 +0800 Subject: [PATCH] [example] use `move_gohome()` replace `reset()` --- example/wrapper/common/1001-move_line.py | 6 +++--- example/wrapper/common/1002-move_line.py | 6 +++--- example/wrapper/common/1003-relative_move_line.py | 4 ++-- example/wrapper/common/1004-move_arc_line.py | 4 ++-- example/wrapper/common/1005-move_arc_line.py | 4 ++-- example/wrapper/common/1006-move_tool_line.py | 4 ++-- example/wrapper/common/1007-counter.py | 4 ++-- example/wrapper/common/1009-cartesian_velocity_control.py | 2 +- .../common/1010-cartesian_online_trajectory_planning.py | 4 ++-- example/wrapper/common/2000-joint_velocity_control.py | 2 +- .../wrapper/common/2006-joint_online_trajectory_planning.py | 4 ++-- example/wrapper/common/3001-move_circle.py | 4 ++-- example/wrapper/common/7001-servo_j.py | 2 +- example/wrapper/common/7002-servo_cartesian.py | 2 +- example/wrapper/xarm5/2001-move_joint.py | 6 +++--- example/wrapper/xarm5/2002-move_joint.py | 6 +++--- example/wrapper/xarm5/2003-move_joint.py | 6 +++--- example/wrapper/xarm5/2004-move_joint.py | 6 +++--- example/wrapper/xarm5/2005-move_arc_joint.py | 4 ++-- example/wrapper/xarm6/2001-move_joint.py | 6 +++--- example/wrapper/xarm6/2002-move_joint.py | 6 +++--- example/wrapper/xarm6/2003-move_joint.py | 6 +++--- example/wrapper/xarm6/2004-move_joint.py | 6 +++--- example/wrapper/xarm6/2005-move_arc_joint.py | 4 ++-- example/wrapper/xarm7/2001-move_joint.py | 6 +++--- example/wrapper/xarm7/2002-move_joint.py | 6 +++--- example/wrapper/xarm7/2003-move_joint.py | 6 +++--- example/wrapper/xarm7/2004-move_joint.py | 6 +++--- example/wrapper/xarm7/2005-move_arc_joint.py | 4 ++-- 29 files changed, 68 insertions(+), 68 deletions(-) diff --git a/example/wrapper/common/1001-move_line.py b/example/wrapper/common/1001-move_line.py index a90d82d8..45f7c687 100644 --- a/example/wrapper/common/1001-move_line.py +++ b/example/wrapper/common/1001-move_line.py @@ -44,7 +44,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.set_position(x=300, y=0, z=150, roll=-180, pitch=0, yaw=0, speed=100, wait=True) print(arm.get_position(), arm.get_position(is_radian=True)) @@ -60,7 +60,7 @@ print(arm.get_position(), arm.get_position(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.set_position(x=300, y=0, z=150, roll=-3.1415926, pitch=0, yaw=0, speed=100, is_radian=True, wait=True) print(arm.get_position(), arm.get_position(is_radian=True)) @@ -75,5 +75,5 @@ arm.set_position(x=300, y=0, z=250, roll=-3.1415926, pitch=0, yaw=0, speed=600, is_radian=True, wait=True) print(arm.get_position(), arm.get_position(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/common/1002-move_line.py b/example/wrapper/common/1002-move_line.py index aadaf4a5..75caf18a 100644 --- a/example/wrapper/common/1002-move_line.py +++ b/example/wrapper/common/1002-move_line.py @@ -44,7 +44,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.set_position(x=300, y=0, z=150, roll=-180, pitch=0, yaw=0, speed=100, is_radian=False, wait=True) print(arm.get_position(), arm.get_position(is_radian=False)) @@ -60,7 +60,7 @@ print(arm.get_position(), arm.get_position(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.set_position(x=300, y=0, z=150, roll=-3.1415926, pitch=0, yaw=0, speed=100, wait=True) print(arm.get_position(), arm.get_position(is_radian=False)) @@ -75,5 +75,5 @@ arm.set_position(x=300, y=0, z=250, roll=-3.1415926, pitch=0, yaw=0, speed=600, wait=True) print(arm.get_position(), arm.get_position(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/common/1003-relative_move_line.py b/example/wrapper/common/1003-relative_move_line.py index 3309b6cb..95bcc395 100644 --- a/example/wrapper/common/1003-relative_move_line.py +++ b/example/wrapper/common/1003-relative_move_line.py @@ -44,7 +44,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.set_position(x=100, relative=True, wait=True) print(arm.get_position(), arm.get_position(is_radian=False)) @@ -59,5 +59,5 @@ arm.set_position(y=200, z=100, relative=True, wait=True) print(arm.get_position(), arm.get_position(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/common/1004-move_arc_line.py b/example/wrapper/common/1004-move_arc_line.py index 792a2e70..1ed01a2e 100644 --- a/example/wrapper/common/1004-move_arc_line.py +++ b/example/wrapper/common/1004-move_arc_line.py @@ -44,7 +44,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) paths = [ [300, 0, 150, -180, 0, 0], @@ -81,5 +81,5 @@ def move(): if move() != 0: break -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/common/1005-move_arc_line.py b/example/wrapper/common/1005-move_arc_line.py index 908c47dc..20ad2ca5 100644 --- a/example/wrapper/common/1005-move_arc_line.py +++ b/example/wrapper/common/1005-move_arc_line.py @@ -44,7 +44,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) paths = [ [300, 0, 150, -180, 0, 0], @@ -62,5 +62,5 @@ arm.move_arc_lines(paths, speed=300, times=10, wait=True) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/common/1006-move_tool_line.py b/example/wrapper/common/1006-move_tool_line.py index 6e1f4512..ff2bda3c 100644 --- a/example/wrapper/common/1006-move_tool_line.py +++ b/example/wrapper/common/1006-move_tool_line.py @@ -44,7 +44,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.set_tool_position(x=100, y=0, z=0, roll=0, pitch=0, yaw=0, speed=100, wait=True) print(arm.get_position(), arm.get_position(is_radian=True)) @@ -59,5 +59,5 @@ arm.set_tool_position(x=0, y=200, z=0, roll=0, pitch=0, yaw=0, speed=600, wait=True) print(arm.get_position(), arm.get_position(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/common/1007-counter.py b/example/wrapper/common/1007-counter.py index 3a96b4e9..a92a33f3 100644 --- a/example/wrapper/common/1007-counter.py +++ b/example/wrapper/common/1007-counter.py @@ -51,7 +51,7 @@ def callback_count_changed(item): arm.register_count_changed_callback(callback_count_changed) -arm.reset(wait=True) +arm.move_gohome(wait=True) paths = [ [300, 0, 150, -180, 0, 0], @@ -91,5 +91,5 @@ def move(): break arm.set_counter_increase() -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/common/1009-cartesian_velocity_control.py b/example/wrapper/common/1009-cartesian_velocity_control.py index 16308d8c..24072de0 100644 --- a/example/wrapper/common/1009-cartesian_velocity_control.py +++ b/example/wrapper/common/1009-cartesian_velocity_control.py @@ -45,7 +45,7 @@ arm.set_state(state=0) time.sleep(1) -arm.reset(wait=True) +arm.move_gohome(wait=True) # set cartesian velocity control mode arm.set_mode(5) diff --git a/example/wrapper/common/1010-cartesian_online_trajectory_planning.py b/example/wrapper/common/1010-cartesian_online_trajectory_planning.py index c698d59f..0ec4bed2 100644 --- a/example/wrapper/common/1010-cartesian_online_trajectory_planning.py +++ b/example/wrapper/common/1010-cartesian_online_trajectory_planning.py @@ -43,7 +43,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.set_position(x=400, y=-50, z=150, roll=-180, pitch=0, yaw=0, speed=100, is_radian=False, wait=True) # set mode: cartesian online trajectory planning mode @@ -66,5 +66,5 @@ # set_mode: position mode arm.set_mode(0) arm.set_state(0) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/common/2000-joint_velocity_control.py b/example/wrapper/common/2000-joint_velocity_control.py index 71092531..ddb83795 100644 --- a/example/wrapper/common/2000-joint_velocity_control.py +++ b/example/wrapper/common/2000-joint_velocity_control.py @@ -45,7 +45,7 @@ arm.set_state(state=0) time.sleep(1) -arm.reset(wait=True) +arm.move_gohome(wait=True) # set joint velocity control mode arm.set_mode(4) diff --git a/example/wrapper/common/2006-joint_online_trajectory_planning.py b/example/wrapper/common/2006-joint_online_trajectory_planning.py index f38719d7..a4ff8164 100644 --- a/example/wrapper/common/2006-joint_online_trajectory_planning.py +++ b/example/wrapper/common/2006-joint_online_trajectory_planning.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.set_servo_angle(angle=[-50, 0, 0, 0, 0, 0, 0], wait=True) # set mode: joint online trajectory planning mode @@ -68,5 +68,5 @@ # set_mode: position mode arm.set_mode(0) arm.set_state(0) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/common/3001-move_circle.py b/example/wrapper/common/3001-move_circle.py index ce77146c..0f52ae90 100644 --- a/example/wrapper/common/3001-move_circle.py +++ b/example/wrapper/common/3001-move_circle.py @@ -44,7 +44,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) poses = [ [300, 0, 100, -180, 0, 0], @@ -63,5 +63,5 @@ ret = arm.move_circle(pose1=poses[3], pose2=poses[4], percent=200, speed=200, mvacc=1000, wait=True) print('move_circle, ret: {}'.format(ret)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/common/7001-servo_j.py b/example/wrapper/common/7001-servo_j.py index 6667751b..f602faf0 100644 --- a/example/wrapper/common/7001-servo_j.py +++ b/example/wrapper/common/7001-servo_j.py @@ -44,7 +44,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.set_mode(1) arm.set_state(0) diff --git a/example/wrapper/common/7002-servo_cartesian.py b/example/wrapper/common/7002-servo_cartesian.py index 93aa3d88..19c296c9 100644 --- a/example/wrapper/common/7002-servo_cartesian.py +++ b/example/wrapper/common/7002-servo_cartesian.py @@ -44,7 +44,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.set_position(*[200, 0, 200, 180, 0, 0], wait=True) diff --git a/example/wrapper/xarm5/2001-move_joint.py b/example/wrapper/xarm5/2001-move_joint.py index fe152332..46685403 100644 --- a/example/wrapper/xarm5/2001-move_joint.py +++ b/example/wrapper/xarm5/2001-move_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 arm.set_servo_angle(angle=[90, 0, 0, 0, 0], speed=speed, wait=True) @@ -62,7 +62,7 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = math.radians(50) arm.set_servo_angle(angle=[math.radians(90), 0, 0, 0, 0], speed=speed, is_radian=True, wait=True) print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) @@ -78,5 +78,5 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm5/2002-move_joint.py b/example/wrapper/xarm5/2002-move_joint.py index 857f9329..3126cccc 100644 --- a/example/wrapper/xarm5/2002-move_joint.py +++ b/example/wrapper/xarm5/2002-move_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 arm.set_servo_angle(angle=[90, 0, 0, 0, 0], speed=speed, is_radian=False, wait=True) @@ -62,7 +62,7 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = math.radians(50) arm.set_servo_angle(angle=[math.radians(90), 0, 0, 0, 0], speed=speed, wait=True) print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) @@ -78,5 +78,5 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm5/2003-move_joint.py b/example/wrapper/xarm5/2003-move_joint.py index 549735c9..8c79b422 100644 --- a/example/wrapper/xarm5/2003-move_joint.py +++ b/example/wrapper/xarm5/2003-move_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 arm.set_servo_angle(servo_id=1, angle=90, speed=speed, wait=True) @@ -61,7 +61,7 @@ arm.set_servo_angle(servo_id=3, angle=0, speed=speed, wait=True) print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = math.radians(50) arm.set_servo_angle(servo_id=1, angle=math.radians(90), speed=speed, is_radian=True, wait=True) @@ -78,5 +78,5 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm5/2004-move_joint.py b/example/wrapper/xarm5/2004-move_joint.py index fdcd4ab2..fa2548ce 100644 --- a/example/wrapper/xarm5/2004-move_joint.py +++ b/example/wrapper/xarm5/2004-move_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 arm.set_servo_angle(servo_id=1, angle=90, speed=speed, is_radian=False, wait=True) @@ -61,7 +61,7 @@ arm.set_servo_angle(servo_id=3, angle=0, speed=speed, is_radian=False, wait=True) print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = math.radians(50) arm.set_servo_angle(servo_id=1, angle=math.radians(90), speed=speed, wait=True) @@ -78,5 +78,5 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm5/2005-move_arc_joint.py b/example/wrapper/xarm5/2005-move_arc_joint.py index 4b9f7037..bae8b982 100644 --- a/example/wrapper/xarm5/2005-move_arc_joint.py +++ b/example/wrapper/xarm5/2005-move_arc_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 @@ -60,5 +60,5 @@ for angle in angles: code = arm.set_servo_angle(angle=angle, speed=speed, radius=20, wait=False) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm6/2001-move_joint.py b/example/wrapper/xarm6/2001-move_joint.py index 4187eee0..331fab33 100644 --- a/example/wrapper/xarm6/2001-move_joint.py +++ b/example/wrapper/xarm6/2001-move_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 arm.set_servo_angle(angle=[90, 0, 0, 0, 0, 0], speed=speed, wait=True) @@ -62,7 +62,7 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = math.radians(50) arm.set_servo_angle(angle=[math.radians(90), 0, 0, 0, 0, 0], speed=speed, is_radian=True, wait=True) print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) @@ -78,5 +78,5 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm6/2002-move_joint.py b/example/wrapper/xarm6/2002-move_joint.py index 6815d8d7..39778790 100644 --- a/example/wrapper/xarm6/2002-move_joint.py +++ b/example/wrapper/xarm6/2002-move_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 arm.set_servo_angle(angle=[90, 0, 0, 0, 0, 0], speed=speed, is_radian=False, wait=True) @@ -62,7 +62,7 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = math.radians(50) arm.set_servo_angle(angle=[math.radians(90), 0, 0, 0, 0, 0], speed=speed, wait=True) print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) @@ -78,5 +78,5 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm6/2003-move_joint.py b/example/wrapper/xarm6/2003-move_joint.py index 549735c9..8c79b422 100644 --- a/example/wrapper/xarm6/2003-move_joint.py +++ b/example/wrapper/xarm6/2003-move_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 arm.set_servo_angle(servo_id=1, angle=90, speed=speed, wait=True) @@ -61,7 +61,7 @@ arm.set_servo_angle(servo_id=3, angle=0, speed=speed, wait=True) print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = math.radians(50) arm.set_servo_angle(servo_id=1, angle=math.radians(90), speed=speed, is_radian=True, wait=True) @@ -78,5 +78,5 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm6/2004-move_joint.py b/example/wrapper/xarm6/2004-move_joint.py index fdcd4ab2..fa2548ce 100644 --- a/example/wrapper/xarm6/2004-move_joint.py +++ b/example/wrapper/xarm6/2004-move_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 arm.set_servo_angle(servo_id=1, angle=90, speed=speed, is_radian=False, wait=True) @@ -61,7 +61,7 @@ arm.set_servo_angle(servo_id=3, angle=0, speed=speed, is_radian=False, wait=True) print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = math.radians(50) arm.set_servo_angle(servo_id=1, angle=math.radians(90), speed=speed, wait=True) @@ -78,5 +78,5 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm6/2005-move_arc_joint.py b/example/wrapper/xarm6/2005-move_arc_joint.py index e11d800a..40145202 100644 --- a/example/wrapper/xarm6/2005-move_arc_joint.py +++ b/example/wrapper/xarm6/2005-move_arc_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 @@ -60,5 +60,5 @@ for angle in angles: code = arm.set_servo_angle(angle=angle, speed=speed, radius=60, wait=False) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm7/2001-move_joint.py b/example/wrapper/xarm7/2001-move_joint.py index c59085be..ca7e6d3f 100644 --- a/example/wrapper/xarm7/2001-move_joint.py +++ b/example/wrapper/xarm7/2001-move_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 arm.set_servo_angle(angle=[90, 0, 0, 0, 0, 0, 0], speed=speed, wait=True) @@ -62,7 +62,7 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = math.radians(50) arm.set_servo_angle(angle=[math.radians(90), 0, 0, 0, 0, 0, 0], speed=speed, is_radian=True, wait=True) print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) @@ -78,5 +78,5 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm7/2002-move_joint.py b/example/wrapper/xarm7/2002-move_joint.py index 05d6476d..dd0a7468 100644 --- a/example/wrapper/xarm7/2002-move_joint.py +++ b/example/wrapper/xarm7/2002-move_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 arm.set_servo_angle(angle=[90, 0, 0, 0, 0, 0, 0], speed=speed, is_radian=False, wait=True) @@ -62,7 +62,7 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = math.radians(50) arm.set_servo_angle(angle=[math.radians(90), 0, 0, 0, 0, 0, 0], speed=speed, wait=True) print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) @@ -78,5 +78,5 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm7/2003-move_joint.py b/example/wrapper/xarm7/2003-move_joint.py index 3e09347b..dc429a1b 100644 --- a/example/wrapper/xarm7/2003-move_joint.py +++ b/example/wrapper/xarm7/2003-move_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 arm.set_servo_angle(servo_id=1, angle=90, speed=speed, wait=True) @@ -61,7 +61,7 @@ arm.set_servo_angle(servo_id=2, angle=0, speed=speed, wait=True) print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = math.radians(50) arm.set_servo_angle(servo_id=1, angle=math.radians(90), speed=speed, is_radian=True, wait=True) @@ -78,5 +78,5 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=True)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm7/2004-move_joint.py b/example/wrapper/xarm7/2004-move_joint.py index 23147034..389154de 100644 --- a/example/wrapper/xarm7/2004-move_joint.py +++ b/example/wrapper/xarm7/2004-move_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 arm.set_servo_angle(servo_id=1, angle=90, speed=speed, is_radian=False, wait=True) @@ -61,7 +61,7 @@ arm.set_servo_angle(servo_id=2, angle=0, speed=speed, is_radian=False, wait=True) print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = math.radians(50) arm.set_servo_angle(servo_id=1, angle=math.radians(90), speed=speed, wait=True) @@ -78,5 +78,5 @@ print(arm.get_servo_angle(), arm.get_servo_angle(is_radian=False)) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect() diff --git a/example/wrapper/xarm7/2005-move_arc_joint.py b/example/wrapper/xarm7/2005-move_arc_joint.py index 57207c36..38c48a6f 100644 --- a/example/wrapper/xarm7/2005-move_arc_joint.py +++ b/example/wrapper/xarm7/2005-move_arc_joint.py @@ -45,7 +45,7 @@ arm.set_mode(0) arm.set_state(state=0) -arm.reset(wait=True) +arm.move_gohome(wait=True) speed = 50 @@ -60,5 +60,5 @@ for angle in angles: code = arm.set_servo_angle(angle=angle, speed=speed, radius=20, wait=False) -arm.reset(wait=True) +arm.move_gohome(wait=True) arm.disconnect()