Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detection crashes with simulated PR2 (ROS Hydro) #35

Closed
ZdenekM opened this issue Aug 18, 2015 · 7 comments
Closed

Detection crashes with simulated PR2 (ROS Hydro) #35

ZdenekM opened this issue Aug 18, 2015 · 7 comments

Comments

@ZdenekM
Copy link

ZdenekM commented Aug 18, 2015

[ INFO] [1439892673.437634264]: Initialized ROS. node_name: /object_recognition_server
[ INFO] [1439892673.834002765, 478.008000000]: System already initialized. node_name: /object_recognition_server
[ INFO] [1439892673.838442561, 478.009000000]: Subscribed to topic:/head_mount_kinect/depth/camera_info with queue size of 1
[ INFO] [1439892673.839874285, 478.009000000]: Subscribed to topic:/head_mount_kinect/rgb/camera_info with queue size of 1
[ INFO] [1439892673.841825796, 478.010000000]: Subscribed to topic:/head_mount_kinect/depth/image_raw with queue size of 1
[ INFO] [1439892673.843391626, 478.010000000]: Subscribed to topic:/head_mount_kinect/rgb/image_raw with queue size of 1
OpenCV Error: Assertion failed (in.type() == CV_64FC1 || in.type() == CV_32FC1 || in.type() == CV_16UC1 || in.type() == CV_16SC1) in rescaleDepth, file /tmp/buildd/ros-hydro-opencv-candidate-0.2.4-0precise-20150330-1158/src/rgbd/src/utils.cpp, line 55
Traceback (most recent call last):
  File "/opt/ros/hydro/lib/object_recognition_core/detection", line 24, in <module>
    run_plasm(args, plasm)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/ecto/opts.py", line 85, in run_plasm
    sched.execute(options.niter)
ecto.CellException:            exception_type  CellException
                cell_name  source1
                cell_type  ecto::py::BlackBox
            function_name  process_with_only_these_inputs
                     type  std::runtime_error
                     what             exception_type  CellException
                cell_name  Source
                cell_type  ecto::py::BlackBox
            function_name  process_with_only_these_inputs
                     type  std::runtime_error
                     what             exception_type  CellException
                cell_name  <class 'ecto_image_pipeline.base.RescaledRegisteredDepth'>
                cell_type  RescaledRegisteredDepth
            function_name  process_with_only_these_inputs
                     type  cv::Exception
                     what  /tmp/buildd/ros-hydro-opencv-candidate-0.2.4-0precise-20150330-1158/src/rgbd/src/utils.cpp:55: error: (-215) in.type() == CV_64FC1 || in.type() == CV_32FC1 || in.type() == CV_16UC1 || in.type() == CV_16SC1 in function rescaleDepth
@ZdenekM
Copy link
Author

ZdenekM commented Sep 1, 2015

Just a note. Depth data from Gazebo has encoding: 32FC1 - which is equivalent to CV_32FC1 I guess.

@vrabaud
Copy link
Member

vrabaud commented Sep 1, 2015

do you have a gazebo scene I could reuse as a unit test ?

@ZdenekM
Copy link
Author

ZdenekM commented Sep 1, 2015

It's scene independent so you can use even roslaunch pr2_gazebo pr2_empty_world.launch. This is my config:

source1:
  type: RosKinect
  module: 'object_recognition_ros.io'
  parameters:
    rgb_frame_id: '/head_mount_kinect_rgb_optical_frame'
    rgb_image_topic: '/head_mount_kinect/rgb/image_raw'
    rgb_camera_info: '/head_mount_kinect/rgb/camera_info'
    depth_image_topic: '/head_mount_kinect/depth/image_raw'
    depth_camera_info: '/head_mount_kinect/depth/camera_info'

sink1:
  type: TablePublisher
  module: 'object_recognition_tabletop'
  inputs: [source1]

pipeline1:
  type: TabletopTableDetector
  module: 'object_recognition_tabletop'
  inputs: [source1]
  outputs: [sink1]
  parameters:
    table_detector:
      min_table_size: 4000
      plane_threshold: 0.01

And this is the command I'm using to bring up ORK:

rosrun object_recognition_core detection -c my_conf_file.ork

Thanks for your time.

@ZdenekM
Copy link
Author

ZdenekM commented Sep 1, 2015

I have some news. It's probably Gazebo issue. See following:

rostopic echo /head_mount_kinect/depth/image_raw | grep encoding
encoding: mono8
encoding: 32FC1
encoding: 32FC1
encoding: mono8
encoding: 32FC1
encoding: 32FC1
encoding: mono8
encoding: 32FC1
encoding: 32FC1
encoding: mono8

@awesomebytes
Copy link
Member

Have you checked that there aren't two publishers publishing in that topic?
That looks weird.

rostopic info /head_mount_kinect/depth/image_raw

2015-09-01 12:19 GMT+02:00 Zdeněk Materna [email protected]:

I have some news. It's probably Gazebo issue. See following:

rostopic echo /head_mount_kinect/depth/image_raw | grep encoding
encoding: mono8
encoding: 32FC1
encoding: 32FC1
encoding: mono8
encoding: 32FC1
encoding: 32FC1
encoding: mono8
encoding: 32FC1
encoding: 32FC1
encoding: mono8


Reply to this email directly or view it on GitHub
#35 (comment)
.

@ZdenekM
Copy link
Author

ZdenekM commented Sep 1, 2015

It's definitely weird.

rostopic info /head_mount_kinect/depth/image_raw
Type: sensor_msgs/Image

Publishers: 
 * /gazebo (http://robodev1:39815/)

Subscribers: 
 * /image_view_1441103460258460915 (http://robodev1:45951/)

Btw, I found that in PR2 URDF there are two kinect sensors. One here and second here. The first one publish ir topics and the second one rgb topics. But both of them also publish depth data. Could this cause some issues?

@ZdenekM
Copy link
Author

ZdenekM commented Sep 1, 2015

Ok, so it's definitely issue of PR2 URDF: PR2/pr2_simulator#112. Sorry for noise. I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants