# Revision history [back]

My problem was solved by an answer to a similar problem of another person over at ros forum.

Basically the QoS of the subscriber/publisher pair is not compatible as described here.

Check QoS of a topic with

ros2 topic info -v /topicname


Setting the right QoS for the subscriber (in this case reliability='best effort' is needed) in the custom c++ script by using

create_subscription<custom_type_two>(topic_two, rclcpp::SensorDataQoS(), std::bind(...));


and setting the QoS in rviz2 in the individual topic settings solves the problem.