Gocator Library

LEonard LMI Gocator Library

The LMI Gocator product line provides easy inspection and robot guidance. This option adds simple trigger and alignment commands to be able to use the Gocator for general inspection or for robot guidance and part alignment.

Add a Gocator Device to LEonard

Yup. That easy. Now you're talking. This shows how to talk direct or to use the LMI Accelerator- highly recommended!

Automated real-time monitoring

Real-Time Monitoring

LEonard provides real-time monitoring, error reset, and file management capabilities for your LMI Gocator!

LElib.LMI Library for Gocator

LEonard includes buit-in functions for triggering and controlling the Gocator. Data comes back from the Gocator as standard LEmessage strings which set variables in LEonard's LEScript, Java, and Python engines simulteously. Code away!

For aligning the robot based on Gocator data, LEord supplies a buit-in procedure, but this procedure is also available as a Python library so you can learn how to do it... and customize to your heart's content.


These are Gocator support commands built-in to LEonard. As they are not user-modifiable, they should only be used in existing applications.

Lecky Engineering provides a Python library for LEonard that duplicates these capabilities in user-modifiable Python code.

These are discussed after the built-in functions here.

gocator_send(string message)

Sends the command message to the currently selected LMI Gocator. Non-blocking.

gocator_trigger(int pre_delay_ms)

Sends the command trigger to the currently selected LMI Gocator. Delays for pre_delay_ms milliseconds prior to sending the trigger to allow specification of robot mechanical settling time.

gocator_adjust(int version)

This is a built-in fixed adjustment routine in LEonard for hole aligning using the LMI Gocator and a UR robot. It has been used for several applications but is replaced by the new Python version that is user modifiable.

This is a hardcoded adjustment that assumes the use of counterbore, thru hole, and plane tools returning the following variables from the Gocator. The example Gocator job used for testing is at LEonardRoot/3rdParty/Gocator/LEonardHolefinder.job.

Counterbore Tool

gc_decision 0 if counterbore tool succeeded

gc_offset_x Misalignment in X in microns

gc_offset_y Misalignment in Y in microns

gc_offset_z Misalignment in Z in microns

gc_xangle Misalignment angle in X in deg/1000

gc_yangle Misalignment angle in Y in deg/1000

Also Included (Unused in examples)

gc_outer_radius Misalignment angle in Y in deg/1000

gc_depth Misalignment angle in Y in deg/1000

gc_bevel_radius Misalignment angle in Y in deg/1000

gc_bevel_angle Misalignment angle in Y in deg/1000

Hole Tool

gh_decision 0 if thru hole tool succeeded

gh_offset_x Misalignment in X in microns

gh_offset_y Misalignment in Y in microns

gh_offset_z Misalignment in Z in microns

Plane Tool

gp_xangle Misalignment angle in X in deg/1000

gp_yangle Misalignment angle in Y in deg/1000

gocator_write_data(string filename, string tag_name)

This built in fixed routine write the standard Gocator alignment variables to a file. The CSV file created has a timestamp, an optional tag name, and a copy of all the variables returned by the standard Gocator application.

Example file with the returned results in it as built by example program LEonardRoot/Code/Examples/Gocator/10p Static Repeatability.txt



2022-11-06 14:30:56,static_pose,0,-0.0448,0.2962,-0.0272,0.2635,3.1,0.7,100.5,0.9,-0.2,0.0000,2.9,99.2,0,-0.0439,0.2826,-0.0363,0.1331,-0.1,0.0,-0.0385,0.0220

2022-11-06 14:47:53,static_pose,0,-0.0447,0.2961,-0.0272,0.2636,3.1,0.7,100.5,0.9,-0.2,0.0000,2.8,99.2,0,-0.0439,0.2827,-0.0363,0.1332,-0.1,0.0,-0.0386,0.0222

2022-11-06 14:47:56,static_pose,0,-0.0447,0.2964,-0.0273,0.2635,3.1,0.7,100.5,0.9,-0.2,0.0000,2.9,99.6,0,-0.0432,0.2823,-0.0365,0.1335,-0.1,0.0,-0.0387,0.0226

Python Library for Gocator

Lecky Engineering provides a Python library for LEonard that duplicates the built-in functions in user-modifiable Python code.

Load the commands into your sequence and switch into Python processing to use them:



These commands are:






Many example programs using the snapshot camera for alignment are in LEonardRoot/Code/Examples/Gocator.