Skip to content

Commit

Permalink
remove ground plane and add new script to switch to impedance mode (w…
Browse files Browse the repository at this point in the history
…ithout moving)
  • Loading branch information
armlab committed Oct 10, 2023
1 parent 7c4918a commit 3614537
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions arm_robots/scripts/utility/switch_to_impedance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#! /usr/bin/env python
from victor_hardware_interface_msgs.msg import ControlMode
import rospy
from arm_robots.victor import Victor
import sys
import argparse

if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--left", action="store_true")
parser.add_argument("--right", action="store_true")
args = parser.parse_args(rospy.myargv(sys.argv[1:]))

rospy.init_node("switch_to_impedance")

victor = Victor(robot_namespace='victor')
victor.connect()

if args.left:
print("left")
victor.set_left_arm_control_mode(ControlMode.JOINT_IMPEDANCE)
if args.right:
print("right")
victor.set_right_arm_control_mode(ControlMode.JOINT_IMPEDANCE)

0 comments on commit 3614537

Please sign in to comment.