Exemple #1
0
 def __init__(self,
              robot_model,
              arm_model=None,
              arm_group_name="arm",
              gripper_name="gripper",
              turret_group_name="camera",
              robot_name="locobot",
              init_node=True,
              dxl_joint_states="dynamixel/joint_states",
              kobuki_joint_states="mobile_base/joint_states",
              use_move_base_action=False):
     self.dxl = InterbotixRobotXSCore(robot_model, robot_name, init_node,
                                      dxl_joint_states)
     self.camera = InterbotixTurretXSInterface(self.dxl, turret_group_name)
     if rospy.has_param("/" + robot_name + "/use_base") and rospy.get_param(
             "/" + robot_name + "/use_base") == True:
         self.base = InterbotixKobukiInterface(robot_name,
                                               kobuki_joint_states,
                                               use_move_base_action)
     if rospy.has_param("/" + robot_name +
                        "/use_perception") and rospy.get_param(
                            "/" + robot_name + "/use_perception") == True:
         self.pcl = InterbotixPointCloudInterface(robot_name + "/pc_filter",
                                                  False)
     if arm_model is not None:
         self.arm = InterbotixArmXSInterface(self.dxl, arm_model,
                                             arm_group_name)
         self.gripper = InterbotixGripperXSInterface(self.dxl, gripper_name)
         if rospy.has_param("/" + robot_name +
                            "/use_armtag") and rospy.get_param(
                                "/" + robot_name + "/use_armtag") == True:
             self.armtag = InterbotixArmTagInterface(
                 robot_name + "/armtag", robot_name + "/apriltag", False)
Exemple #2
0
 def __init__(self,
              robot_model,
              robot_name=None,
              position_p_gain=800,
              init_node=True):
     self.dxl = InterbotixRobotXSCore(robot_model, robot_name, init_node)
     self.hex = InterbotixHexapodXSInterface(self.dxl, position_p_gain)
     self.pixels = InterbotixRpiPixelInterface(self.dxl.robot_name)
Exemple #3
0
 def __init__(self,
              robot_model,
              arm_model=None,
              arm_group_name="arm",
              gripper_name="gripper",
              turret_group_name="camera",
              robot_name="locobot",
              init_node=True,
              dxl_joint_states="dynamixel/joint_states",
              kobuki_joint_states="mobile_base/joint_states",
              use_move_base_action=False):
     # Create DYNAMIXEL core interface
     self.dxl = InterbotixRobotXSCore(robot_model=robot_model,
                                      robot_name=robot_name,
                                      init_node=init_node,
                                      joint_state_topic=dxl_joint_states)
     # Create turret interface for the camera
     self.camera = InterbotixTurretXSInterface(core=self.dxl,
                                               group_name=turret_group_name)
     # Create Kobuki Interface if using base
     if rospy.has_param("/" + robot_name +
                        "/use_base") and rospy.get_param("/" + robot_name +
                                                         "/use_base"):
         self.base = InterbotixKobukiInterface(
             robot_name=robot_name,
             kobuki_joint_states=kobuki_joint_states,
             use_move_base_action=use_move_base_action)
     # Create PointCloud Interface if using perception
     if rospy.has_param("/" + robot_name +
                        "/use_perception") and rospy.get_param(
                            "/" + robot_name + "/use_perception"):
         self.pcl = InterbotixPointCloudInterface(robot_name=robot_name +
                                                  "/pc_filter",
                                                  init_node=False)
     # Create Arm and Gripper interfaces if LoCoBot has an arm (if arm_model was specified)
     if arm_model is not None:
         self.arm = InterbotixArmXSInterface(core=self.dxl,
                                             robot_model=arm_model,
                                             group_name=arm_group_name)
         self.gripper = InterbotixGripperXSInterface(self.dxl, gripper_name)
         # Create ArmTag interface if using armtag
         if rospy.has_param("/" + robot_name +
                            "/use_armtag") and rospy.get_param(
                                "/" + robot_name + "/use_armtag"):
             self.armtag = InterbotixArmTagInterface(
                 armtag_ns=robot_name + "/armtag",
                 apriltag_ns=robot_name + "/apriltag",
                 init_node=False)
Exemple #4
0
 def __init__(self,
              robot_model,
              group_name="arm",
              gripper_name="gripper",
              robot_name=None,
              moving_time=2.0,
              accel_time=0.3,
              use_gripper=True,
              gripper_pressure=0.5,
              gripper_pressure_lower_limit=150,
              gripper_pressure_upper_limit=350,
              init_node=True):
     self.dxl = InterbotixRobotXSCore(robot_model, robot_name, init_node)
     self.arm = InterbotixArmXSInterface(self.dxl, robot_model, group_name,
                                         moving_time, accel_time)
     if gripper_name is not None:
         self.gripper = InterbotixGripperXSInterface(
             self.dxl, gripper_name, gripper_pressure,
             gripper_pressure_lower_limit, gripper_pressure_upper_limit)
Exemple #5
0
 def __init__(self, robot_model, robot_name=None, group_name="turret", pan_profile_type="time", pan_profile_velocity=2.0, pan_profile_acceleration=0.3, tilt_profile_type="time", tilt_profile_velocity=2.0, tilt_profile_acceleration=0.3, init_node=True):
     self.dxl = InterbotixRobotXSCore(robot_model, robot_name, init_node)
     self.turret = InterbotixTurretXSInterface(self.dxl, group_name, pan_profile_type, pan_profile_velocity, pan_profile_acceleration, tilt_profile_type, tilt_profile_velocity, tilt_profile_acceleration)