Dears,
I would like to move my UR5 manipulator to a certain point as a demo. I downloaded Universal Robot Repo inside my src folder. And after that I wrote this python code inside my package:
#!/usr/bin/env python
import sys
import copy
import rospy
import moveit_commander
import moveit_msgs.msg
import geometry_msgs.msg
from math import pi
from std_msgs.msg import String
from moveit_commander.conversions import pose_to_list
moveit_commander.roscpp_initialize(sys.argv)
rospy.init_node('move_manipulator', anonymous=True)
robot = moveit_commander.RobotCommander()
scene = moveit_commander.PlanningSceneInterface()
group = moveit_commander.MoveGroupCommander("manipulator")
display_trajectory_publisher = rospy.Publisher('/move_group/display_planned_path',
moveit_msgs.msg.DisplayTrajectory)
planning_frame = group.get_planning_frame()
pose_target = geometry_msgs.msg.Pose()
pose_target.orientation.w = 1.0
pose_target.position.x = 0.7
pose_target.position.y = -0.05
pose_target.position.z = 1.1
group.set_pose_target(pose_target)
plan1 = group.plan()
display_trajectory = moveit_msgs.msg.DisplayTrajectory()
display_trajectory.trajectory_start = robot.get_current_state()
display_trajectory.trajectory.append(plan1)
display_trajectory_publisher.publish(display_trajectory);
I run these commands on my catkin_workspace as on different command windows :
roslaunch ur_gazebo ur5.launch
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true
roslaunch ur5_moveit_config moveit_rviz.launch config:=true
rosrun UR5_move_manipulator move_manipulator.py
I run my python code with rosrun command as above. I didn't add any message type to my Cmakelist, I am not sure if it is needed. And when I run my rosrun command for my python code couple error messages comes as below:
In the the tab which I run the second command this error comes:
[ INFO] [1553089676.338055977, 90.592000000]: Planning request received for MoveGroup action. Forwarding to planning pipeline.
[ INFO] [1553089676.338787309, 90.593000000]: Planner configuration 'manipulator' will use planner 'geometric::RRTConnect'. Additional configuration parameters will be set when the planner is constructed.
[ INFO] [1553089676.339013796, 90.593000000]: RRTConnect: Starting planning with 1 states already in datastructure
[ERROR] [1553089681.341224650, 95.125000000]: RRTConnect: Unable to sample any valid states for goal tree
[ INFO] [1553089681.341283935, 95.125000000]: RRTConnect: Created 1 states (1 start + 0 goal)
[ INFO] [1553089681.341312434, 95.125000000]: No solution found after 5.002395 seconds
[ INFO] [1553089681.532901723, 95.311000000]: Unable to solve the planning problem
[ERROR] [1553089681.341224650, 95.125000000]: RRTConnect: Unable to sample any valid states for goal tree
In the third command tab this error comes:
[ INFO] [1553089591.586455466, 14.441000000]: Starting scene monitor
[ INFO] [1553089591.593498572, 14.450000000]: Listening to '/move_group/monitored_planning_scene'
[ INFO] [1553089592.530327471, 15.294000000]: Constructing new MoveGroup connection for group 'manipulator' in namespace ''
[ WARN] [1553089593.378233960, 16.000000000]:
Deprecation warning: Trajectory execution service is deprecated (was replaced by an action).
Replace 'MoveGroupExecuteService' with 'MoveGroupExecuteTrajectoryAction' in move_group.launch
[ INFO] [1553089593.391143543, 16.010000000]: Ready to take commands for planning group manipulator.
[ INFO] [1553089593.391471526, 16.010000000]: Looking around: no
[ INFO] [1553089593.395085999, 16.014000000]: Replanning: no
[ WARN] [1553089593.497794036, 16.096000000]: Interactive marker 'EE:goal_ee_link' contains unnormalized quaternions. This warning will only be output once but may be true for others; enable DEBUG messages for ros.rviz.quaternions to see more details.
And in the rosrun command window this error comes in:
Fail: ABORTED: No motion plan found. No execution attempted.
And I cannot see any movement on Rviz or Gazebo could you please help
Originally posted by Meric on ROS Answers with karma: 23 on 2019-03-20
Post score: 1