Пример #1
0
class setRobot:
    def __init__(self):
        self.rob = Robot()
        self.whole_body = self.rob.get('whole_body')
        self.omni_base = self.rob.get('omni_base')
        self.gripper = self.rob.get('gripper')

        # collision_world = self.rob.try_get('global_collision_world')
        # self.whole_body.collision_world = collision_world

        self.whole_body.end_effector_frame = u'hand_palm_link'
Пример #2
0
class SetRobot:
    def __init__(self):
        print("Getting robot infos")
        self.rob = Robot()
        try:
            self.whole_body = self.rob.get('whole_body')
            self.omni_base = self.rob.get('omni_base')
            self.gripper = self.rob.get('gripper')
            self.whole_body.end_effector_frame = u'hand_palm_link'
            print("Infos received")
        except Exception as e:
            print("Fail")
class setRobot:
    def __init__(self):
        s = rospy.Service('grab_the_bag', Grabbag, go_to)
        self.rob = Robot()
        self.whole_body = self.rob.get('whole_body')
        self.omni_base = self.rob.get('omni_base')
        self.gripper = self.rob.get('gripper')

        # collision_world = self.rob.try_get('global_collision_world')
        # self.whole_body.collision_world = collision_world

        self.whole_body.end_effector_frame = u'hand_palm_link'
        rospy.spin()
Пример #4
0
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
import RunAve_fil
#import fuzzy
from std_msgs.msg import Bool
from hsr_handing.msg import grasp_key
from hsr_handing.srv import fuzzy
from hsr_handing.msg import pose_info
from hsrb_interface import geometry
from hsrb_interface import Robot
robot = Robot()
omni_base = robot.try_get('omni_base')
whole_body = robot.try_get('whole_body')
gripper = robot.get('gripper')

_CONNECTION_TIMEOUT = 10.0
# Move timeout[s]
_MOVE_TIMEOUT = 60.0
# Grasp force[N]
_GRASP_FORCE = 0.2
# TF name of the bottle
_BOTTLE_TF = 'ar_marker/150'
# TF name of the gripper
_HAND_TF = 'hand_palm_link'

# Posture that 0.04[m] front and rotate -1.57 around z-axis of the bottle maker
bottle_to_hand = geometry.pose(z=-0.04, ek=-1.57)
# Posture to move the hand 0.02[m] up
hand_up = geometry.pose(x=0.02)