Problem in getting robot's end-effector pose

29 visningar
Hoppa till det första olästa meddelandet

pulkit singh tak

oläst,
22 nov. 2017 06:01:362017-11-22
till ros-by-example
Hi all

I am using ROS-Indigo and Ubuntu 14.04. I was trying to get the current pose of the robot's end-effector, but instead i always ended up getting the home pose of the end-effector. Below is the code snippet: 

  ros::init(argc, argv, "demo1_node");
  ros::NodeHandle node_handle;
  ros::AsyncSpinner spinner(1);
  spinner.start();
  sleep(2.0);

  moveit::planning_interface::MoveGroup group("arm");
  moveit::planning_interface::PlanningSceneInterface planning_scene_interface;
  


  ros::Publisher display_pubhlisher = node_handle.advertise<moveit_msgs::DisplayTrajectory>("/move_group/display_planned_path", 1, true);

  ROS_INFO("Refernce frame: %s", group.getPlanningFrame().c_str());
  ROS_INFO("End Effecttor Link: %s", group.getEndEffectorLink().c_str());
  ROS_INFO("Planning Frame: %s", group.getPlanningFrame().c_str());
  group.setGoalPositionTolerance(0.00001);
  group.setGoalOrientationTolerance(0.001);

  geometry_msgs::Pose pose1;
  pose1.orientation.w = 0.54822;
  pose1.orientation.x = -0.16945;
  pose1.orientation.y = 0.78237;
  pose1.orientation.z = 0.24216;
  pose1.position.x = 0.23974;
  pose1.position.y = 0.088103;
  pose1.position.z = 0.89513;
  group.setPoseTarget(pose1);
 
  moveit::planning_interface::MoveGroup::Plan my_plan;
  group.plan(my_plan);
  group.move();
  sleep(15.0);
  geometry_msgs::PoseStamped currentPose = group.getCurrentPose("end_eff_link");  // Always returns in end_effector_link
  ROS_INFO_STREAM( "Current pose from moveGroup:  " << currentPose.pose );
  

can somebody please help how else to find the pose of the robot'e end-effector??

Thanks  

Patrick Goebel

oläst,
7 dec. 2017 10:42:442017-12-07
till ros-by-...@googlegroups.com

Hi Pulkit,

I haven't worked with the C++ API for MoveIt (my book uses the Python API).  But I see you posted your question to the moveit-users forum which is what I was going to suggest.

--patrick

Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden