Laser scan in myrosject

Hi there,

I come with a problem with my first rosject.
In the topic experiment of first rosject, we need to do “wall following behaviour”. But I have tried lots of times, it still seems wired. And I open a rqt_plot to show the following data:


but the plot is itself very wired:

Firstly I put the turtlebot always along the wall, but ranges[0] is alwas equal to ranges[719]. If I don’t misunderstand, ranges[0] represents distance of right side, and ranges[719] represents left. They cannot be equal anyway when the bot is near a wall and the direction is also along the wall.

I want to post pictures of rqt_plot, but I don’t know how to do that. I can only save the pictures inside the online demo user folder, not in my own computer. But here I can only choose the pictures in my own computer to upload… Anyway what I want to show is that when a bot is still, near the wall, along the wall, exactly not at a corner, but ranges[0] is also equal to ranges[719], that means the distance of front and right side are the same, but it is not in the simulation. So I get confused how to control the bot with such a wired laser… The result is of course always failed.

Secondly, if the bot moves along the wall, when the right distance is too big, it will move closer to the wall. But the ranges[0] will strangely get bigger, as it appraches the wall.

Before that I thought it was the problem of speed, so I changed lots of speed sets. But now I think it is the problem of laser data. please help…

Thank you very much!

Hi @MeineLiebeAxt ,

I had the same problem.
The laser scanner mounted on the robot in the rosject is a 360 degree laser scanner.
So 0/719 is back, 180 is right, 360 is front, and 540 is left.

Refer to this post: Incorrect Robot Scan Values in ROS Basics Course - Wall Follower Robot / TurtleBot3

Just do a rostopic echo /scan -n1 to get more info about laser scanner values if you are unsure of device properties.


Thank you! No wonder I felt it wired…

By the way, would you please show me how to save pictures in rosject on PC? If I want to post a picture in forum, it choose from PC, but the saved pictures in rosject can only in online user-folder…
And where to check the screenshots in “realrobotlab” simulation? I can screenshot but dont know where are they saved…

@MeineLiebeAxt ,

If you have taken a screenshot using your laptop/computer while running a rosject, the screenshot will be saved in your computer’s pictures folder.
If you are using a Linux machine, then your screenshots would be in “Pictures” folder.
I am not sure about Windows or Mac.

If you took a screenshot on rosject ROSDS page (I have not done that before), you will not be able to view that picture. So you can right click on the image file on your IDE and click download. Once you download the image to your computer, you can open and see it !

I hope I helped.


Thank you, that is clear. I made it too complex…

1 Like

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