plasmodic/ecto_image_pipeline

Error when calling create_source with OpenNISubscriber as 2nd argument

Closed this issue · 4 comments

Hi, not sure if this is an issue at all, or I'm just trying to over abuse camera_base. Feel free to close this if so!

I'm trying to run object_recognition_capture orb_template with a non OpenNI camera (see this post on ORK group), so I pass OpenNISubscriber to create_source instead of OpenNISource (and also remove the mask_depth from the outputs_list). But I get an error complaining that this is not a ROS node:

$ rosrun object_recognition_capture orb_template -o my_textured_plane
INIT
Listening for key: s on imshow:save
[FATAL] [1426455554.600357664]: You must call ros::init() before creating the first NodeHandle
Couldn't find an AF_INET address for []
Couldn't find an AF_INET address for []
[ERROR] [1426455554.601597709]: [registerPublisher] Failed to contact master at [:0].  Retrying...
Couldn't find an AF_INET address for []
Couldn't find an AF_INET address for []
......

I crudely tried to call rospy.init_node but changes nothing. So it's really a missing ros::init() in a C++ ecto cell?
Please note that I'm trying to use ORK in an undocumented way, so... it's probably that I'm just trying something stupid without understanding the ecto_image_pipeline.

Did you call something like:

ecto_ros.init(sys.argv, "my_node_name", anonymous=False)

from somewhere in your python script? This initialises the underlying c++ node.

right. danke!

Still doesn't work but now is opencv complaining about some incompatibilities between images. Maybe there's something weird on the creation of the cv::Mat, or maybe is some exotic property on Senz3D generated images.

OpenCV Error: Assertion failed (0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows) in Mat, file /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/matrix.cpp, line 284
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/object_recognition_capture/orb_template", line 115, in <module>
    run_plasm(options, plasm, locals=vars())
  File "/opt/ros/indigo/lib/python2.7/dist-packages/ecto/opts.py", line 85, in run_plasm
    sched.execute(options.niter)
ecto.CellException:            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] = RescaledRegisteredDepth

[cell_type] = RescaledRegisteredDepth

[function_name] = process_with_only_these_inputs

[type] = cv::Exception

[what] = /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/matrix.cpp:284: error: (-215) 0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows in function Mat

You could be running into the same problem on ecto 0.6.8 as being hunted in plasmodic/ecto#272. As it is there, suspicious that you're dropping into process_with_only_these_inputs.

Get the ecto sources and checkout the 0.6.7 tag to make sure.

mmm.... don't think so, as it works for the images provided by kinect (well... actually, it also fails but something different and later.
I'll try ecto sources, anyway. Thanks!

confirmed : it also fails with 0.6.7 tag. Must be an issue with the Senz3D BGR format. Maybe it's just too big! (the resolution is 720x1280)