How to plan and execute a shortest path using MoveIt?

564 views
Skip to first unread message

Saranya kanagaraj

unread,
Jun 20, 2016, 2:25:31 AM6/20/16
to MoveIt! Users, saranya-k
Hi all, 

I am new to MoveIt. I am developing a pick and place application using schunk LWA4P 6 DOF arm and schunk PG70 gripper. My application is developed in such a manner that, whenever a coordinate is given to the robot, robot will pick the object from that location and place it in the specified location. I am using Move group commander (python) for my application. For every coordinate, i am creating a geometry_msgs.msg.Pose(), planning for the goal and then executing. 

Now, the problem is using MoveIt, i couldn't get the shortest path planned for reaching the goal. It is ending with undesired longer trajectories most of the times. I am using the MoveIt package generated using setup assistant for the arm and gripper. 

My kinematics.yaml contains, 
  kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin
  kinematics_solver_search_resolution: 0.005
  kinematics_solver_timeout: 0.005
  kinematics_solver_attempts: 10

My code, 
   pose_target_pick = geometry_msgs.msg.Pose()
   pose_target_pick.position.x = -0.200  # Reachable coordinate
   pose_target_pick.position.y = -0.200   # Reachable coordinate
   pose_target_pick.position.z = 0.600   # Reachable coordinate
   pose_target_pick.orientation.x = 0
   pose_target_pick.orientation.y = -1.0
   pose_target_pick.orientation.z = 0
   pose_target_pick.orientation.w = 0
   group.set_pose_target(pose_target_pick)
   group.set_start_state_to_current_state()
   plan = group.plan(pose_target_pick) ## calling the planner to compute the plan
   group.go(wait = True) 

At-most my requirement is to get the shortest path planned by MoveIt always. 

Please help me out in resolving the same. 
Thanks in advance.  

v4hn

unread,
Jun 20, 2016, 4:47:32 AM6/20/16
to MoveIt! Users
Heya,

> *My code, *
> pose_target_pick = geometry_msgs.msg.Pose()
> pose_target_pick.position.x = -0.200 # Reachable coordinate
> pose_target_pick.position.y = -0.200 # Reachable coordinate
> pose_target_pick.position.z = 0.600 # Reachable coordinate
> pose_target_pick.orientation.x = 0
> pose_target_pick.orientation.y = -1.0
> pose_target_pick.orientation.z = 0
> pose_target_pick.orientation.w = 0
> group.set_pose_target(pose_target_pick)
> group.set_start_state_to_current_state()
> plan = group.plan(pose_target_pick) ## calling the planner to compute
> the plan
> group.go(wait = True)

try to set a different planner via group's set_planner_id method.
The default default planner tends to produce weird paths.
The different supported planners are listed in <robot>_moveit_config/config/ompl_planning.yaml.


v4hn
signature.asc
Reply all
Reply to author
Forward
0 new messages