Why can't my robot arm move to specific positions?
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:
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:
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):
Now, because of this strange movement ( I think ) the robot cannot reach simple positions in front or behind it like this:
And this:
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 ...
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.And could I ask you to attach your images directly to the post? I've given you enough karma to do that.
Thanks.
Please also paste your urdf in the question. Use the Preformatted Text button (the one with
101010
on it) to format it properly.gvdhoorn: such questions are mostly ignored on
moveit-users
anyway. The list is mostly for announcements.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.