Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Simulating distance sensor

I am trying to test a URscript in simulation while waiting on some long lead time parts, and need to simulate a laser distance sensor mounted on a UR10 EOAT. Is there a way to do this? My first guess is to use the API to have the measure function to perform a measurement from a fixed coordinate in the tool frame along the tool frame z axis until it collided with a surface of a virtual part placed in the model, but there doesn’t seem to be a function to script the measurement tool. Any thoughts?
Do you need to know the distance, or a boolean value is OK?

Take a look at this API call if you need the distance:

Or you use this to get a present/not present flag on touch:
The source code is available in our GitHub.
Please read the Forum Guidelines before posting!
Find useful information about RoboDK by visiting our Online Documentation.

Users browsing this thread:
1 Guest(s)