Queue size and rate in Rossject ROS in 5 days Python

Hi guys

Please any help will appreciated
my rosject turtle bot 3 following the wall very good on gazebo but on real robot it has some lag and instead of turning it hits the wall.

I think it might hve to do with queue size an rate i tried publishing /cmd_vel in queue_size = 1 and total rate of 10

What you recommened i do rate.sleep() after publishing but it donst work on real robot
Thanks

Hi @jacob17.y ,

The most feasible solution that I have found to be working for me is to stop and move.
Move for few seconds and then stop. Move and stop…

Pseudocode:
Move or Turn
Sleep (few seconds)
Stop
Sleep (few seconds)

Also make sure to set /cmd_vel publisher queue_size to 10.

Regards,
Girish

thank i will try but
if your queue size is 10 what rospy.rate would you put?

Hi @jacob17.y ,

queue_size and rospy.rate has no relation, in my opinion.
Queue size just stores the specified no of messages in a queue. The Rate does not play any part in terms of Queue.
Of course, faster rate will fill the queue faster and similarly, slower rate will fill the queue slower.

Regards,
Girish