How to Set Goal Pose for MoveGroupCommander?
I'm trying to set a planning goal for MoveIt! but I keep getting an "Unable to sample any valid states for goal tree" error. My Python code is shown below. Anything wrong with this?
group = MoveGroupCommander("robot_arm_group")
group.allow_replanning(True)
#set start state
group.set_start_state_to_current_state()
#set goal state
target_pose = PoseStamped()
target_pose.header.frame_id = 'base_link'
target_pose.header.stamp = rospy.Time.now()
target_pose.pose.position.x = 1.3
target_pose.pose.position.y = 0.4
target_pose.pose.position.z = 0.6
target_pose.pose.orientation.x = 0.0
target_pose.pose.orientation.y = 0.0
target_pose.pose.orientation.z = 0.0
target_pose.pose.orientation.w = 1.0
group.set_pose_target(target_pose, end_effector_link="forearm")
group.go()
Which tipe of robot are you using? This may be a units issue, x position is 1.3 meters?