Exemplo n.º 1
0
def check_roll_left():
	global LH_rolling
	if robot.LH_mode_roll == False:	
		LH_rolling = False
		robot.left_limb.set_joint_positions(iksolver.ik_solve('left', robot.goalPose))
	else:
		roll('left')
		LH_rolling = True
	return
Exemplo n.º 2
0
    rospy.sleep(0.5)
    rs = baxter_interface.RobotEnable()
    rs.enable()

    # Initialise robot to the given starting pose:
    #	"baxter" - for pick and place tasks
    #	"human" - for mimicking human motion
    robot.initialise("human")

    # Initialise subscribers
    subscribers.create_subs()

    # Flags for "roll mode"
    RH_rolling = False
    LH_rolling = False

    while not rospy.is_shutdown():

        while not robot.poseGoalReached():
            if robot.RH_mode_roll == False:
                RH_rolling = False
                robot.right_limb.set_joint_positions(
                    iksolver.ik_solve('right', robot.goalPose))
                check_roll_left()
            else:
                roll('right')
                RH_rolling = True
                check_roll_left()

    # quit
    quit()
Exemplo n.º 3
0
	# Initialize the ROS node and enable robot
	rospy.init_node("Oculus_Baxter")
	rospy.sleep(0.5)
	rs = baxter_interface.RobotEnable()
	rs.enable()

	# Initialise robot to the given starting pose:
	#	"baxter" - for pick and place tasks
	#	"human" - for mimicking human motion
	robot.initialise("human")

	# Initialise subscribers
	subscribers.create_subs()

	# Flags for "roll mode"
	RH_rolling = False
	LH_rolling = False

	while not rospy.is_shutdown():

		while not robot.poseGoalReached():
			if robot.RH_mode_roll == False:
				RH_rolling = False
				robot.right_limb.set_joint_positions(iksolver.ik_solve('right', robot.goalPose))
				check_roll_left()
			else:
				roll('right')
				RH_rolling = True
				check_roll_left()
	# quit
	quit()