Ask Your Question

Beginner Question on UR5 robot simulation on Gazebo with Rviz visualization.

asked 2019-03-20 09:05:53 -0500

Meric gravatar image


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

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',
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

plan1 = group.plan()
display_trajectory = moveit_msgs.msg.DisplayTrajectory()
display_trajectory.trajectory_start = robot.get_current_state()

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

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 ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-03-20 10:34:16 -0500

Meric gravatar image


I am not sure if anyone going to answer this question, but for the poeple who are facing similar problems, I wish this would help. Didn't changed anything in process, but I changed the Pose I would like to make to:

pose_target.position.x = 0.1   #0.1
pose_target.position.y = 0.2   #0.2
pose_target.position.z = 0.6   #0.6

And after that I add a code line as below to move my robot on Gazebo:


And everything worked fine, Hope this Tutorial like question helps some one :D

edit flag offensive delete link more


thanks a lot

nullspace gravatar image nullspace  ( 2020-11-06 09:58:40 -0500 )edit

but i am getting

  • '''rosrun ur_driver [rosrun] Couldn't find executable named below /home/user/ur10_ws/src/universal_robot/ur_driver [rosrun] Found the following, but they're either not files, [rosrun] or not executable: [rosrun] /home/user/ur10_ws/src/universal_robot/ur_driver/'''
nullspace gravatar image nullspace  ( 2020-11-06 10:08:25 -0500 )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



Asked: 2019-03-20 09:04:27 -0500

Seen: 352 times

Last updated: Mar 20 '19