andyzeng / visual-pushing-grasping

Train robotic agents to learn to plan pushing and grasping actions for manipulation with deep reinforcement learning.
http://vpg.cs.princeton.edu/
BSD 2-Clause "Simplified" License
883 stars 314 forks source link

Detect Changes #68

Open Marwanon opened 3 years ago

Marwanon commented 3 years ago

Hi Dear; I was looking at your code, I found this part Detect Changes I need help to understand what does it mean 0.3 , 0.01, et?. what is the standard of 300 and how it is obtained to be as change_threshold?. May anyone help me in clarification this part, please?. I'd appreciate your cooperation

`if 'prev_color_img' in locals():

    # Detect changes
    depth_diff = abs(depth_heightmap - prev_depth_heightmap)
    depth_diff[np.isnan(depth_diff)] = 0
    depth_diff[depth_diff > 0.3] = 0
    depth_diff[depth_diff < 0.01] = 0
    depth_diff[depth_diff > 0] = 1
    change_threshold = 300
    change_value = np.sum(depth_diff)
    change_detected = change_value > change_threshold or prev_grasp_success  
    print('Change detected: %r (value: %d)' % (change_detected, change_value))`

Sincerely

Bensonwyz commented 3 years ago

Can your camera capture real scene images? My camera D415 failed to capture images. I don’t know what’s wrong. I can see from the camera software that it works normally, but the program does not generate the corresponding image, and the program has been stuck in the while loop of the camera.py. Could you help me?