MoveIt! pick and place problem - "The trajectory to execute is empty" - "Initialization failed" [closed]

asked 2015-07-24 07:24:47 -0500

Gengoz gravatar image

updated 2015-07-24 07:26:19 -0500

Hello,

I am trying to get a simple pick and place program to work. I modified this file to work with my MoveIt! package. The resulting code is shown below. When I try to run this code I get the following error:

Error message

It seems the planning goes well, but the moment the plan is executed this error appears. Also, when I simulate in RVIZ the 'planning model' of the robot seems to be moving without any problems. The 'real robot model' though, is not moving whatsoever. Which seems to correspond pretty well with the error message.

I've been stuck on this error for almost the entire day and have no clue where it comes from. Does anyone have an idea on what could be the problem?

Thank you for your help!

The code:

/*********************************************************************
*
* Software License Agreement (BSD License)
*
*  Copyright (c) 2012, Willow Garage, Inc.
*  All rights reserved.
*
*  Redistribution and use in source and binary forms, with or without
*  modification, are permitted provided that the following conditions
*  are met:
*
*   * Redistributions of source code must retain the above copyright
*     notice, this list of conditions and the following disclaimer.
*   * Redistributions in binary form must reproduce the above
*     copyright notice, this list of conditions and the following
*     disclaimer in the documentation and/or other materials provided
*     with the distribution.
*   * Neither the name of Willow Garage, Inc. nor the names of its
*     contributors may be used to endorse or promote products derived
*     from this software without specific prior written permission.
*
*  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
*  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
*  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
*  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
*  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
*  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
*  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
*  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
*  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
*  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
*  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
*  POSSIBILITY OF SUCH DAMAGE.
*********************************************************************/

/* Author: Ioan Sucan */

#include <ros/ros.h>

// MoveIt!
#include <moveit/planning_scene_monitor/planning_scene_monitor.h>
#include <moveit/move_group_interface/move_group.h>
#include <shape_tools/solid_primitive_dims.h>
//#include <manipulation_msgs/Grasp.h>

static const std::string ROBOT_DESCRIPTION="robot_description";

void pick(moveit::planning_interface::MoveGroup &group)
{
  std::vector<moveit_msgs::Grasp> grasps;

  geometry_msgs::PoseStamped p;
  p.header.frame_id = "base_link";
  p.pose.position.x = 0.5;
  p.pose.position.y = -0.7;
  p.pose.position.z = 0.5;
  p.pose.orientation.x = 0;
  p.pose.orientation.y = 0;
  p.pose.orientation.z = 0;
  p.pose.orientation.w = 1;
  moveit_msgs::Grasp g;
  g.grasp_pose = p;

  g.pre_grasp_approach.direction.vector.x = 1.0;
  g.pre_grasp_approach.direction.header = p.header;
  g.pre_grasp_approach.min_distance  = 0.1;
  g.pre_grasp_approach.desired_distance = 0.2;

  g.post_grasp_retreat.direction.header = p.header;
  g.post_grasp_retreat.direction.vector.z = 1.0;
  g.post_grasp_retreat.min_distance = 0.1;
  g.post_grasp_retreat.desired_distance ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2017-04-15 10:30:26.776884

Comments

Hi, I wonder if you have found the solution to this problem... I have the same

Davide Faconti gravatar image Davide Faconti  ( 2016-11-30 03:35:35 -0500 )edit

I'm sorry to say that it has been a very long time since I last worked on this project. I think I solved it in the end but I wouldn't know how I did it back then. I'm afraid I also don't have time to dive back into the project to see how I did it. Sorry, I hope you will be able to figure it out.

Gengoz gravatar image Gengoz  ( 2016-11-30 12:48:53 -0500 )edit

Hi i am working on ABB IRB 4600 .. I am getting the same error as you got .Please any clue how to figure out this problem .. Thanks !

Muneeb gravatar image Muneeb  ( 2017-04-26 08:30:05 -0500 )edit