Git Product home page Git Product logo

universal_robots_externalcontrol_urcap's Introduction

URCaps External Control

The External Control URCap is the user interface for the Universal Robots ROS, ROS2 and Isaac SDK driver, as well as the Universal Robots Client Library used by the drivers.

It supports the Universal Robots CB3 and e-Series robots.

Prerequisites

As this URCap is using swing to implement the user interface, the URCap library in version 1.3.0 or higher is required. Therefore the minimal PolyScope versions are 3.7 and 5.1.

Usage

  • In the Installation tab of Polyscope:
    • Adjust the IP address of your robot in the Installation tab of Polyscope (this step might be unnecessary in simulation).
  • On the remote PC:
    • Launch the suitable launch file for UR3/UR5/UR10 and CB3/e-series.
  • In the Program tab of Polyscope:
    • Add this URcap to a program by selecting it from the side menu under the tab URcap.
    • Execute the program by pressing the play button in the Program tab of Polyscope.

Multiple URCap nodes

To use this URCap node multiple times in a ur program, the control script is divided into two scripts. After receiving the script, it is divided into a header part and a control loop part. The header part consist of all the function deffinitions. The header is only inserted once in the program, while the control loop is inserted for each URCap node in the program tree.

To be able to distinguish between header and control loop, the header part of the script should be encapsulated in:

# HEADER_BEGIN
Here goes the header code
# HEADER_END

# NODE_CONTROL_LOOP_BEGINS
Here goes the control loop code
# NODE_CONTROL_LOOP_ENDS

If its not possible to find either # HEADER_BEGIN or # HEADER_END, the script will not be divided into two scripts and it will not be possible to have multiple URCap nodes in one program.

Acknowledgment

Developed in collaboration between:

Universal Robots A/S   and   FZI Research Center for Information Technology.

rosin_logo

Supported by ROSIN - ROS-Industrial Quality-Assured Robot Software Components. More information: rosin-project.eu

eu_flag

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement no. 732287.

universal_robots_externalcontrol_urcap's People

Contributors

baerenstark2 avatar dependabot[bot] avatar fmauch avatar gavanderhoorn avatar ipa-lth avatar leastef avatar urmahp avatar urrsk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

universal_robots_externalcontrol_urcap's Issues

Connecting to a machine with an active firewall blocks for a long time

As this URCap tries to receive script code from a remote host in each program as soon as it is installed (see #1), this is quite serious.

When having a remote machine connected, that blocks remote connections, the installation part will try to connect to the remote machine for a very long time (see UniversalRobots/Universal_Robots_ROS_Driver#74 and UniversalRobots/Universal_Robots_ROS_Driver#237).

Depending on the reason for being blocked, this may lead into an IOException (in case of an active firewall) or into some other exception (in case of a misconfigured IP setup? as in UniversalRobots/Universal_Robots_ROS_Driver#237).

To reproduce this:

Setup this URCap with a working ROS driver, then activate a firewall on the remote machine by installing ufw and then

sudo ufw default deny
sudo ufw enable

Starting any program on the TP will result in a long program start with a "In progress" popup message until finally raising the popup from this line.

I am no java expert, but my assumption is that we could tune a timeout parameter somewhere in the connection setup. The connect() method offers this, but currently isn't directly used. The connection attempt could be changed to setup a custom timeout. However, I think solving #1 should be the preferred way to mitigate this which is why I currently don't plan to put any effort into this.

Cannot run URCap program within a UR5 due to `Play` button is disabled

Hi, I fresh new to universal robot and I'm using Universal_Robots_Client_Librarywhich is based on URCap here to connect with robot?
After I have loaded URCap with version 1.0.5 into robot controller by usb device and everthing is fine. But I still cannot connect to robot(or send script into robot) successfully.

And I notice one of the steps "run program by press play button", but my play button is disabled!!

What did I missed?

not able to open socket reverse_socket to host 172. ... at port 50001 in WSL2

First my setup:
ROS2 Foxy
Ubuntu 20.04
in WSL2 (Windows Subsystem for Linux)
MoveIt!
ROS UR Driver
Notebook (192.168.1.102) network connection to Robot
WSL2 has IP with 172.19.x.x but I use a port forwarding script that works great in other context.

Starting ROS UR Driver and RViz with following commands:

ros2 launch ur_bringup ur_control.launch.py ur_type:=ur10e robot_ip:=192.168.1.101 launch_rviz:=false
ros2 launch avoid_obstacle_scene my_ur_moveit.launch.py ur_type:=ur10e robot_ip:=192.168.1.101 launch_rviz:=true

(similar to ur_bringup ur_moveit.launch.py)

The Problem is now, that the RemoteControl URCap tries to access the wrong IP Address although the 192.168.1.102 is configured in the URCap installation.

Network connection works also, I can Ping the Robot from WSL2 and see Jointangles in RViz.

The only issue is that the UR Cap tries to open a socket at the wrong IP Address.

Suggestion: Inject the remote's IP address into the script code

Currently, we use the configured remote's IP address only for accessing the script_sender port. Our protocol specification from the client library requires two additional ports, the reverse port and the trajectory port.

The IP address of those get injected into the script code sent from the remote side, where it either gets automatically deduced from the interface that connects to the RTDE port if no particular address is passed in (see this line).

This complicates setup a bit, as users have to specify their remote PC's address twice. Once in the URCap installation and once when starting the client application. An example using the docker simulation:

docker run --rm -it -p 5900:5900 -p 6080:6080 -p 29999:29999 -p 30001:30001 -p 30004:30004 -p 30002:30002 universalrobots/ursim_e-series

This will bind the interfaces from URSim to localhost and therefore the default reverse IP used in the client library is 127.0.0.1. However, from inside the docker container this will not correspond to the host machine. For the reverse interface we want to connect to <host_ip>:50001 by default.

With saving the Installation remote's IP into the script code we can reuse that inside the actual script code instead of replacing it with the host ip on the remote side.

I'm not feeling completely happy with this, as this introduces a syntax dependency between the URCap and the client library, but it would definitely reduce the user's setup requirements.

Related issues from the drivers:

Simple test server

I have made a simple python3 test server to be used together with the External Control URCap.
In the future, It could be used as a tool for testing the URCap, as well as a simple tool to test script code on the robot.

But where should I place it? in a 'example' or 'test'?

External Control doesn't work on Macbook

Hi Everyone,
I've problem with connection of the UR5e with my Docker image installed on my Macbook (version 2017). The ur5e and my Macbook are connected via router with lan cables. When I do the connection with roslaunch ur_calibration calibration_correction.launch robot_ip:=[ROBOT_IP] target_filename:="${HOME}/my_robot_calibration.yaml" the PC see the UR5e but when I do the connection with external control, for move it, on the tablet of the UR5e with the IP address of my MacBook, I have the error: The connection to the remote PC at [ROBOT_IP] could not be established...
I've disabled on my Macbook the Firewall, but the robot still not connected. I don't know why I have this problem because on the other machine that I use with Ubuntu 18.04 work perfectly. Maybe the problem could be the "hub usb c -> lan"?
How can I resolve this problem?

Thanks a lot for your help guys!

Docker Image version:

  • Ubuntu 18.04
  • Ros-Melodic
    MacBook (2017 with usb-c):
  • Mac OS Monterey 12.3

Cannot get the USB recognized properly by the teaching pendant

Hello,

I'm trying to follow the guidance here and on the main UR-ROS documentation pages but I'm not sure what I'm doing wrong.

When I use an almost brand new USB stick, load the URCAP file and plug it into the teaching pendant, it claims that it is improperly formatted, but when I confirm I would like it to properly format it, it takes 2 seconds and claims it is done. Unplugging and plugging the USB yields the same error. When I plug it into a windows machine, the folder is no longer pulled up. Plugging the "formatted" USB into a linux machine shows me the original folder with no formatting having been performed.

Would you have some guidance on how to get this to be recognized by the TP?

Any help is appreciated. Thank you

UR5e extrapolating the trajectory control command send via ROS at 50Hz

I using the external control URCap to communicate to the UR using ROS. The trajectory control command is generated in ROS at 50Hz but since the UR5e operates at 500Hz it seems to be extrapolating the command which results in higher acceleration and velocities compared to ROS.

Could you suggest if URscript is interpolating the ROS trajectory command linearly or projecting the command and correcting when it receive new one while doing the extrapolation?

Screendump

We are missing a screen dump of the UR Teach Pending to make it more appealing.
-- Maybe also link to the FZI demo video to show how this node makes it possible to mix external control behaviors like ROS into a UR program.: https://youtu.be/EfEfkXUJwP8?t=45

Multiple instances of node in ur program not possible

With the current implementation it is not possible to have this urcap node more than once in the ur program.

The error message says:
Contextual error: The function set_servo_setpoint is double defined.

This function might be defined in the respective ur-script on the driver side.
However, I imaging that the function itself should be defined in the "installation" part instead of the "node" part.

Check for issues with a blocked remote port

As raised in UniversalRobots/Universal_Robots_ROS_Driver#74 there's the suspicion that once this URCap is installed, a connection attempt is being performed in each program launch.

This can lead to problems when the remote port is blocked e.g. by a firewall.

To clairfy: Does the generate_script function from the InstallationNodeContribution get called even when the node is not part of the program tree? Edit: It does.

"Connection Refused" after normal setup, when pressing "play" on a UR5 teach pendant

I have a Local Network of just one Ubuntu 22 Computer and UR5 CB3 robot with a direct LAN connection. Nothing else is in this network and Ubuntu 22 is updated, and the Firmware of the UR5 is at 3.15.8, the most recent version. I followed this tutorial to set up the driver and this tutorial to set up the robot.
Everything until step 3 of the tutorial works just fine (obviously I adapted the command in step 3 to my UR5 and the robot IP), but in step 4 I am asked to press the play button after loading the program on the teach pendant. I can press the play button, but directly get the error message "Connections refused" by the program.
The command ping 192.168.1.102 generates a normal ping output, so the physical connection seems ok. (The IP of the robot is 192.168.1.102 and the IP of Ubuntu is 192.168.1.101) Furthermore, during the robot setup, I am able to generate a proper .ymal calibration file with this command: $ ros2 launch ur_calibration calibration_correction.launch.py robot_ip:=<robot_ip> target_filename:="${HOME}/my_robot_calibration.yaml, so there MUST exist a way to communicate with the robot.

And now it gets even weirder. When I use netcat nc -lvnp 50002 to listen to the relevant port, while repeating step 3 and 4 of the tutorial, the program does NOT crash, but displays a "starting program... please wait..." screen,but nothing happens. I can not use the teach pendant any more (it recognises my touch by displaying the small cursor, but there is no button to abort the process). But as soon as I stop the netcat command, the program crashes and displays the following error: "Compile error: name 'null' is not defined." "Error Position Line 2"
photo_2024-03-28_15-19-39
I am completely clueless what to do, but I need the robot for my master thesis, so I am a bit desperate. Is there anything I can do?

UR20 support?

I am attempting to run the ur_robot_driver on the remote PC. However, the scaled_pos_joint_trajectory_controller is loading, but not starting. After starting the program on the controller (w/ the External Control URCAP, set to my computer IP:50002), when I use the controller manager to switch to the scaled pos joint controller, I get the following error

[ERROR] [1695674733.591331013]: Robot control is currently inactive. Starting controllers that claim resources is currently not possible. Not starting controller 'scaled_pos_joint_traj_controller'
[ERROR] [1695674733.591480061]: Could not switch controllers. The hardware interface combination for the requested controllers is unfeasible.

If I ssh into the controller, and nc <ip> 50001, then I get the Robot connected to reverse interface. Ready to receive control commands. and the controller shows as running. Is there a reason why the URCAP is not able to send data (i presume) to my remote computer? The port is open as I can nc it.

I am using version 1.0.5 of the URCAP. Universal Robots Software: 5.14.2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.