Universal Robots Forum

URSIm with ROS package ur_robot_driver

I am trying to develop an application to control the UR using ROS. I am in the process of purchasing the manipulator but want to validate the functionality before I get an access to the hardware. To replicate the workflow I am using the following

  • URSim simulator for e series robot, running on Virtual Machine

  • Linux machine with Ubuntu 18.04, ROS melodic and ur_robot_driver ROS package

I have followed all the steps mentioned here to configure the simulator to connect with ROS driver. I am able to connect to the simulator via ROS, however soon after connecting to the simulator using ROS, the following error appears (continuously) on the terminal.

  • [ERROR] Could not get fresh data package from robot

And as the error suggest, there is not data coming from the simulator (I don’t see anything if I echo any of the ROS topics like /joint_states).

I referred few discussions in the forum regarding the similar error and it seems people have faced this error due to high latency between ROS computer and hardware, or due to heavy load on the ROS computer.

It will be really great if someone can provide a workaround which allows me to test the functionality I am developing using URSim and ROS. I can afford a bad / discontinuous movement of the robot as it is just for verification. I just need a workaround which prevents the communication drop between ROS and URSim.

I’ve seen this happening when developing with URSim from time to time, but not constantly. However, if this isn’t happening too much (if you only get one line of this and not a wall of those errors) the driver should be keeping the connection.

The error is persistent in my case. Basically, I am not receiving any data at ROS driver. I don’t get anything if I echo any of the topics.

Can you please share the system configuration / setup you used ? Like a VM for the simulator and a host computer with Ubuntu for ROS or you installed the linux version of URSim in the host computer itself ? Also did you modify any parameters like keepalive timeout etc in the files provided by UR ?

Hi @dparikh,

If it is due to performance issue you can try to modify starturcontrol.sh

SCRIPT_DIR=$(dirname $(readlink -f $0))
HOME=$SCRIPT_DIR $SCRIPT_DIR/URControl -d 2000 -r &>$SCRIPT_DIR/URControl.log &

defualt value for -d|--sim-cycle-period Sets the cycle time used for simulation. is 2000us for the e-Series if you increase the number you will lower the load, but also slow down robot execution time/movement.

Hope it helps you for the verification.