Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions for Gelsight mini Integration #4

Open
Marsilea149 opened this issue May 22, 2024 · 7 comments
Open

Questions for Gelsight mini Integration #4

Marsilea149 opened this issue May 22, 2024 · 7 comments

Comments

@Marsilea149
Copy link

Hi,

Could you please share how do you define and compute the value for "mm_to_pixel" in normal_to_rgb.yaml file? I am using Gelsight mini, but I am not sure what to put for this parameter. Thank you very much!

@Rancho-zhao
Copy link
Owner

Thank you for your interest. This parameter is the scale ratio between the real world coordinate system and the tactile image pixel coordinate system. To calculate it, you can first press a small ball of a known diameter (in millimeters) using gelsight, and then measure the diameter (in pixels) of the circular region that the ball corresponds to in the tactile image. Hope it can help you.

@Marsilea149
Copy link
Author

Hi Rancho,

Thank you very much for your quick reply and very clear explanation. I tried with a rectangular shape object. I found out that for horizontal(length of indentor) and vertical(height of indentor), the resulting mm_to_pixel value is different.

Here is my image:
0000

rectangle shape indentor:

  • length:
    real measurement: 7 mm
    pixels: 165 - 83 = 82 pixels
    mm_to_pixels = 82/7 = 11.7
  • width:
    real measurement: 5 mm
    pixels: 188 - 134 = 54 pixels
    mm_to_pixels = 54/7 = 10.8

Which value should I take into account? Is it normal that I do not find the same value for length and width?

Thank you very much!

@Rancho-zhao
Copy link
Owner

Well, due to the curvature of the edges of the indentor you used, it is necessary to measure the positions of four points, as shown in the figure.
gelsight_mini
My measurement result is:

  • length (red points):
    pixels: (162,182) - (83,182) = 79
    mm_to_pixel = 79/7 = 11.3
  • width (yellow points):
    pixels: (89,189) - (89,133) = 56
    mm_to_pixel = 56/5 = 11.2

This result is within the allowable range of error.

@Rancho-zhao
Copy link
Owner

In addition, please don't create new issue to ask similar questions, just propose those questions in this issue, thanks.

@Marsilea149 Marsilea149 changed the title mm_to_pixel value for Gelsight mini Questions for Gelsight mini Integration May 25, 2024
@Marsilea149
Copy link
Author

Hi Rancho,

Thank you very much for your reply! I will ask all the related questions for Gelsight Mini integration in this issue as you suggested.

In tactile_render.py:

ini_bg_mlp = np.load('./utils/utils_data/ini_bg_fots_gelsight.npy')

what is "ini_bg_mlp" and how do you get it? Thanks!

@Rancho-zhao
Copy link
Owner

Hi Rancho,

Thank you very much for your reply! I will ask all the related questions for Gelsight Mini integration in this issue as you suggested.

In tactile_render.py:

ini_bg_mlp = np.load('./utils/utils_data/ini_bg_fots_gelsight.npy')

what is "ini_bg_mlp" and how do you get it? Thanks!

Actually, ini_bg_mlp is the image generated by the mlp model when the object has zero contact depth and no background image is added.

@Marsilea149
Copy link
Author

Marsilea149 commented May 28, 2024

Hi Rancho,

Thanks for your reply!

  1. question about "ini_bg_fots_gelsight.py":
    Do you have any existing code to generate './utils/utils_data/ini_bg_fots_gelsight.npy'? I saw in 'fots_render.py', you commented this line: # np.save("ini_bg_fots_gelsight3.npy", sim_img)
    But I don't see where you call this method "generate(self, heightMap, contact_mask, shadow = False)" to generate 'ini_bg_fots_gelsight.npy'. Could you please explain how do you do in practice?

  2. question about "light_r", "light_g", "light_b":
    How do you get the values for these 3 parameters in "fots_render.py" at line 103-105 as shown below?

    light_r = [-0.01, 0, 0.1]

  3. question about "shadow_calib.py":
    In "shadow_calib.py", you are using "pr.pixmm" at line 68:

    ball_r = 3 / pr.pixmm

    But, "pr.pixmm" is not defined, what is it exactly? I guess it is pr.pixmm=1.0/pr.mm_to_pixel. Could you please clarify?

  4. question about "marker_calib.py"
    In "marker_calib.py", you computed "ball_r" at line 115,

    ball_r = 3 / (0.0266*2)
    Where does this formula come from? Could you please explain what is it exactly? Is it the ball radius in pixels?

  5. question about the experiment for "marker_calib.py":
    Do you have any README for "marker_calib.py", what do you do in practice to collect the data and to perform the marker calibration?

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants