16 from sr_robot_commander
import SrRobotCommander
17 from geometry_msgs.msg
import PoseStamped, Pose
18 from rospy
import get_rostime
20 from tf
import TransformerROS
25 Commander class for arm 28 def __init__(self, name="right_arm", set_ground=True):
31 @param name - name of the MoveIt group 32 @param set_ground - sets the ground plane in moveit for planning 35 super(SrArmCommander, self).
__init__(name)
36 except Exception
as e:
39 rospy.logerr(
"Couldn't initialise robot commander - is there an arm running?: " + str(e))
51 Sets a plane for the ground. 52 @param height - specifies the height of the plane 53 @param z_position - position in z to place the plane. Should not collide with the robot. 57 pose.pose.position.x = 0
58 pose.pose.position.y = 0
59 pose.pose.position.z = z_position - (height/2.0)
60 pose.pose.orientation.x = 0
61 pose.pose.orientation.y = 0
62 pose.pose.orientation.z = 0
63 pose.pose.orientation.w = 1
64 pose.header.stamp = get_rostime()
65 pose.header.frame_id = self._robot_commander.get_root_link()
66 self._planning_scene.add_box(
"ground", pose, (3, 3, height))
69 return self._move_group_commander.get_pose_reference_frame()
def __init__(self, name="right_arm", set_ground=True)
def set_ground(self, height=0.1, z_position=-0.1)
def get_pose_reference_frame(self)