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

'object_recognition_core detect' throws error #30

Closed
YuOhara opened this issue Nov 5, 2014 · 23 comments
Closed

'object_recognition_core detect' throws error #30

YuOhara opened this issue Nov 5, 2014 · 23 comments

Comments

@YuOhara
Copy link

YuOhara commented Nov 5, 2014

I am flowing the quick start guide, but when I try detection_command, the program stops.
the error was
python: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr::operator->() const [with T = const sensor_msgs::Image_std::allocator]: Assertion `px != 0' failed.

https://groups.google.com/forum/#!topic/object-recognition-kitchen/mEW0Vn2NreM also reports the same problem.
I use openni_launch, but the object_recognition_core program always says the same error.

@hris2003
Copy link
Contributor

hris2003 commented Nov 5, 2014

Hi,

Since recent updates of ROS, ORK_core happens to run into this error. It
is, from my opinion, that ORK does not receive messages from all the input
topics, and crashes.

A workaround that I use when running into this is to make sure that all the
topics that ORK subscribes to are publishing as expected, then run ORK
detection, and things should go well.

HTH.

On Wed, Nov 5, 2014 at 7:52 AM, YuOhara [email protected] wrote:

I am flowing the quick start guide, but when I try detection_command, the
program stops.
the error was
python: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T*
boost::shared_ptr::operator->() const [with T = const
sensor_msgs::Image_std::allocator]: Assertion `px != 0' failed.

https://groups.google.com/forum/#!topic/object-recognition-kitchen/mEW0Vn2NreM
also reports the same problem.
I use openni_launch, but the object_recognition_core program always says
the same error.


Reply to this email directly or view it on GitHub
#30.

@YuOhara
Copy link
Author

YuOhara commented Nov 5, 2014

I think all the topics that ork_detection subscribes( * /camera/depth/camera_info[sensor_msgs/CameraInfo] * /camera/rgb/image_raw [sensor_msgs/Image]* /camera/depth/image_raw [sensor_msgs/Image] * /camera/rgb/camera_info [sensor_msgs/CameraInfo]
)

I played the program with gdb. I put the result here.

gdb --args python ./detection -c `rospack find object_recognition_tod`/conf/detection.ros.ork --visualize 
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/python ./detection -c /home/ohara/ros/hydro/src/tod/conf/detection.ros.ork --visualize
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffde0bb700 (LWP 14766)]
[New Thread 0x7fffdd8ba700 (LWP 14767)]
[New Thread 0x7fffdd0b9700 (LWP 14768)]
[New Thread 0x7fffdc8b8700 (LWP 14773)]
[New Thread 0x7fffcffff700 (LWP 14774)]
[New Thread 0x7fffcf7fe700 (LWP 14775)]
[New Thread 0x7fffceffd700 (LWP 14776)]
[New Thread 0x7fffce7fc700 (LWP 14777)]
[New Thread 0x7fffcdffb700 (LWP 14778)]
[New Thread 0x7fffcd7fa700 (LWP 14779)]
[New Thread 0x7fffccff9700 (LWP 14780)]
[New Thread 0x7fffb3fff700 (LWP 14781)]
[ INFO] [1415180088.928993006]: Initialized ROS. node_name: /object_recognition_server
[ INFO] [1415180089.324346428]: System already initialized. node_name: /object_recognition_server
[ INFO] [1415180092.066332201]: System already initialized. node_name: /object_recognition_server
[New Thread 0x7fffa7fff700 (LWP 14790)]
[New Thread 0x7fffa77fe700 (LWP 14791)]
[New Thread 0x7fffa6ffd700 (LWP 14792)]
[New Thread 0x7fffa67fc700 (LWP 14794)]
[ INFO] [1415180092.072102490]: Subscribed to topic:/camera/depth/camera_info with queue size of 1
[Thread 0x7fffa7fff700 (LWP 14790) exited]
[ INFO] [1415180092.073566396]: Subscribed to topic:/camera/rgb/camera_info with queue size of 1
[Thread 0x7fffa77fe700 (LWP 14791) exited]
[ INFO] [1415180092.074877623]: Subscribed to topic:/camera/rgb/image_raw with queue size of 1
[Thread 0x7fffa67fc700 (LWP 14794) exited]
[ INFO] [1415180092.075912738]: Subscribed to topic:/camera/depth/image_raw with queue size of 1
[Thread 0x7fffa6ffd700 (LWP 14792) exited]
python: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr<T>::operator->() const [with T = const sensor_msgs::Image_<std::allocator<void> >]: Assertion `px != 0' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff68e10d5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) where
#0  0x00007ffff68e10d5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff68e483b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff68d9d9e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff68d9e42 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007ffff072cb60 in ?? () from /opt/ros/hydro/lib/python2.7/dist-packages/ecto_ros/ecto_ros_main.so
#5  0x00007ffff073dd11 in ecto_ros::Image2Mat::process(ecto::tendrils const&, ecto::tendrils const&) ()
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto_ros/ecto_ros_main.so
#6  0x00007ffff4fd9233 in ecto::cell::process_with_only_these_inputs(ecto::tendrils const&) () from /opt/ros/hydro/lib/libecto.so.0.6
#7  0x00007ffff50907ea in ecto::schedulers::invoke_process(ecto::graph::graph_t&, unsigned long) () from /opt/ros/hydro/lib/libecto.so.0.6
#8  0x00007ffff50871c3 in ecto::scheduler::execute_iter(unsigned int, unsigned int, unsigned long) () from /opt/ros/hydro/lib/libecto.so.0.6
#9  0x00007ffff508b651 in boost::asio::detail::completion_handler<boost::_bi::bind_t<void, boost::_mfi::mf3<void, ecto::scheduler, unsigned int, unsigned int, unsigned long>, boost::_bi::list4<boost::_bi::value<ecto::scheduler*>, boost::_bi::value<unsigned int>, boost::_bi::value<unsigned int>, boost::_bi::value<unsigned long> > > >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code, unsigned long) () from /opt/ros/hydro/lib/libecto.so.0.6
#10 0x00007ffff5089df9 in boost::asio::detail::task_io_service::do_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service::idle_thread_info*) () from /opt/ros/hydro/lib/libecto.so.0.6
#11 0x00007ffff5089fb2 in boost::asio::detail::task_io_service::run(boost::system::error_code&) () from /opt/ros/hydro/lib/libecto.so.0.6
#12 0x00007ffff508814e in ecto::scheduler::run() () from /opt/ros/hydro/lib/libecto.so.0.6
#13 0x00007ffff5088531 in ecto::scheduler::execute(unsigned int) () from /opt/ros/hydro/lib/libecto.so.0.6
#14 0x00007ffff2478516 in ecto::cell_<ecto::py::BlackBox>::dispatch_process(ecto::tendrils const&, ecto::tendrils const&) ()
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#15 0x00007ffff4fd9233 in ecto::cell::process_with_only_these_inputs(ecto::tendrils const&) () from /opt/ros/hydro/lib/libecto.so.0.6
#16 0x00007ffff50907ea in ecto::schedulers::invoke_process(ecto::graph::graph_t&, unsigned long) () from /opt/ros/hydro/lib/libecto.so.0.6
#17 0x00007ffff50871c3 in ecto::scheduler::execute_iter(unsigned int, unsigned int, unsigned long) () from /opt/ros/hydro/lib/libecto.so.0.6
#18 0x00007ffff508b3f1 in boost::asio::detail::completion_handler<boost::_bi::bind_t<void, boost::_mfi::mf3<void, ecto::scheduler, unsigned int, unsigned int, unsigned long>, boost::_bi::list4<boost::_bi::value<ecto::scheduler*>, boost::_bi::value<int>, boost::_bi::value<unsigned int>, boost::_bi::value<int> > > >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code, unsigned long) () from /opt/ros/hydro/lib/libecto.so.0.6
#19 0x00007ffff5089df9 in boost::asio::detail::task_io_service::do_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service::idle_thread_info*) () from /opt/ros/hydro/lib/libecto.so.0.6
#20 0x00007ffff5089fb2 in boost::asio::detail::task_io_service::run(boost::system::error_code&) () from /opt/ros/hydro/lib/libecto.so.0.6
#21 0x00007ffff508814e in ecto::scheduler::run() () from /opt/ros/hydro/lib/libecto.so.0.6
#22 0x00007ffff5088531 in ecto::scheduler::execute(unsigned int) () from /opt/ros/hydro/lib/libecto.so.0.6
#23 0x00007ffff2478516 in ecto::cell_<ecto::py::BlackBox>::dispatch_process(ecto::tendrils const&, ecto::tendrils const&) ()
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#24 0x00007ffff4fd9233 in ecto::cell::process_with_only_these_inputs(ecto::tendrils const&) () from /opt/ros/hydro/lib/libecto.so.0.6
#25 0x00007ffff50907ea in ecto::schedulers::invoke_process(ecto::graph::graph_t&, unsigned long) () from /opt/ros/hydro/lib/libecto.so.0.6
#26 0x00007ffff50871c3 in ecto::scheduler::execute_iter(unsigned int, unsigned int, unsigned long) () from /opt/ros/hydro/lib/libecto.so.0.6
---Type <return> to continue, or q <return> to quit---
#27 0x00007ffff508b3f1 in boost::asio::detail::completion_handler<boost::_bi::bind_t<void, boost::_mfi::mf3<void, ecto::scheduler, unsigned int, unsigned int, unsigned long>, boost::_bi::list4<boost::_bi::value<ecto::scheduler*>, boost::_bi::value<int>, boost::_bi::value<unsigned int>, boost::_bi::value<int> > > >::do_complete(boost::asio::detail::task_io_service*, boost::asio::detail::task_io_service_operation*, boost::system::error_code, unsigned long) () from /opt/ros/hydro/lib/libecto.so.0.6
#28 0x00007ffff5089df9 in boost::asio::detail::task_io_service::do_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service::idle_thread_info*) () from /opt/ros/hydro/lib/libecto.so.0.6
#29 0x00007ffff5089fb2 in boost::asio::detail::task_io_service::run(boost::system::error_code&) () from /opt/ros/hydro/lib/libecto.so.0.6
#30 0x00007ffff508814e in ecto::scheduler::run() () from /opt/ros/hydro/lib/libecto.so.0.6
#31 0x00007ffff5088531 in ecto::scheduler::execute(unsigned int) () from /opt/ros/hydro/lib/libecto.so.0.6
#32 0x00007ffff24df63a in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<bool (*)(ecto::scheduler&, unsigned int), boost::python::default_call_policies, boost::mpl::vector3<bool, ecto::scheduler&, unsigned int> > >::operator()(_object*, _object*) ()
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#33 0x00007ffff5a49c1f in boost::python::objects::function::call(_object*, _object*) const () from /usr/lib/libboost_python-py27.so.1.46.1
#34 0x00007ffff5a49e78 in ?? () from /usr/lib/libboost_python-py27.so.1.46.1
#35 0x00007ffff5a53203 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const ()
   from /usr/lib/libboost_python-py27.so.1.46.1
#36 0x00007ffff249bd53 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::NullTendril, void (*)(ecto::except::NullTendril const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(ecto::except::NullTendril const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) ()
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#37 0x00007ffff5a531e6 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const ()
   from /usr/lib/libboost_python-py27.so.1.46.1
#38 0x00007ffff249bd03 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::AlreadyConnected, void (*)(ecto::except::AlreadyConnected const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(ecto::except::AlreadyConnected const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) ()
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#39 0x00007ffff5a531e6 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const ()
   from /usr/lib/libboost_python-py27.so.1.46.1
#40 0x00007ffff249bcb3 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::NotConnected, void (*)(ecto::except::NotConnected const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(ecto::except::NotConnected const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) ()
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#41 0x00007ffff5a531e6 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const ()
   from /usr/lib/libboost_python-py27.so.1.46.1
#42 0x00007ffff249bc63 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ec---Type <return> to continue, or q <return> to quit---
to::except::CellException, void (*)(ecto::except::CellException const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(ecto::except::CellException const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) ()
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#43 0x00007ffff5a531e6 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const ()
   from /usr/lib/libboost_python-py27.so.1.46.1
#44 0x00007ffff249bc13 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::TendrilRedeclaration, void (*)(ecto::except::TendrilRedeclaration const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(ecto::except::TendrilRedeclaration const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&)
    () from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#45 0x00007ffff5a531e6 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const ()
   from /usr/lib/libboost_python-py27.so.1.46.1
#46 0x00007ffff249bbc3 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::FailedFromPythonConversion, void (*)(ecto::except::FailedFromPythonConversion const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(ecto::except::FailedFromPythonConversion const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) () from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#47 0x00007ffff5a531e6 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const ()
   from /usr/lib/libboost_python-py27.so.1.46.1
#48 0x00007ffff249bb73 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::NonExistant, void (*)(ecto::except::NonExistant const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(ecto::except::NonExistant const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) ()
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#49 0x00007ffff5a531e6 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const ()
   from /usr/lib/libboost_python-py27.so.1.46.1
#50 0x00007ffff249bb23 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::ValueRequired, void (*)(ecto::except::ValueRequired const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(ecto::except::ValueRequired const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) ()
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#51 0x00007ffff5a531e6 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const ()
   from /usr/lib/libboost_python-py27.so.1.46.1
#52 0x00007ffff249bad3 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::ValueNone, void (*)(ecto::except::ValueNone const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(ecto::except::ValueNone const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) ()
---Type <return> to continue, or q <return> to quit---
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#53 0x00007ffff5a531e6 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const ()
   from /usr/lib/libboost_python-py27.so.1.46.1
#54 0x00007ffff249ba83 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::TypeMismatch, void (*)(ecto::except::TypeMismatch const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(ecto::except::TypeMismatch const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) ()
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#55 0x00007ffff5a531e6 in boost::python::detail::exception_handler::operator()(boost::function0<void> const&) const ()
   from /usr/lib/libboost_python-py27.so.1.46.1
#56 0x00007ffff249ba33 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<ecto::except::EctoException, void (*)(ecto::except::EctoException const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void (*)(ecto::except::EctoException const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0<void> const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0<void> const&) ()
   from /opt/ros/hydro/lib/python2.7/dist-packages/ecto/ecto_main.so
#57 0x00007ffff5a52fe9 in boost::python::handle_exception_impl(boost::function0<void>) () from /usr/lib/libboost_python-py27.so.1.46.1
#58 0x00007ffff5a48144 in ?? () from /usr/lib/libboost_python-py27.so.1.46.1
#59 0x00000000004d91b6 in PyObject_Call ()
#60 0x000000000054c0da in PyEval_EvalFrameEx ()
#61 0x0000000000575d92 in PyEval_EvalCodeEx ()
#62 0x000000000054c028 in PyEval_EvalFrameEx ()
#63 0x0000000000575d92 in PyEval_EvalCodeEx ()
#64 0x00000000004c1352 in PyRun_SimpleFileExFlags ()
#65 0x00000000004c754f in Py_Main ()
#66 0x00007ffff68cc76d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#67 0x000000000041ba41 in _start ()
(gdb) 

@vrabaud
Copy link
Member

vrabaud commented Nov 16, 2014

hi, that got fixed with the latest ecto (0.6.7) and ecto_ros (0.4.5). Sorry for the inconvenience.

@vrabaud vrabaud closed this as completed Nov 16, 2014
@shomberg
Copy link

Hi,

I'm also trying to follow the quick start guide to use ORK with ROS and I'm running into the same error.

Running openni_launch seems to be working and the camera is publishing to the appropriate topics. rviz can access and use them just fine.

I've verified that my ros-indigo-ecto package is at version 0.6.7 and ros-indigo-ecto-ros is at 0.4.5. I've tried installing and re-installing from compiled ros packages as well as compiling the ROS packages from source as detailed on the install page, with the same results.

I tried again today with the new version 0.4.6 of ros-indigo-ecto-ros and I get the same result.

Is there anything else which could be causing this problem?

@vrabaud
Copy link
Member

vrabaud commented Mar 15, 2015

can you please try with the latest from ecto (the problem was on the ecto side, not ecto_ros side). It's version 0.6.8.
What do you launch exactly ? Does it crash too if you launch any of those scripts ?
https://github.com/plasmodic/ecto_opencv/tree/master/samples/rgbd

@shomberg
Copy link

Hi,

For my previous tests I was following the quickstart guide by running:
roslaunch openni_launch openni_launch
rosrun object_recognition_capture orb_template -o my_textured_plane

The second command gave the assertion failed error.

I tried those scripts you mention while ecto 0.6.7 was still installed. I was unable to get consistent results - sometimes some of them would run, sometimes they would give the same error as before with the failed assert.

I uninstalled 0.6.7 and attempted to build 0.6.8 from source (because it is not yet in the ROS repositories for Ubuntu) and again tried to run the scripts. One of them worked once, but all the other times it failed on a seg-fault immediately after printing the initial "Registration? 1 Sync? 0". It is possible something got messed up when I was installing from source though or from some interaction with the old version from the repositories.

@kunliu-kelvin
Copy link

For my tests I was following the quickstart guide by running:
roslaunch openni_launch openni_launch
rosrun object_recognition_capture orb_template -o my_textured_plane
Then it crashes with these lines:
Listening for key: s on imshow:save
Registration? 1
Sync? 0
python: /usr/include/boost/smart_ptr/shared_ptr.hpp:646: typename boost::detail::sp_dereference::type boost::shared_ptr::operator*() const [with T = xn::NodeInfo; typename boost::detail::sp_dereference::type = xn::NodeInfo&]: Assertion `px != 0' failed.
Aborted (core dumped)

Then I go through other tests, "rosrun object_recognition_capture orb_template -o my_textured_plane" crashs too if I launch any of those scripts in: https://github.com/plasmodic/ecto_opencv/tree/master/samples/rgbd

I am also sure the following topics ( * /camera/depth/camera_info[sensor_msgs/CameraInfo] * /camera/rgb/image_raw [sensor_msgs/Image]* /camera/depth/image_raw [sensor_msgs/Image] * /camera/rgb/camera_info [sensor_msgs/CameraInfo]
) is publishing messages!

Does any body have explanations about this type of exceptions?? Thanks for any suggestions :)

I use the latest ecto (0.6.8) and ecto_ros (0.4.6) under ros indigo version. My computer run the ubuntu 1404 32bit system. Besides, SensorKinect is installed to make openni_launch work with Kinect.

@vrabaud
Copy link
Member

vrabaud commented May 13, 2015

are you using openni or openni2 ?

@pelferina
Copy link

Where/how can I remap the topics being subscribed to by the object_recognition_server from the command line, if at all?

Or do I have to create my own launch file and do so there?

@awesomebytes
Copy link
Member

@pelferina When you run the server you give it a config file right?
Like at the tutorial:
http://wg-perception.github.io/ork_tutorials/tutorial02/tutorial.html

Doing:
rosrun object_recognition_core detection -c rospack find object_recognition_tabletop/conf/detection.table.ros.ork

In that config file (https://github.com/wg-perception/tabletop/blob/master/conf/detection.table.ros.ork ) you specify the topics.

I hope that helps.

@kunliu-kelvin
Copy link

@vrabaud
I am using openni, not openni2.At this point, I really followed the quick guide.
Do you mean I should use openni2? Because I see openni2_launch in some other tutorials in ork...

@pelferina
Copy link

Thank you! That really helped a lot!

@nosepas1
Copy link

nosepas1 commented Mar 7, 2016

Hi,

I don't know if the problem is already fixed but I'm trying to follow the quickguide and the tutorials and I have some problems!
When I try quickguide I have the same problem as everyone:
rosrun object_recognition_capture orb_template -o my_textured_plane
Listening for key: s on imshow:save
Registration? 1
Sync? 0
python: /usr/include/boost/smart_ptr/shared_ptr.hpp:646: typename boost::detail::sp_dereference::type boost::shared_ptr::operator*() const [with T = xn::NodeInfo; typename boost::detail::sp_dereference::type = xn::NodeInfo&]: Assertion `px != 0' failed.
Aborted

could anyone help me please?

Then, I have try to detect objects using tabletop and everything works well but when I have to the detect the object I have this error:
_rosrun object_recognition_core detection -c rospack find object_recognition_tabletop/conf/detection.object.ros.ork

[ INFO] [1457369669.064329642]: Initialized ROS. node_name: /object_recognition_server
[ INFO] [1457369669.342392025]: System already initialized. node_name: /object_recognition_server
[ INFO] [1457369669.807556971]: System already initialized. node_name: /object_recognition_server
[ INFO] [1457369669.818679779]: Subscribed to topic:/camera/depth_registered/camera_info [queue_size: 1][tcp_nodelay: 0]
[ INFO] [1457369669.825657466]: Subscribed to topic:/camera/rgb/camera_info [queue_size: 1][tcp_nodelay: 0]
[ INFO] [1457369669.831797794]: Subscribed to topic:/camera/depth_registered/image_raw [queue_size: 1][tcp_nodelay: 0]
[ INFO] [1457369669.840060002]: Subscribed to topic:/camera/rgb/image_color [queue_size: 1][tcp_nodelay: 0]
126 :: 0.5 , 1 , 0.995004 , /base_link , /head_mount_kinect_rgb_optical_frame
[ INFO] [1457369670.616131299]: publishing to topic:/tabletop/clusters
[ INFO] [1457369670.617674595]: publishing to topic:/table_array
Loading model: 3571bc74fb68200cdb7d7bed2e000263 for object id: YOUR_OBJECT_IDInfo, T0: Load
Error, T0: Unable to open file "".
Segmentation fault_
Any idea about that?

I use the latest ecto (0.6.11) and ecto_ros (0.4.8) under ros indigo distribution.
Many thanks

@hris2003
Copy link
Contributor

hris2003 commented Mar 7, 2016

@nosepas1 : For your first question: Are you sure that the output of your camera is working? Can you visualize its topics in ROS with rostopic echo <topic_name>?
And your second issue is because there's no mesh file in your database, maybe because the capture phase didnot succeed...

@nosepas1
Copy link

nosepas1 commented Mar 9, 2016

@hris2003 : The first issue it's true that I have some problems with the topics, many thanks.

The second issue, I have add the mesh manually, I have capture nothing. And when I look in my db the mesh is there. Could it be something else?

Thank you!

@nosepas1
Copy link

nosepas1 commented Mar 9, 2016

@hris2003 : When I use freenect instead of openni all the topics are working well but the capture doesn't. Can I use freenect or it isn't compatible?

@hris2003
Copy link
Contributor

hris2003 commented Mar 9, 2016

@nosepas1 Which mesh did you add to the database? The coke mesh? Or did you prepare it yourself? Can I have a look at the mesh?

@nosepas1
Copy link

nosepas1 commented Mar 9, 2016

@hris2003 I added the coke mesh from the tutorial. I get it from here:
git clone https://github.com/wg-perception/ork_tutorials

@saspelund
Copy link

♫ This is the thread that never ends! Oh it goes on and on my friends! ♫

Error: OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /build/buildd/opencv-2.4.8+dfsg1/modules/imgproc/src/color.cpp, line 3648

I can't find the code/file (/build doesn't exist in my root directory) to see where the error is happening to try to fix it. I have read multiple forum posts about this error, but they all suggest edits to the code which I can't do as I can't find the source file (locate didn't help either). They say that this error means that the number of channels is incorrect. However, I have checked that all four of the topics are publishing using rostopic echo+info as well as being able to stream the images (cameras) in rviz.

Here is my gdb ouput. The line in question occurs after the subscribe to topics + thread exits.

~/catkin_ws/src/ork/src/object_recognition_core/apps$ gdb --args python ./detection -c `rospack find object_recognition_tod`/conf/detection.ros.ork --visualize
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/python ./detection -c /home/<username>/catkin_ws/src/ork/src/tod/conf/detection.ros.ork --visualize
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
/home/<username>/catkin_ws/devel/lib/python2.7/dist-packages/ecto/__init__.py:30: RuntimeWarning: to-Python converter for boost::shared_ptr<ecto::tendril> already registered; second conversion method ignored.
  del os_path
/home/<username>/catkin_ws/devel/lib/python2.7/dist-packages/ecto/__init__.py:30: RuntimeWarning: to-Python converter for boost::shared_ptr<ecto::cell> already registered; second conversion method ignored.
  del os_path
/home/<username>/catkin_ws/devel/lib/python2.7/dist-packages/ecto/__init__.py:30: RuntimeWarning: to-Python converter for boost::shared_ptr<ecto::py::cellwrap> already registered; second conversion method ignored.
  del os_path
[New Thread 0x7fffd8f86700 (LWP 16987)]
[New Thread 0x7fffd32a3700 (LWP 16993)]
[New Thread 0x7fffd2aa2700 (LWP 16994)]
[New Thread 0x7fffd22a1700 (LWP 16995)]
[New Thread 0x7fffd1aa0700 (LWP 17000)]
[New Thread 0x7fffd129f700 (LWP 17001)]
[New Thread 0x7fffd0a9e700 (LWP 17002)]
[New Thread 0x7fffc3fff700 (LWP 17003)]
[New Thread 0x7fffc37fe700 (LWP 17004)]
[ INFO] [1466443762.601328756]: Initialized ROS. node_name: /object_recognition_server
[ INFO] [1466443763.119278958]: System already initialized. node_name: /object_recognition_server
[ INFO] [1466443764.000748594]: System already initialized. node_name: /object_recognition_server
[New Thread 0x7fffaffff700 (LWP 17013)]
[New Thread 0x7fffaf7fe700 (LWP 17014)]
[New Thread 0x7fffaeffd700 (LWP 17015)]
[New Thread 0x7fffae7fc700 (LWP 17017)]
[ INFO] [1466443764.019444709]: Subscribed to topic:/camera/depth/camera_info [queue_size: 1][tcp_nodelay: 0]
[Thread 0x7fffaffff700 (LWP 17013) exited]
[ INFO] [1466443764.029586662]: Subscribed to topic:/camera/rgb/camera_info [queue_size: 1][tcp_nodelay: 0]
[Thread 0x7fffaf7fe700 (LWP 17014) exited]
[ INFO] [1466443764.045366795]: Subscribed to topic:/camera/rgb/image_raw [queue_size: 1][tcp_nodelay: 0]
[Thread 0x7fffae7fc700 (LWP 17017) exited]
[ INFO] [1466443764.055873076]: Subscribed to topic:/camera/depth/image_raw [queue_size: 1][tcp_nodelay: 0]
[Thread 0x7fffaeffd700 (LWP 17015) exited]
OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /build/buildd/opencv-2.4.8+dfsg1/modules/imgproc/src/color.cpp, line 3648
Traceback (most recent call last):
  File "./detection", line 24, in <module>
    run_plasm(args, plasm)
  File "/home/<username>/catkin_ws/src/ecto/python/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] = ecto_ros::Image2Mat

[cell_type] = ecto_ros::Image2Mat

[function_name] = process_with_only_these_inputs

[type] = cv::Exception

[what] = /build/buildd/opencv-2.4.8+dfsg1/modules/imgproc/src/color.cpp:3648: error: (-215) scn == 3 || scn == 4 in function cvtColor
...
[Thread 0x7fffd1aa0700 (LWP 17000) exited]
[Thread 0x7fffd32a3700 (LWP 16993) exited]
[Thread 0x7fffd2aa2700 (LWP 16994) exited]
[Thread 0x7fffd0a9e700 (LWP 17002) exited]
[Thread 0x7fffc37fe700 (LWP 17004) exited]
[Thread 0x7fffd129f700 (LWP 17001) exited]
[Thread 0x7fffc3fff700 (LWP 17003) exited]
[Thread 0x7fffd8f86700 (LWP 16987) exited]
[Thread 0x7fffd22a1700 (LWP 16995) exited]
[Inferior 1 (process 16980) exited with code 01]
(gdb) 

According to Nosepas1's error output, the next line after the subscriber thread exits should read
'126 :: 0.5 , 1 , 0.995004 , /base_link , /head_mount_kinect_rgb_optical_frame'

If this thread is better asked elsewhere, please tell me where. Thanks for your help!

@saspelund
Copy link

I fixed my error by changing the subscribed topic in the tod config file (see the above response from vraboud to pelferina) for the rgb_image_topic from /camera/rgb/image_raw to /camera/rgb/image_color. I believe that this fixed the issue because the code was expecting a colored (3 channel=rgb) or color+alpha (4 channels) matrix (or the 3rd dimension of the matrix is either 3 or 4 deep but at least there is one rather than only 2 dimensions with a grey scale value at each point) and was only getting a grey scale image from image_raw.

Hopefully this helps anyone who runs into this problem! Now off to figure out why the program won't accept my uploaded coke can mesh during detection......

@NearXdu
Copy link

NearXdu commented Jun 6, 2017

Hi~ I just got the same problem , when i'm run

roslaunch openni_launch openni_launch
rosrun object_recognition_capture orb_template -o my_textured_plane

Listening for key: s on imshow:save
Registration? 1
Sync? 0
python: /usr/include/boost/smart_ptr/shared_ptr.hpp:646: typename boost::detail::sp_dereference::type boost::shared_ptr::operator*() const [with T = xn::NodeInfo; typename boost::detail::sp_dereference::type = xn::NodeInfo&]: Assertion `px != 0' failed.
Aborted (core dumped)

how could I solve this? I test this under my ubuntu14.04 64bits ros-indigo, and the camera is microsoft kinect v1

@jinjuehui
Copy link

Listening for key: s on imshow:save
Registration? 1
Sync? 0

python: /usr/include/boost/smart_ptr/shared_ptr.hpp:641: typename boost::detail::sp_dereference::type boost::shared_ptr::operator*() const [with T = xn::NodeInfo; typename boost::detail::sp_dereference::type = xn::NodeInfo&]: Assertion `px != 0' failed.
Aborted (core dumped)

also get involved in the same problem, anyone solved it yet?

@jinjuehui
Copy link

jinjuehui commented May 15, 2018

In my case it worked after I killall XnSensorServer after roslaunch openni_launch openni.launch. might helpful to uninstall the driver sudo apt-get remove libopenni-sensor-pointclouds0 if there are two devices detected.

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