Jump to content

Atos Professional 2019 - Script for scanning without movement checks


---
 Share

Recommended Posts

Hello,

 

I am using Atos Professional / GOM Software 2019 in combination with an Atos Core 200.

I have a seemingly simple objective for a 3D scanner: to scan without reference points and save raw pointclouds.

I am using the scripting interface, I have the following questions:

  1. After multiple hours searching, I can not find an API reference for the python scripting interface online or in the GOM library. Inspect or dir() functionality tricks do not work on the gom modules. This link exist: https://zeissiqs.github.io/gom-software-python-api/2022/ exists but does not contain atos reference. I am beyond frustrated at this point getting things to work within the scripting environment. Is there any reference information available in a pdf manual?
  2. How to scan without reference points (disable movement check and other errors) from the scripting interface? With gom.script.atos.insert_scan_measurement I cannot get it working, as movement checks cannot be done without reference points.
  3. Is it possible to save raw point clouds? So far I can save only meshes after reconstruction.

Kind regards

Rob

Link to comment
Share on other sites

Scanning without movement checks does not require scripting. You can disable the setting in acquisition parameters.

Understand the frustration with no API manual as such.  But using the record function and 'F2' in the scripting environment gets you a long way.

Raw point clouds are much less common a thing to need.  You can extract an individual measurement at 1:1 , but it really has limited application. Can you elaborate why you want this?  The combination of measurements doesnt generate a pointcloud perse like a laser scanner , so you will struggle to output this style of file, but again in 15 years application engineering experience at GOM i didnt come across a use case where this was the answer so im curious as to your intent .

 

Link to comment
Share on other sites

Hi James,

I am writing a script with socket communication with our robot. The goal is to save a scan without reference points/markers in the camera coordinate system for each viewpoint. Afterwards I want to test registration methods on the scans.

My first problem is I cannot scan without reference points using the scripting interface (as it causes movement check error), I tried a combination of 'set_acquisition_parameters' and 'insert_scan_measurement' which could not disable the movement checks.

I was under the impression that the scanner internally generates point clouds, that are afterwards reconstructed and processed in a mesh. Is this not correct? I could use the vertices of the meshes, but I would prefer the (denser?) point clouds which I think contain less processing.

Best regards,

Rob

Link to comment
Share on other sites

Hi Rob , 

A few things here ..

1. The movement check is a setting that is stored in the project ...so you can create a project template which is blank and has this setting enabled

2. a large and possibly blunt observation...it sounds like you are attempting to make your own automation system trying to move a robot then scan via trigger in code.  If this is the case i can only strongly advise to stop, reassess your goals and not to attempt this direction.  Im aware that the automation options from zeiss are not cheap, but honestly you will spend more time , money and heartache trying to do something by yourself.   Ultimately you are on your own...as its not standard no one can easily help you , there will be no support from the OEM and even if anything works in the end it will be extremely complex that your company will find difficult to run long term 

I am an ex gom employee ,15 yrs application experience, the vast majority around automation .  I hope you can trust my judgement Please talk to your distributor , manager , whoever you need to be absolutely clear what your options are.

3. The software does make meshes from the individual scans it takes.  It performs an alignment of the scans itself , in this case by surface form , the more form the better it will be -  you dont need to do it yourself.  the algorithms fitting data without ref points have greatly improved over the years - you will not achieve better by yourself .   

Further to this the polygonisation does thin and smooth data , this is true , it does also consider a lot of other quality information to make intelligent choices what data is good/ not good to help create the mesh.   Again , there is no chance you can do this by yourself in an external package

 

it could be that you have a very specialist application that needs all these non standard things. All i can say again is to talk to the distributor application engineer before you go too much further.

I hope that you dont mind me being a bit blunt , but ultimately i wouldnt want you wasting your time and money.

Good luck with it all!

Link to comment
Share on other sites

Hello James,

 

Thank you for looking out for my best interest. However, I am looking at these tasks from a research perspective. We are not building a system for production, the goal is to generate data to test algorithms. 

Please sign in to view this quote.

These best fit methods are exactly what we want to compare on scans made by the GOM scanner.

As you might understand, the best comparison would be without many layers of processing. Therefore I am wondering if (through the scripting interface) it is possible to retrieve the underlying data of the resulting meshes. Yes or no?

The automation with the robot is working fine and is quite simple. It does exactly what we need it to do. 

Kind regards,

Rob

Link to comment
Share on other sites

Not sure if this is what you are looking for, but this script will turn each individual measurement in a project into a point cloud

 

# -*- coding: utf-8 -*-

import os
import gom


output_folder=YOUR_FOLDER_HERE

for series in gom.app.project.measurement_series:
	for measurement in series.measurements:
		if measurement.type == 'scan':
			
			gom.script.cad.show_element_exclusively (elements=[measurement])
			gom.script.selection3d.select_all ()
			
			copy_mesh=gom.script.cad.copy_selected_points (select_points_in_copy=True)
			temp_mesh = copy_mesh['copied_elements'][0]
			
			gom.script.selection3d.deselect_all ()
			
			with open(os.path.join(output_folder,'{}-{}.csv'.format(series.name, measurement.name)), 'w') as output:
				for c in temp_mesh.coordinate:
					print(c.x, c.y, c.z, file=output, sep=',')
			
			gom.script.cad.delete_element (elements=[temp_mesh], with_measuring_principle=True)
			
			gom.script.sys.import_ascii (
				files=[os.path.join(output_folder,'{}-{}.csv'.format(series.name, measurement.name))], 
				import_mode='new_elements', 
				template_bin=gom.Binary ('NCBDU1YtUG9pbnRjbG91ZFxfW21tXSAwIDEgMyBVbnVzZWQgMSAxIDYgMiAzIDQgNSA2IDcgMCAwIDMgOCAxOCAzMSAxICwgMCAwICMgMCBOb25lIDAgIDEgMCAwIFwgAH/L'))

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...