Can I subscribe a new topic in a subscribe callback?
Hi everyone,
Problem description:
I have a system and use a Realsense Camera to generate point clouds. But I found that the actual point clouds output is at a relatively high frequency (60hz). One thing I concern about is if point cloud2 message at high frequency would cost much memory and affect ros performance on Jeston Nano. Besides, what I want to do is to sample this point clouds message every time it travels 1m.
I am planning to create a node that subscribes to and sample a topic (i.e point cloud) every time the agent travels 1m.
Because my point cloud topic is continuous, my idea is to subscribe and publish the point cloud in an odometry callback where I can see if the agent travels 1m.
I wonder if it is achievable in ros or if there is any better idea.
Thank you
Do you want to publish a message every N metres, or do you want to receive a message every N metres?
Please describe that clearly so we can avoid an xy-problem.
Hi @gvhoorn, thank you for your response. I have updated the problem description and hope it would be clear to you