Publisher and Subscriber together problem
Hi I am trying to subscribe and publish at the same time. I tried to follow the suggestions given for similar questions but am not able to publish the data that I am getting using the callback function. My publisher is created in the constructor of a class and is stored in a member variable. I am calling the member.publish method in the callback function. Is this right ? Also, do I need to run the publish command in a dedicated loop again inside the callback function or the looping because of callback function is enough ?
Here is the error message that I get
[FATAL] [1320088082. 162199274] : ASSERTION FAILED file = /opt/ros/electric/stacks/ros_comm/clients/cpp/rospp/include/ros/publisher.h line = 101 cond = false message =
drive_base /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T* boost::shared_ptr< <template-parameter-1-1> >::operator-="">() const [with T = ros::Publisher::Impl]: Assertion `px != 0' failed. Aborted
Can anybody help understand what is going wrong ?
Comments
