{"action":"created","issue":{"url":"https://api.github.com/repos/ros-planning/moveit/issues/1278","repository_url":"https://api.github.com/repos/ros-planning/moveit","labels_url":"https://api.github.com/repos/ros-planning/moveit/issues/1278/labels{/name}","comments_url":"https://api.github.com/repos/ros-planning/moveit/issues/1278/comments","events_url":"https://api.github.com/repos/ros-planning/moveit/issues/1278/events","html_url":"https://github.com/ros-planning/moveit/issues/1278","id":391554913,"node_id":"MDU6SXNzdWUzOTE1NTQ5MTM=","number":1278,"title":"MoveGroupInterface::pick() always failed at IKConstraintSampler::callIK() due to random seed is used","user":{"login":"sharronliu","id":11764427,"node_id":"MDQ6VXNlcjExNzY0NDI3","avatar_url":"https://avatars2.githubusercontent.com/u/11764427?v=4","gravatar_id":"","url":"https://api.github.com/users/sharronliu","html_url":"https://github.com/sharronliu","followers_url":"https://api.github.com/users/sharronliu/followers","following_url":"https://api.github.com/users/sharronliu/following{/other_user}","gists_url":"https://api.github.com/users/sharronliu/gists{/gist_id}","starred_url":"https://api.github.com/users/sharronliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharronliu/subscriptions","organizations_url":"https://api.github.com/users/sharronliu/orgs","repos_url":"https://api.github.com/users/sharronliu/repos","events_url":"https://api.github.com/users/sharronliu/events{/privacy}","received_events_url":"https://api.github.com/users/sharronliu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-17T04:35:13Z","updated_at":"2018-12-17T06:36:27Z","closed_at":null,"author_association":"NONE","body":"### Description\r\nUse MoveGroupInterface::pick() and the motion planning always failed at IKConstraintSampler::callIK(), due to \"FALSE\" is always passed via the last param \"use_as_seed\".\r\n\r\nAs comparison, when the same target pose passed to MoveGroupInterface::setPoseTarget(), the motion planning always success.\r\n\r\n### Your environment\r\n* ROS Distro: [Kinetic]\r\n* OS Version: Ubuntu 16.04\r\n\r\n### Steps to reproduce\r\n// code section to use MoveGroupInterface::pick(), motion planning always failed at IKConstraintSampler::callIK() due to random seed is used\r\nvoid pick(moveit::planning_interface::MoveGroupInterface& move_group)\r\n{\r\n  std::vector<moveit_msgs::Grasp> grasps;\r\n  grasps.resize(1);\r\n  grasps[0].grasp_pose.header.frame_id = \"**base**\";\r\n  **grasps[0].grasp_pose.pose.orientation.y = -1;\r\n  grasps[0].grasp_pose.pose.position.x = 0;\r\n  grasps[0].grasp_pose.pose.position.y = -0.5;\r\n  grasps[0].grasp_pose.pose.position.z = 0.1;**\r\n\r\n  grasps[0].pre_grasp_approach.direction.header.frame_id = \"base\";\r\n  grasps[0].pre_grasp_approach.direction.vector.z = -1.0;\r\n  grasps[0].pre_grasp_approach.min_distance = 0.08;\r\n  grasps[0].pre_grasp_approach.desired_distance = 0.1;\r\n\r\n  grasps[0].post_grasp_retreat.direction.header.frame_id = \"base\";\r\n  grasps[0].post_grasp_retreat.direction.vector.z = 1.0;\r\n  grasps[0].post_grasp_retreat.min_distance = 0.08;\r\n  grasps[0].post_grasp_retreat.desired_distance = 0.1;\r\n\r\n  move_group.**setStartStateToCurrentState**();\r\n  move_group.**pick**(\"object\", grasps);\r\n}\r\n\r\n// code section to use MoveGroupInterface::setPoseTarget(), motion planning success when same target pose passed.\r\nvoid move(moveit::planning_interface::MoveGroupInterface& move_group)\r\n{\r\n  move_group.**setStartStateToCurrentState**();\r\n  move_group.setPoseReferenceFrame(\"**base**\");\r\n  geometry_msgs::Pose target_pose1;\r\n  **target_pose1.orientation.y = -1;\r\n  target_pose1.position.x = 0;\r\n  target_pose1.position.y = -0.5;\r\n  target_pose1.position.z = 0.1;**\r\n  move_group.**setPoseTarget**(target_pose1, move_group.getEndEffectorLink());\r\n  moveit::planning_interface::MoveGroupInterface::Plan my_plan;\r\n  bool success = (move_group.plan(my_plan) == moveit::planning_interface::MoveItErrorCode::SUCCESS);\r\n  ROS_INFO(\"plan pose goal %s\", success ? \"SUCCESS\" : \"FAILED\");\r\n} // ---> motion planning returns success for this pose.\r\n\r\n### Expected behaviour\r\nIKConstraintSampler::sampleHelper() should return success, since MoveGroupInterface::setPoseTarget() return success when the same target pose passed.\r\n\r\n### Actual behaviour\r\nIKConstraintSampler::callIK() always return failed, due to \"FALSE\" is always passed via the last param \"use_as_seed\".\r\n\r\n### Backtrace or Console output\r\n"},"comment":{"url":"https://api.github.com/repos/ros-planning/moveit/issues/comments/447737829","html_url":"https://github.com/ros-planning/moveit/issues/1278#issuecomment-447737829","issue_url":"https://api.github.com/repos/ros-planning/moveit/issues/1278","id":447737829,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzczNzgyOQ==","user":{"login":"felixvd","id":4535737,"node_id":"MDQ6VXNlcjQ1MzU3Mzc=","avatar_url":"https://avatars0.githubusercontent.com/u/4535737?v=4","gravatar_id":"","url":"https://api.github.com/users/felixvd","html_url":"https://github.com/felixvd","followers_url":"https://api.github.com/users/felixvd/followers","following_url":"https://api.github.com/users/felixvd/following{/other_user}","gists_url":"https://api.github.com/users/felixvd/gists{/gist_id}","starred_url":"https://api.github.com/users/felixvd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixvd/subscriptions","organizations_url":"https://api.github.com/users/felixvd/orgs","repos_url":"https://api.github.com/users/felixvd/repos","events_url":"https://api.github.com/users/felixvd/events{/privacy}","received_events_url":"https://api.github.com/users/felixvd/received_events","type":"User","site_admin":false},"created_at":"2018-12-17T06:36:27Z","updated_at":"2018-12-17T06:36:27Z","author_association":"CONTRIBUTOR","body":"Could you link the part in the code where the parameter `use_as_seed` passes the wrong value, as you say?"}}
{"actor":{"display_login":"felixvd"}}