Hello,
My problem right now is that I cannot get my arm to move in RVIZ using the settargetpose() function. Here is the code I used to achieve this goal:
#include <ros/ros.h>
#include <moveit/move_group_interface/move_group.h>
int main(int argc, char **argv)
{
ros::init(argc, argv, "lesson_move_group");
ros::AsyncSpinner spinner(1);
spinner.start();
move_group_interface::MoveGroup group("arm");
geometry_msgs::Pose pose = group.getRandomPose().pose;
group.setPoseTarget(pose);
std::string i = group.getEndEffectorLink();
ROS_INFO("eef %s",i.c_str());
bool flag=group.setPoseTarget(pose);
move_group_interface::MoveGroup::Plan plan;
if (!group.plan(plan))
{
ROS_FATAL("Unable to create motion plan. Aborting.");
exit(-1);
}
sleep(1.0);
group.stop();
sleep(1.0); // wait for stop command to be received
return 0;
}
I am able to compile code, the problem is at run time, I get this error:
[ WARN] [1390577959.580079003]: Fail: ABORTED: No motion plan found. No execution attempted.
[FATAL] [1390577959.580175337]: Unable to create motion plan. Aborting.
atlasarm: /usr/include/boost/thread/pthread/pthread_mutex_scoped_lock.hpp:26: boost::pthread::pthread_mutex_scoped_lock::pthread_mutex_scoped_lock(pthread_mutex_t*): Assertion `!pthread_mutex_lock(m)' failed.
Aborted (core dumped)
Why does motion plan get aborted? Shouldn't the pose be possible because I used the group.getRandomPose().pose to get it?
When I used functions like setRandomtarget(), and setJointValueTarget() my robot arm is able to use motionplanning to get to its destination correctly.
The robot I am using is currently a 4DOF arm.
If more information is needed to get to a solution please do not hesitate to ask.
Thanks in advance!
Mike