ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ur_robot_driver: test_move.py keeps on "waiting for server..."

asked 2020-02-17 20:25:01 -0500

brodwix gravatar image

Hello, i wish i could run the script "test_move.py" included in the package the same way it was done with ur_modern_driver. My ROS version is Kinetic and i'm using Ubuntu 16.04. Actually working with the simulator URSim, no physical robot tested.

these were the steps i made:

$roscore

$roslaunch ur_robot_driver ur5_bringup.launch robot_ip:=127.0.0.1 kinematics_config:=/home/bruno/my_robot_calibration.yaml

rosrun ur_robot_driver test_move.py

after running the last command, i get "Waiting for server" and nothing happens...

in another terminal i put $rqt_graph and as i guessed, the test_move node is connected to nothing.

rosgraph2

I'm not sure what I can do next...

Thank you in advance for your time and help

edit retag flag offensive close merge delete

Comments

i wish i could run the script "test_move.py" included in the package the same way it was done with ur_modern_driver

please clarify: UniversalRobots/Universal_Robots_ROS_Driver does not provide any test_move.py, so I'm not sure what you're saying here.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-18 02:57:33 -0500 )edit

-Does your test_move.py use the move comander (like the the moveIT tutorials?) -do you have the fmauch branch with the moveIT configurations of the Universal_robots driver? (or are you using the deprecated ur_modern driver? )

If so i suggest launching the robot, than either the demo,

roslaunch ur5_moveit_config demo.launch

or alternately the move group:

roslaunch ur5_moveit_config move_group.launch

than run your python script

Wifi-cable gravatar image Wifi-cable  ( 2020-02-18 04:28:22 -0500 )edit

@Wifi-cable: ur_robot_driver and ur_modern_driver use different names for the action servers. That's most likely why OP has the script just sitting there "waiting for controllers". test_move.py was not written for ur_robot_driver (it's also not included with it), hence the mismatch.

If so i suggest launching the robot, than either the demo,

demo.launch (or actually: the nodes it starts) doesn't interact with ur_hardware_interface, so I'm not sure how starting it would help.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-18 05:53:01 -0500 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2020-02-18 09:13:27 -0500

brodwix gravatar image

hello and thank you both for your answers,

please clarify: UniversalRobots/Universal_Robots_ROS_Driver does not provide any test_move.py, so I'm not sure what you're saying here.

@gvdhoorn, sorry, i forgot to mention that i moved the script "test_move.py" from fmauch_universal_robot package to Universal_Robots_ROS_Driver package in order to run it.

The solution i found yesterday was changing line 94 on "test_move.py"

(https://github.com/fmauch/universal_r...)

from

‘follow_joint_trajectory’

to

'scaled_pos_traj_controller/follow_joint_trajectory'

that made the robot to run the script. I guess this is because of the names given for the action servers like @gvdhoorn said or posibbly because of the way the robot is controlled now (via ExternalControl URCap)

this is the graph result i got. rosgraph3

edit flag offensive delete link more

Comments

Hi @brodwix, great you got this working. I'm currently trying to do the same thing but having the same problems. Unfortunately your fix didn't work for me. Would it be possible for you to share your repo layout (or even to where exactly you copied the test_move.py) so that I might be able to fix mine. Thanks in advance!

Vuro H gravatar image Vuro H  ( 2020-04-19 15:54:54 -0500 )edit
1

Hello, sorry for the late response... i just copied "test_move.py" from fmauch_universal_robot package to Universal_Robots_ROS_Driver package...

my layout back then was just this:

catkin_ws
-build
-devel
-src
 -fmaucn_universal_robot (copy "test_move.py" from here)
 -Universal_Robots_ROS_Driver
    - ...
    - test_move.py

After this, i changed line 94 and that did the trick ;)

I'm actually working with Ubuntu 19.04 and ROS Melodic because the Universal_Robots_ROS_Driver repo recommended this... but you can still work with Kinetic (for me is the best option, because URSim is not compatible with Ubuntu 19.04.

Good Luck!

brodwix gravatar image brodwix  ( 2020-04-21 21:39:39 -0500 )edit

i did the same still it is showing the same error "waitng for server ...")

  1. catkin_ws -build -devel -src -fmaucn_universal_robot (copy "test_move.py" from here) -Universal_Robots_ROS_Driver
    • ...
    • test_move.py

mine same as above layout changed the line but not working

"def main():
global client
try:
    rospy.init_node("test_move", anonymous=True, disable_signals=True)
    client = actionlib.SimpleActionClient('scaled_pos_traj_controller/follow_joint_trajectory', FollowJointTrajectoryAction)
    print "Waiting for server..."

above is the part of the python code i changed

nullspace gravatar image nullspace  ( 2020-11-02 03:21:29 -0500 )edit
0

answered 2021-05-02 20:59:08 -0500

suho0515 gravatar image

hello, I've solved it out with the guide from you guys but little bit edited information.

following Universal_Robots_ROS_Driver/ur_robot_driver/doc/ROS_INTERFACE.md

we should change the topic name from "follow_joint_trajectory" to "scaled_pos_joint_traj_controller/follow_joint_trajectory", you should aware that there is word added 'joint'.

and you don't need to change the directory of "test_move.py", just run it in "~/catkin_ws/src/fmauch_universal_robot/ur_driver"

most Importantly, after change your "test_move.py" file. you should follow these steps.

  1. power on the robot.
  2. release brake of the robot.
  3. start URcap+ program "ExternalControl".
  4. run "roslaunch ur_robot_driver [YOUR_ROBOT_MODEL]_bringup.launch robot_ip:=[YOUR_ROBOT_IP]"
  5. run "rosrun ur_driver test_move.py "

then your robot is gonna move follow the joint value you've set in "test_move.py".

Q1 = [1.7,-1.6,-0.87996,-2.12741,1.47178,-4.60472]

Q2 = [1.6,-1.7,-0.87996,-2.12741,1.47178,-4.60472]

Q3 = [1.5,-1.8,-0.87996,-2.12741,1.47178,-4.60472]

!!! Caution !!! You should not use the default value in "test_move.py". you should check the joint value of your robot, and gotta set it safely.

edit flag offensive delete link more

Comments

Hi, thank you for your comment. Following your guide, problem solved!

drzengty gravatar image drzengty  ( 2021-06-09 09:10:32 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-02-17 20:15:58 -0500

Seen: 780 times

Last updated: May 02 '21