ros-perception/pointcloud_to_laserscan

Node didn't recognize subscriber

Closed this issue · 1 comments

Hey there,
I would like to use your node to transform a pointcloud to a laserscan. I'm working on Ubuntu 20.04 with the ros2 foxy branch.

I attached a minimal launch file and a node to subscribe and simply publish the subscribed topic as it was. It doesn't work.
If I subscribe the topic in cmd, the message "Got a subscriber to laserscan, starting pointcloud subscriber" shows up, if I stop the echo output in cmd, the message "No subscribers to laserscan, shutting down pointcloud subscriber" shows up.
With and without the subscriber it seems that your node doesn't start working, because my subscriber to /scan (simply echo the topic in cmd) doesn't get published messages.
minimal_launch.py.txt
pub_sub_node.cpp.txt

my fault.
Found what i've done wrong. I forgot to set the SensorDataQosProfile in my Subscriber.
Updated mub_sub_node is attached.
pub_sub_node.cpp.txt