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
898 stars 315 forks source link

realsense.cpp code do not work with realsenseSDK2.0(build 2.26.0) #37

Open liuxiangdi opened 5 years ago

liuxiangdi commented 5 years ago

Hi, I have a realsense D415 and a UR5, I use this code directly, and I meet the version problem. in realsense.cpp line 208 rs2::frame depth_colorized = color_map(aligned_depth) but in latest version it should be rs2::frame depth_colorized = color_map.process(aligned_depth)

and in line 145, pipe.start(config_pip) realsense error calling rs2_pipline_start_with_config(pipe:0xdcf8a0, config:0xd7c6b0): couldn't resolve requests

Can you check out witch realsenseSDK version you used? Is it necessary keep your camera config_pip? ps: the API doc in realsense website is old, I find the usage in the realsense sdk example code Thanks a lot :)

doarnf commented 3 years ago

Thank you so much for this issue. Due to this rs2::frame depth_colorized = color_map(aligned_depth). It is always error when compiling:

error: no match for call to ‘(rs2::colorizer) (rs2::depth_frame&)’
         rs2::frame depth_colorized = color_map(aligned_depth);

When I use rs2::frame depth_colorized = color_map.process(aligned_depth). The problem solved. Thank you so much.