Ask Your Question
0

Why can't my robot arm move to specific positions?

asked 2017-06-27 05:46:59 -0600

nubdienub gravatar image

updated 2017-06-28 04:26:36 -0600

Hi, I am using MoveIT with ROS to try to move my robot to a pre defined (hardcoded) position. The problem that I have is that the "easiest" to reach targets cannot be reached, and "harder" targets can be reached. The start state of the robot looks like this:

image description

I have drawn a red box where I want to be able to reach targets. Now, I am using move_group from MoveIT (C++) like this:

int main(int argc, char **argv)
{
  ros::init(argc, argv, "cpp_arm");

  ros::NodeHandle node_handle;

  ros::AsyncSpinner spinner(1);
  spinner.start();  

  static const string PLANNING_GROUP = "arm"; 

  moveit::planning_interface::MoveGroupInterface move_group(PLANNING_GROUP);

  moveit::planning_interface::PlanningSceneInterface planning_scene_interface;

  const robot_state::JointModelGroup *joint_model_group = move_group.getCurrentState()->getJointModelGroup(PLANNING_GROUP);

  ROS_INFO_NAMED("arm", "Reference frame: %s", move_group.getPlanningFrame().c_str());
  ROS_INFO_NAMED("gripper", "End effector link: %s", move_group.getEndEffectorLink().c_str());

  geometry_msgs::Pose target_pose1;

  target_pose1.orientation.w = 1.0;
  target_pose1.position.x = -0.2;
  target_pose1.position.y = 0.1;
  target_pose1.position.z = 0.60;

  move_group.setPoseTarget(target_pose1);

  moveit::planning_interface::MoveGroupInterface::Plan my_plan;

  bool success = move_group.plan(my_plan);

  ROS_INFO_NAMED("arm", "Visualizing plan 1 (pose goal) %s", success ? "" : "FAILED");

  move_group.move();    
}

This results in the robot to move to the specific location:

image description

When you look at this video, you can see the robot twists around itself and move in a strange way to its location.

(ignore the stuttering, its an camera issue):

https://youtu.be/UfdCbqkBx-4

Now, because of this strange movement ( I think ) the robot cannot reach simple positions in front or behind it like this:

image description

And this:

image description

I have used the same positions to move to as where the cubes are located at but it cannot reach them. I am getting the following erros:

Fail: ABORTED: No motion plan found. No execution attempted

And

RRTConnect: Unable to sample any valid states for goal tree

This is my URDF file:

<robot
  name="robotarm">
  <link
    name="base_link">
    <inertial>
      <origin
        xyz="-8.98316883899366E-21 0.0371833197218132 5.84804291418487E-18"
        rpy="0 0 0" />
      <mass
        value="0.736649284793532" />
      <inertia
        ixx="0.00136014146084527"
        ixy="1.34419615815924E-21"
        ixz="-1.66676893429435E-19"
        iyy="0.00201173713380681"
        iyz="9.88817735312407E-20"
        izz="0.00136014146084527" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robotarm/meshes/base_link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0 0 1 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robotarm/meshes/base_link.STL" />
      </geometry>
    </collision>
  </link>
  <link
    name="link_bescherming_voet">
    <inertial>
      <origin
        xyz="1.89715073762982E-17 0.0246076878833881 -1.85713732548366E-17"
        rpy="0 0 0" />
      <mass
        value="0.975479811968255" />
      <inertia
        ixx="0.00283902632376722"
        ixy="-1.66823701635174E-19"
        ixz="-2.59570718767664E-08"
        iyy="0.0055247670044155"
        iyz="8.3179086062007E-19"
        izz="0.00402668154368391" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robotarm/meshes/link_bescherming_voet.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.501960784313725 0.501960784313725 0.501960784313725 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://robotarm/meshes/link_bescherming_voet.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="bescherming_voet"
    type="revolute">
    <origin
      xyz="0 0 0.08"
      rpy="1 ...
(more)
edit retag flag offensive close merge delete

Comments

This is a cross-post of this post on moveit-users. Could I please ask you to not do that? At the very least it will lead to split (and duplicated) discussions about the same issue.

gvdhoorn gravatar imagegvdhoorn ( 2017-06-27 08:21:00 -0600 )edit

And could I ask you to attach your images directly to the post? I've given you enough karma to do that.

Thanks.

gvdhoorn gravatar imagegvdhoorn ( 2017-06-27 08:21:48 -0600 )edit

Please also paste your urdf in the question. Use the Preformatted Text button (the one with 101010 on it) to format it properly.

gvdhoorn gravatar imagegvdhoorn ( 2017-06-27 08:23:28 -0600 )edit

gvdhoorn: such questions are mostly ignored on moveit-users anyway. The list is mostly for announcements.

v4hn gravatar imagev4hn ( 2017-06-27 08:49:12 -0600 )edit

Could be, but I believe it's always better to be explicit about that, instead of staying silent and hoping ppl pick up on it on their own.

gvdhoorn gravatar imagegvdhoorn ( 2017-06-27 09:09:04 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-06-27 09:00:05 -0600

v4hn gravatar image

Are you sure you want the end effector to move to orientation (x,y,z,w)=(0,0,0,1) (quaternion)? Seeing your examples in front and behind the robot makes me wonder about that. If you want position-only goals, you might want to use setPositionTarget instead.

Apart from this, it is a well-known issue that targets fail because of unreachable inverse kinematics requests. If this makes you feel any better: things are going to improve here quite a bit in the near future.

Until then: did you configure your setup to use TracIK for kinematics?

And are you really sure your robot can reach the position & orientation you request?

edit flag offensive delete link more

Comments

And are you really sure your robot can reach the position & orientation you request?

this was what I was thinking as well: @nubdienub: is your robot a 6dof, or a 5dof?

gvdhoorn gravatar imagegvdhoorn ( 2017-06-27 09:36:03 -0600 )edit

Thanks for your answers, the robot is a 6dof robot. Also, I have tried to use setPositionTarget like this:

move_group.setPositionTarget(-0.2,0.1,0.60, "link_montage_grijper");

Which works, it moves to the location and also does not spin 360 degrees (only for about 45 degrees)

nubdienub gravatar imagenubdienub ( 2017-06-28 05:09:01 -0600 )edit

But I also tried this:

move_group.setPositionTarget(-0.2,0.3,0.60, "link_montage_grijper");

And this does not work. By default I have KDL solver but I just downloaded TracIK which cannot yet load: Kinematics solver could not be instantiated for joint group arm. I still have to figure this out.

nubdienub gravatar imagenubdienub ( 2017-06-28 05:10:32 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-06-27 05:46:59 -0600

Seen: 691 times

Last updated: Jun 28 '17