0
$\begingroup$

Rosanswers logo

Hi, I have a nodelet that publishes a few topics and another nodelet that subscribes the topics and republishes a custom topic with all the synchronized messages.

If I start the two nodelets in two separate nodelet managers everything works as expected, if I use a single nodelet manager that loads both the nodelets the subscriber receives only a few messages than stops.

I'm using the ApproximateTime policy.

The topics run at different frequencies: 400Hz, 15Hz and 50Hz.

Any idea about the cause of the problem and about how to debug to find a possible cause?

Thank you Walter


Originally posted by Myzhar on ROS Answers with karma: 541 on 2020-03-13

Post score: 0


Original comments

Comment by gvdhoorn on 2020-03-16:
Please do not close questions when you've actually anwered them.

Just click the checkmark to the left of the answer. That will provide a much clearer indication the question has been answered.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I found the solution to the problem.

I was wrongly not creating a new message before each publishing.

In my particular case I had an IMU message to be synchronized with camera images and I was creating the message once in the OnInit function. Instead we must create each single shared pointer message just before publishing it: sensor_msgs::ImuPtr imuMsg(new sensor_msgs::Imu);


Originally posted by Myzhar with karma: 541 on 2020-03-16

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.