-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Open
Labels
Description
Cannot obtain Depth Images under NoDisplay mode
Under the NoDisplay mode, depth image cannot be correctly obtained.
The code we use to get depth image is given here:
// ROS_WARN_STREAM("event should happen " << (event.current_real - event.current_expected).toSec());
try
{
ROS_INFO("try request imgs");
std::vector<ImageRequest> request = { ImageRequest("0", ImageType::Scene, false, false), ImageRequest("0", ImageType::DepthPlanner, true, false) };
const vector<ImageResponse>& response = image_client_.simGetImages(request);
pubImgsFromResponse(response);
}
...
ImageResponse scene_img = response[0];
ImageResponse depth_img = response[1];
scene_img_publisher_.publish(getSceneImgFromResponce(scene_img, curr_ros_time, "scene_image"));
depth_img_publisher_.publish(getDepthImgFromResponce(depth_img, curr_ros_time, "depth_image"));
With this code, the image obtained is the same as the 'Scene' image except that it is in gray scale. (As demenstrated below).

When returning to "fly with me" mode, the above code works well, obtaining the right images.
Does anyone know how to fix this problem?