Universal Robots Forum

URSim co-simulation enhancements

As a 3D production simulation software developer I would like to see 2 important features in URSim for using it as a virtual robot controller for “digital twin” simulations.

  1. Writable physical inputs (through the RTDE interface) so the host simulation can emulate sensors and send their state to the UR controller.

  2. Ability for URSim to run all of its scheduling according to an external clock (instead of the real-time clock of the system) so the host simulation software can run the simulation faster or slower than real time without compromising simulation accuracy. The clock ticks would be provided through an API.

These features only apply to the URSim, not real controller. I would assume that #1 is much simpler to implement than #2 and would already improve URSim’s usability in these co-simulation scenarios.
Currently the only workaround for simulating inputs I see is to use the RTDE input registers, but that requires modifying the UR programs for simulation, which is not desirable.

1 Like

@tomi.syvajarvi

Thank you for your feature request, which I believe would be very useful for simulation software.

A few thoughts;
If it is not necessary, to run the PolyScope GUI, but merely test execution of a program (as URScript), and then read the movement values and paths chosen, it might be possible just to launch the URControl process, to perform this execution - and monitor the results over RTDE.

Take a look at the URControl process in the URSim folder.


Perhaps the s, r and d switches would be of interest.

1 Like

I definitely agree with being able to trigger inputs via RTDE as it would be helpful for not only simulation before deploying a robot but debugging issues in the field after deployment. Since we are remote to the robots that are in the field we have no way to test patches to the programs prior to sending them to the customer for use and so have to rely upon the customer to do the testing. Having the ability to trigger inputs in the simulator would be a great help to us.

Right now you can’t influence simulation speed externally, but you can make controller run faster or slower specifying control loop cycle time.
It can be set with -d parameter for controller process that is started in starturcontrol.sh script.
It is specified in micro seconds, so -d2000 will make robot run 4 times faster. After that you can synchronize your software on RTDE packets update frequency if needed.