-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove ground plane and add new script to switch to impedance mode (w…
…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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |