boost assertion in service callback
I have a node which offers 3 services: add_view, clear_views, and next_best_view. Using rosservice call, I can call add_view and clear_views without any problems, but calling next_best_view, I run into the following on the node's end (gdb output):
Program received signal SIGILL, Illegal instruction.
0x000000000042b32a in next_best_view::ViewGeneratorODE::processNBVRequest (
this=0x7fffffffdd70, request=..., response=<value optimized out>)
at /usr/include/boost/smart_ptr/shared_ptr.hpp:418
418 BOOST_ASSERT(px != 0);
(gdb) bt
#0 0x000000000042b32a in next_best_view::ViewGeneratorODE::processNBVRequest (
this=0x7fffffffdd70, request=..., response=<value optimized out>)
at /usr/include/boost/smart_ptr/shared_ptr.hpp:418
#1 0x000000000043c92b in operator() (this=0x7fffc835d150, params=...)
at /usr/include/boost/function/function_template.hpp:1013
#2 call (this=0x7fffc835d150, params=...)
at /opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/service_callback_helper.h:136
#3 ros::ServiceCallbackHelperT<ros::ServiceSpec<next_best_view::NextBestViewRequest_<std::allocator<void> >, next_best_view::NextBestViewResponse_<std::allocator<void> > > >::call (this=0x7fffc835d150, params=...)
at /opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/service_callback_helper.h:194
#4 0x00007fffe4232938 in ros::ServiceCallback::call (this=0x725710)
at /tmp/buildd/ros-diamondback-ros-comm-1.4.5/debian/ros-diamondback-ros-comm/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/src/libros/service_publication.cpp:123
#5 0x00007fffe4245771 in ros::CallbackQueue::callOneCB (this=0x707150,
tls=0x7fffc8f0bcf0)
at /tmp/buildd/ros-diamondback-ros-comm-1.4.5/debian/ros-diamondback-ros-comm/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/src/libros/callback_queue.cpp:381
#6 0x00007fffe4245deb in ros::CallbackQueue::callAvailable (this=0x707150,
timeout=<value optimized out>)
at /tmp/buildd/ros-diamondback-ros-comm-1.4.5/debian/ros-diamondback-ros-comm/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/src/libros/callback_queue.cpp:333
#7 0x00007fffe424a2d9 in ros::SingleThreadedSpinner::spin (
this=<value optimized out>, queue=0x707150)
at /tmp/buildd/ros-diamondback-ros-comm-1.4.5/debian/ros-diamondback-ros-comm/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/src/libros/spinner.cpp:49
#8 0x00007fffe41d2d7b in ros::spin ()
at /tmp/buildd/ros-diamondback-ros-comm-1.4.5/debian/ros-diamondback-ros-comm/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/src/libros/init.cpp:488
#9 0x0000000000427560 in next_best_view::ViewGeneratorODE::start (
this=0x7fffffffdd70)
at /home/marvin/extra-stacks/rgbd-ros-pkg/object_modeling/next_best_view/src/next_best_view/view_generator_ode_node.cpp:145
#10 0x0000000000427b19 in main (argc=1, argv=0x7fffffffe198)
at /home/marvin/extra-stacks/rgbd-ros-pkg/object_modeling/next_best_view/src/next_best_view/view_generator_ode_node.cpp:491
Any thoughts on where the problem might lie? It doesn't seem to get as far as running the code within the callback, so I'm a bit confused why this service should fail while the other two work fine. Also, this is code that was working in cturtle but is no longer running under diamondback (to the best of my knowledge, the code hasn't changed inbetween).
Some additional information if it's useful.
Service definition:
request:
string ply_file # object model with confidences
float32[] joint_angles
geometry_msgs/Vector3 object_center #in the coords of the ply
geometry_msgs/Transform object_to_end_effector
geometry_msgs/Transform camera_pose
int32 num_candidates
float32 min_quality #min quality to be worthwhile
float32 time_weight #how much extra quality is needed to justify an extra second of trajectory
float32 velocity
response:
float32 total_entropy
float32 best_quality
geometry_msgs/Transform view_camera_pose # in the coords of the ply
float32[] view_joint_angles
geometry_msgs/Vector3 view_dir #camera to object ...