New publisher discovered on topic, offering incompatible QoS.

asked 2023-07-19 04:02:41 -0500

kwasi_dp gravatar image

updated 2023-07-19 15:47:50 -0500

I am trying to run a program to control a roomba with ROS using the messages from the IRobot repository (https://github.com/iRobotEducation/ir...). I am trying to get the wheel speed using the 'wheel_vels' topic, but am struggling to do this. My code looks like as such:

//within node definition class

self.subscription = self.create_subscription(WheelVels,'wheel_vels' ,self.get_speed, 1)

self.current_speed= None

def get_speed(self,msg):

self.current_speed = msg.velocity_left

However, when I try to get speed, I get the following error: "New publisher discovered on topic 'wheel_vels', offering incompatible Qos. No messages will be received from it. Last incompatible policy: RELIABILITY"

How can I get past this error? I'm confused on what's causing it and how to fix it.

edit retag flag offensive close merge delete

Comments

maybe try to increase your queue size in

self.create_subscription(WheelVels,'wheel_vels' ,self.get_speed, 1)

from 1 to 10? I believe it is related to some of the documentation in this page: https://docs.ros.org/en/humble/Concep...

sdu568 gravatar image sdu568  ( 2023-07-19 19:26:05 -0500 )edit