Rancho-zhao / FOTS

20 stars 2 forks source link

Questions for Gelsight mini Integration #4

Open Marsilea149 opened 5 months ago

Marsilea149 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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:

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 commented 5 months ago

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:

This result is within the allowable range of error.

Rancho-zhao commented 5 months ago

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

Marsilea149 commented 5 months ago

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:

https://github.com/Rancho-zhao/FOTS/blob/5bcde04c6fadee1406ea96d01cbde0b9cedfe736/tactile_render.py#L18

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

Rancho-zhao commented 5 months ago

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:

https://github.com/Rancho-zhao/FOTS/blob/5bcde04c6fadee1406ea96d01cbde0b9cedfe736/tactile_render.py#L18

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 commented 5 months ago

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? https://github.com/Rancho-zhao/FOTS/blob/5bcde04c6fadee1406ea96d01cbde0b9cedfe736/utils/fots_render.py#L103

  3. question about "shadow_calib.py": In "shadow_calib.py", you are using "pr.pixmm" at line 68: https://github.com/Rancho-zhao/FOTS/blob/5bcde04c6fadee1406ea96d01cbde0b9cedfe736/shadow_calib/shadow_calib.py#L68 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, https://github.com/Rancho-zhao/FOTS/blob/5bcde04c6fadee1406ea96d01cbde0b9cedfe736/marker_calib/marker_calib.py#L115 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!