Simulating distance sensor——革命制度党ntable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) + - - -论坛:通用RoboDK问题(//www.sinclairbody.com/forum/Forum-General-questions-about-RoboDK) +--- Thread: Simulating distance sensor (/Thread-Simulating-distance-sensor) |
Simulating distance sensor-Kbutts-03-11-2023 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? RE: Simulating distance sensor-Sam-03-11-2023 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: //www.sinclairbody.com/doc/en/PythonAPI/robodk.html?highlight=collision_line#robodk.robolink.Robolink.Collision_Line Or you use this to get a present/not present flag on touch: //www.sinclairbody.com/addin/com.robodk.plugin.plugincollisionsensor The source code is available in our GitHub. |