BerkeleyAutomation / meshpy

A 3-D triangular mesh package for Python.
Apache License 2.0
42 stars 21 forks source link

Unscaled translation should be used with autolab_core.SimilarityTransform #5

Open jeasinema opened 6 years ago

jeasinema commented 6 years ago

To make it clear, the whole tranlation can be described as follows:

(1)world coordinate(unscaled)<->(2)world coordinate, but self.origin is the origin(unscaled)<->(3)sdf grid coordinate(scaled)

(3) to (2) is simply a scale transformation(multiplied by the scale factor, a.k.a. self.resolution), (2) to (1) is a translation(added by self.origin).

self.T_grid_sdf_ try to establish a tranform from (3) to (1). Since in autolab_core==0.0.4, SimilarityTransform is a two-step process begin with scale then rotation/translation(code). We should use an unscaled translation here, which means that the self.origin should not be divided by self.resolution.

jeffmahler commented 6 years ago

@jeasinema Sorry for the delay. We will look into this. Can you re-post in autolab_core? That is the source of the error.

Also please keep in mind, we are deprecating this repository in favor of trimesh.

@mmatl Can you take a quick look at this when you get a chance?

joao-borrego commented 5 years ago

Thank you @jeasinema !! I was generating a custom dataset for Dex-Net using custom-databases branch and I can confirm that indeed I was able to fix an issue with this transform by editing this line to t_grid_sdf = self.origin. At least now my grasp candidates are being stored and shown correctly!