Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 1441

Grasp a box with youbot

$
0
0
Hello I am currently trying to grasp several small boxes with the youbot. I have set it up with MoveIt, but I cannot figure out how to give it valid a valid pose. I am not concerning myself with proper object recognition(via sensors), so I am trying to get the object position from Gazebo and give it to MoveIt to move the arm next to the box. Currently I am getting the position of the box using the GetModelState service call. But if I feed the pose it returns me to moveit it once again tells me that I have specified a wrong pose. Here is the code: robot = moveit_commander.RobotCommander() scene = moveit_commander.PlanningSceneInterface() arm = moveit_commander.MoveGroupCommander("arm") def listener(): rospy.init_node('listener',anonymous=True) rospy.wait_for_service("/gazebo/get_model_state") try: gms = rospy.ServiceProxy("/gazebo/get_model_state",GetModelState) response = gms("box","youbot::arm_link_5") youbot_node.plan(response) except rospy.ServiceException, e: print "Service call failsed: %s"%e def plan(targetPose): pose_target = geometry_msgs.msg.PoseStamped() pose_target.header.stamp = rospy.Time.now() pose_target.header.frame_id = "/odom" pose_target.pose = targetPose.pose print "=============================" print pose_target arm.go(pose_target) So any idea what I should do to move my arm to the proper position, and then grasp the box?

Viewing all articles
Browse latest Browse all 1441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>