-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Hi,
When i try to launch any of the apps (i tried edge_detection and find_contours) when specifying the image:="/camera/depth/image_rect_raw" the node crashes with console output below
SUMMARY
PARAMETERS
- /edge_detection/L2gradient: False
- /edge_detection/apertureSize: 3
- /edge_detection/apply_blur_post: False
- /edge_detection/apply_blur_pre: True
- /edge_detection/canny_threshold1: 100
- /edge_detection/canny_threshold2: 200
- /edge_detection/debug_view: True
- /edge_detection/edge_type: 2
- /edge_detection/postBlurSigma: 3.2
- /edge_detection/postBlurSize: 13
- /edge_detection/queue_size: 3
- /edge_detection/use_camera_info: False
- /rosdistro: melodic
- /rosversion: 1.14.6
NODES
/
edge_detection (opencv_apps/edge_detection)ROS_MASTER_URI=http://localhost:11311
process[edge_detection-1]: started with pid [16725]
terminate called after throwing an instance of 'cv_bridge::Exception'
what(): [16UC1] is not a color format. but [bgr8] is. The conversion does not make sense
[edge_detection-1] process has died [pid 16725, exit code -6, cmd /opt/ros/melodic/lib/opencv_apps/edge_detection image:=/camera/depth/image_rect_raw __name:=edge_detection __log:=/home/ahmad/.ros/log/1790e8f4-cf2d-11ea-8e04-54271e90ab2d/edge_detection-1.log].
log file: /home/ahmad/.ros/log/1790e8f4-cf2d-11ea-8e04-54271e90ab2d/edge_detection-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
I understand the error is about the encoding used (bgr8). Is there a way to specify the depth map info (16uc1) as input?
Can this be edited to handle the depth map input? or is there a better/standard way?
| cv::Mat frame = cv_bridge::toCvShare(msg, sensor_msgs::image_encodings::BGR8)->image; |