Robotics StackExchange | Archived questions

ur5 - real hardware communication

Hi all! I tried to communicate with the real UR5 hardware and I was able to move the robot running "testmove.py" from the "urmodern_driver package". After that I tried to move the robot with MoveIt! following this tutorial: Getting Started with a Universal Robot and ROS-Industrial.

Problems arise when launching this command:

roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch limited:=true

In the terminal the following lines appear:

[ WARN] [1529329845.474785699]: Waiting for /joint_trajectory_action to come up
[ WARN] [1529329851.474995251]: Waiting for /joint_trajectory_action to come up
[ERROR] [1529329857.475168563]: Action client not connected: /joint_trajectory_action

So that when i launch MoveIt (by typing roslaunch ur5_moveit_config moveit_rviz.launch config:=true) to try planning and execution, the planning is ok but the execution never works. And the same is with using the limited version (limited:=true).

If I go into the controllers.yaml file and I change action_ns from joint_trajectory_action to follow_joint_trajectory the execution still doesn't work, but the WARNS and the ERROR above does not appear anymore.

Thanks in advance to anyone who will help solving this.

My Ubuntu version: 16.04 ROS Kinetic

edit: here is the output I get when i "roslaunch" the driver

roslaunch ur_modern_driver ur5_bringup.launch limited:=true robot_ip:=192.168.0.9

started roslaunch server http://Kazar:40451/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.13
 * /ur_driver/base_frame: base
 * /ur_driver/max_payload: 5.0
 * /ur_driver/max_velocity: 10.0
 * /ur_driver/min_payload: 0.0
 * /ur_driver/prefix: 
 * /ur_driver/require_activation: Never
 * /ur_driver/robot_ip_address: 192.168.0.9
 * /ur_driver/servoj_time: 0.008
 * /ur_driver/shutdown_on_disconnect: True
 * /ur_driver/tool_frame: tool0_controller

NODES
  /
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    ur_driver (ur_modern_driver/ur_driver)

auto-starting new master
process[master]: started with pid [12815]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 25cfb476-7486-11e8-a63f-2c600c364ff4
process[rosout-1]: started with pid [12828]
started core service [/rosout]
process[robot_state_publisher-2]: started with pid [12839]
process[ur_driver-3]: started with pid [12846]
[ INFO] [1529498015.883288664]: Setting up connection: 192.168.0.9:30003
[ INFO] [1529498015.883464161]: Connection established for 192.168.0.9:30003
[ INFO] [1529498015.883497685]: Setting up connection: 192.168.0.9:30001
[ INFO] [1529498015.883597424]: Connection established for 192.168.0.9:30001
[ INFO] [1529498015.985030774]: Got VersionMessage:
[ INFO] [1529498015.985066182]: project name: URControl
[ INFO] [1529498015.985080850]: version: 3.4.1
[ INFO] [1529498015.985093590]: build date: Apr 03 2017, 13:36:51
[ INFO] [1529498015.985105979]: Disconnecting from 192.168.0.9:30001
[ INFO] [1529498015.993302131]: Setting up connection: :50001
[ INFO] [1529498015.993434163]: Connection established for :50001
[ INFO] [1529498015.993464770]: ActionServer enabled
[ INFO] [1529498015.993524619]: Initializing ur_driver/URScript subscriber
[ INFO] [1529498015.996961509]: The ur_driver/URScript initialized
[ INFO] [1529498015.997002449]: Notifier: Pipeline disconnect will shutdown the node
[ INFO] [1529498016.001166449]: Service 'ur_driver/robot_enable' activation mode: Never
[ INFO] [1529498016.001225580]: Starting main loop
[ INFO] [1529498016.001343519]: Setting up connection: 192.168.0.9:30003
[ INFO] [1529498016.001399087]: Starting pipeline RTPacket
[ INFO] [1529498016.001462871]: Setting up connection: 192.168.0.9:30002
[ INFO] [1529498016.001498371]: Connection established for 192.168.0.9:30003
[ INFO] [1529498016.001525872]: Starting pipeline StatePacket
[ INFO] [1529498016.001595757]: Connection established for 192.168.0.9:30002
[ INFO] [1529498016.002877208]: Starting ActionServer
[ INFO] [1529498016.002966711]: Trajectory thread started
[ INFO] [1529498201.728895558]: Received new goal
[ INFO] [1529498201.728982679]: Trajectory received and accepted
[ INFO] [1529498201.729046988]: Translating trajectory
[ INFO] [1529498201.729080162]: Executing trajectory with 21 points and duration of 2.085s
[ INFO] [1529498201.729100086]: Uploading trajectory program to robot
[ INFO] [1529498203.871003930]: Trajectory executed successfully

in the final rows there is also the information relative to a motion that i was able to execute.

The only problem is that the starting position is different from the real one. What could it be?

Asked by enrico on 2018-06-18 10:04:24 UTC

Comments

Which driver are you starting before you launch ur5_moveit_planning_execution.launch?

Asked by gvdhoorn on 2018-06-18 10:20:41 UTC

ur modern driver. I type this:

roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=IP_OF_THE_ROBOT [reverse_port:=REVERSE_PORT]

Asked by enrico on 2018-06-18 10:38:50 UTC

You use that exact command? You do replace IP_OF_THE_ROBOT with an actual IP, correct? And the [reverse_port:=REVERSE_PORT] part, do you include that as well?

Asked by gvdhoorn on 2018-06-18 10:45:12 UTC

yes i replaced it with the actual IP of the robot. I forgot an important thing: the initial position visualized in Rviz is different from the one of the real robot. Then I change it using the marker, but maybe this doesn't solve the problem (in a terminal i noticed an error referring to this)

Asked by enrico on 2018-06-18 11:49:16 UTC

Everything you write points to the driver not actually having been successfully started. Can you please respond to this:

And the [reverse_port:=REVERSE_PORT] part, do you include that as well?

Please edit your question and show all console output you get when you roslaunch the driver.

Asked by gvdhoorn on 2018-06-18 11:50:20 UTC

Yes I included also the [reverse_port:=REVERSE_PORT] part, without modifying it.

As soon as I will be able to interact with the robot again, I will edit my question showing the console output. I think it will require 1 or 2 days.Thanks for the support

Asked by enrico on 2018-06-18 13:36:02 UTC

Yes I included also the [reverse_port:=REVERSE_PORT] part, without modifying it.

then that is probably your problem. That part is optional, and should only be added if you need it. You probably don't, so don't use it.

Asked by gvdhoorn on 2018-06-18 13:56:43 UTC

Thanks for the update, but please include the full roslaunch command you used to start it as well.

Also: I have the impression you are running the Zagitta fork or ur_modern_driver. It would have been good to mention that in your question text.

Asked by gvdhoorn on 2018-06-20 08:25:41 UTC

the command I launch is the following (after your suggestion of not using REVERS_PORT): roslaunch ur_modern_driver ur5_bringup.launch limited:=true robot_ip:=192.168.0.9 (yes, as you can see I am running ur_modern_driver. I don't even know what Zagitta is)

Asked by enrico on 2018-06-20 08:31:19 UTC

the other 2 commands are:

-roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch limited:=true

-roslaunch ur5_moveit_config moveit_rviz.launch config:=true

I also tried the non-limited version

Asked by enrico on 2018-06-20 08:32:21 UTC

re: Zagitta: you are using this fork: Zagitta/ur_modern_driver, not the original ur_modern_driver package.

Asked by gvdhoorn on 2018-06-20 09:00:25 UTC

Ah ok, you're right on that. Is it ok? News: the initial position problem is solved, it turned out that I had modified the URDF file days ago and I solved by putting all parameters to zero again. But I have a new prob: if I plan and execute a trajec, the real robot doesn't stop in the desired positi

Asked by enrico on 2018-06-20 09:06:39 UTC

it turned out that I had modified the URDF file days ago and I solved by putting all parameters to zero again

that would be a problem, yes.

But I have a new prob: if I plan and execute a trajec, the real robot doesn't stop in the desired positi

this is a know issue, but not something ..

Asked by gvdhoorn on 2018-06-20 09:07:58 UTC

.. I know how to fix right now.

See ThomasTimm/ur_modern_driver#178 for a related issue.

You could see whether Zagitta/ur_modern_driver#9 works for you.

Asked by gvdhoorn on 2018-06-20 09:08:45 UTC

I found the solution! The problem was that what I had to start was "ur5_ros_control.launch" and I had to use the "pos_based_pos_traj_controller" instead of the vel_based one. Another thing I had to do was to find the "factory.h" script in the folder ur_modern_driver/include/ur_modern_driver/ur/ ....

Asked by enrico on 2018-06-22 09:12:33 UTC

... and modify it, around line 95 and 113, where there are two conditionals about minor_versions. They currently say minor_version_ < 3. I had to change the 3's to 2's (I just followed these instructions: https://github.com/olinrobotics/irl/wiki/Tutorial:-Setting-up-and-running-the-UR5-Robotic-Arm)

Asked by enrico on 2018-06-22 09:14:15 UTC

Last thing I did was delete the lines related to [force_torque_sensor_controller] and delete also the call of this controller in the ur5_ros_control.launch around line 43

Asked by enrico on 2018-06-22 09:19:31 UTC

Answers

I bypassed the problem using ros_control instead of ur5_bringup.launch. So on the terminal, in order to connect to UR5, I type:

roslaunch ur_modern_driver ur5_ros_control.launch robot_ip:=["your IP"]

Asked by enrico on 2018-10-11 16:01:51 UTC

Comments