Robotics StackExchange | Archived questions

How to connect to a real universal robot (ur3)

Hi,

i try to connect ROS from a virtual box (ubuntu 16.04 + kinetic) with a real universal robot (ur3.5.1). I used the moderndriver and the moveit config from universalrobot package. I am able to ping to the robot and the actual position is shown up in the RVIZ interface (even if you move the robot), BUT if i try to plan and execute a trajectory it 'fails' and the robot doesen't move. Also the test_move.py don't work (the connection is build successfully but the robot don't move). On the teach penal of the robot i don't set any special config (just unlock the joints and enable networking) Do you have any idea? Maybe it is because of the virtual box?

Thank you!

Driver:

>`tim@ROS-PC:~$ roslaunch ur_modern_driver ur3_bringup.launch robot_ip:=192.168.0.3
... logging to /home/tim/.ros/log/b96c09dc-e8d5-11e8-b0b0-080027b2a5ed/roslaunch-ROS-PC-2278.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://localhost:46087/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.13
 * /ur_driver/base_frame: base
 * /ur_driver/max_joint_difference: 0.01
 * /ur_driver/max_payload: 3.0
 * /ur_driver/max_velocity: 10.0
 * /ur_driver/max_waiting_time: 2.0
 * /ur_driver/min_payload: 0.0
 * /ur_driver/prefix: 
 * /ur_driver/require_activation: Never
 * /ur_driver/robot_ip_address: 192.168.0.3
 * /ur_driver/servoj_gain: 100.0
 * /ur_driver/servoj_lookahead_time: 1.0
 * /ur_driver/servoj_time: 0.008
 * /ur_driver/servoj_time_waiting: 0.001
 * /ur_driver/shutdown_on_disconnect: True
 * /ur_driver/time_interval: 0.008
 * /ur_driver/tool_frame: tool0_controller
 * /ur_driver/use_lowbandwidth_trajectory_follower: False
 * /ur_driver/use_ros_control: False

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 [2292]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to b96c09dc-e8d5-11e8-b0b0-080027b2a5ed
process[rosout-1]: started with pid [2305]
started core service [/rosout]
process[robot_state_publisher-2]: started with pid [2308]
process[ur_driver-3]: started with pid [2323]
[ INFO] [1542286530.435668630]: Setting up connection: 192.168.0.3:30003
[ INFO] [1542286530.450635527]: Connection established for 192.168.0.3:30003
[ INFO] [1542286530.450806340]: Setting up connection: 192.168.0.3:30001
[ INFO] [1542286530.452408980]: Connection established for 192.168.0.3:30001
[ INFO] [1542286530.458575005]: Got VersionMessage:
[ INFO] [1542286530.458634085]: project name: URControl
[ INFO] [1542286530.458665122]: version: 3.5.1
[ INFO] [1542286530.458695556]: build date: 12-12-2017, 11:25:40
[ INFO] [1542286530.458728250]: Disconnecting from 192.168.0.3:30001
[ INFO] [1542286530.492961865]: ActionServer enabled
[ INFO] [1542286530.493071996]: Use standard trajectory follower
[ INFO] [1542286530.497557112]: Setting up connection: :50001
[ INFO] [1542286530.497790485]: Connection established for :50001
[ INFO] [1542286530.497987392]: Initializing ur_driver/URScript subscriber
[ INFO] [1542286530.504972677]: The ur_driver/URScript initialized
[ INFO] [1542286530.505075917]: Notifier: Pipeline disconnect will shutdown the node
[ INFO] [1542286530.513697572]: Service 'ur_driver/robot_enable' activation mode: Never
[ INFO] [1542286530.513775597]: Starting main loop
[ INFO] [1542286530.514182378]: Starting pipeline RTPacket
[ INFO] [1542286530.514507689]: Setting up connection: 192.168.0.3:30003
[ INFO] [1542286530.514639898]: Setting up connection: 192.168.0.3:30002
[ INFO] [1542286530.514699348]: Starting pipeline StatePacket
[ INFO] [1542286530.516334795]: Connection established for 192.168.0.3:30003
[ INFO] [1542286530.517365609]: Starting ActionServer
[ INFO] [1542286530.517712303]: Trajectory thread started
[ INFO] [1542286530.518147332]: Connection established for 192.168.0.3:30002

after plan and execute:
[ INFO] [1542286828.809732709]: Received new goal
[ INFO] [1542286828.809881742]: Trajectory received and accepted
[ INFO] [1542286828.809996213]: Translating trajectory
[ INFO] [1542286828.810045105]: Executing trajectory with 10 points and duration of 1.170s
[ INFO] [1542286828.810147903]: Attempting to start follower 0x9f6fe78
[ INFO] [1542286828.810239362]: Uploading trajectory program to robot
[ INFO] [1542286828.809732709]: Received new goal

RVIZ after plan and execute:

[ INFO] [1542287075.829970003]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.
[ INFO] [1542287075.830316596]: Planning attempt 1 of at most 1
[ INFO] [1542287075.832333306]: Planner configuration 'manipulator' will use planner 'geometric::RRTConnect'. Additional configuration parameters will be set when the planner is constructed.
[ INFO] [1542287075.833640334]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1542287075.833721744]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1542287075.834002134]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1542287075.834273929]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1542287075.847568467]: RRTConnect: Created 4 states (2 start + 2 goal)
[ INFO] [1542287075.853250226]: RRTConnect: Created 5 states (2 start + 3 goal)
[ INFO] [1542287075.854679245]: RRTConnect: Created 5 states (3 start + 2 goal)
[ INFO] [1542287075.854937318]: RRTConnect: Created 5 states (2 start + 3 goal)
[ INFO] [1542287075.855350644]: ParallelPlan::solve(): Solution found by one or more threads in 0.022344 seconds
[ INFO] [1542287075.855751066]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1542287075.855954968]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1542287075.858739493]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1542287075.859363453]: RRTConnect: Created 4 states (2 start + 2 goal)
[ INFO] [1542287075.861892525]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1542287075.866489735]: RRTConnect: Created 4 states (2 start + 2 goal)
[ INFO] [1542287075.871355743]: RRTConnect: Created 4 states (2 start + 2 goal)
[ INFO] [1542287075.871768590]: RRTConnect: Created 4 states (2 start + 2 goal)
[ INFO] [1542287075.872176040]: ParallelPlan::solve(): Solution found by one or more threads in 0.016534 seconds
[ INFO] [1542287075.872581324]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1542287075.874248886]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1542287075.875898409]: RRTConnect: Created 4 states (2 start + 2 goal)
[ INFO] [1542287075.878196130]: RRTConnect: Created 4 states (2 start + 2 goal)
[ INFO] [1542287075.878643782]: ParallelPlan::solve(): Solution found by one or more threads in 0.006284 seconds
[ INFO] [1542287075.897786350]: SimpleSetup: Path simplification took 0.018958 seconds and changed from 3 to 2 states

Asked by Tim_ros_user on 2018-11-15 04:16:33 UTC

Comments

Can you show us the full error message when you try and execute a trajectory. Just saying it fails doesn't give us much to go on.

Asked by PeteBlackerThe3rd on 2018-11-15 05:15:29 UTC

I have the same problem I don't get errors just a few warnings

Asked by ricktiggelaar on 2018-11-15 06:00:47 UTC

i don't get errors, too. The robot just does not move...

Asked by Tim_ros_user on 2018-11-15 07:45:37 UTC

If you try and plan and execute a trajectory in MoveIt it will always show some useful information in the terminal if it works or if it doesn't work. Can you show us the whole output of the terminal from when you run roslaunch.

Asked by PeteBlackerThe3rd on 2018-11-15 07:49:16 UTC

i added some code

Asked by Tim_ros_user on 2018-11-15 08:15:57 UTC

Answers

The driver must be able to create a reverse connection from the robot to your ROS node.

If that connection doesn't succeed, the driver won't work.

If you're using a VM, they typically use NAT for the network interface, which doesn't let any traffic from the robot through to your ROS node(s).

Asked by gvdhoorn on 2018-11-15 07:00:32 UTC

Comments

Thanks for your answer! Yes, i use NAT in the virtual machine. But i am able to ping the robot and the robot is shown up in RVIZ. So there is some kind of connection... Do you think it is possible to control the robot with a virtual machine?

Asked by Tim_ros_user on 2018-11-15 07:40:26 UTC

Try to switch to a bridged interface for the VM. If that solves the issue of not moving NAT could have been the problem. But I'm not sure of this, it's just something to check.

The reverse conx is only used when commanding motion, so initialisation could appear to be successful, but motion is not.

Asked by gvdhoorn on 2018-11-15 09:50:09 UTC