ROS Basics Real Robot Project : Nothing published to /scan

when I used rostopic echo /scan command to see what are the info that I got, but I didn’t receive anything.

I worte subsciber like this → sub = rospy.Subscriber(’/scan’, LaserScan, self.callback)

Hi, welcome to the community!

Is this issue happening while you are working with the simulation or the real robot?

You can make sure the topic is receiving data with

rostopic echo /scan -n1

Which will return one /scan message

when working with simulation.

Nothing as well.

Actually, it returns 0.

I’ve tried to apply with the real robot, /scan can returns the values. I don’t know what happened with my simulation.

Hi,

I recommend killing your simulation and launching it again. The /scan topic is offered by gazebo, and it sometimes doesn’t start correctly. Let me know if you continue to run into this issue.

I’ve got some error after running the simulation. Although, the /scan can return the laser’s value, it didn’t show anything on the screen at showed on the top of the image below.

The simulation still runs with those errors. I apologize that this can be confusing.

When you see that screen, try hovering your mouse over and zoom out with the mouse scrolling wheel. Sometimes the displaying doesn’t work but it’s there.

Can you see an output of topics when you have that simulation and run

rostopic list

If you see them, then try zooming out. If you don’t, then there might be an error with your rosject and you might have to fork another copy

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.