ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

how to know the exact frame rate and angle of /scan on turtlebot?

asked 2017-09-24 11:20:36 -0500

rozoalex gravatar image

updated 2021-10-26 09:35:02 -0500

lucasw gravatar image

We get an array of floats from the scan topic, but how do I know which number correspond to which angle? In our project, we want know the distance of the obstacle at exactly 0 degree, 90 degree and 180 degree.


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-09-26 19:47:14 -0500

ezra_schroeder gravatar image

The good people at Robot Ignite Academy posted an answer to this question, and I assume it is perfectly alright if I post a link to their video walk-thru answering this question, here:

edit flag offensive delete link more



Actually, it would be much better if you could give (at least) a summary here, instead of linking to a video that takes 13 minutes to explain this. Future readers that like the more visual approach of video explanations can then still decide to watch it, but for all others, text suffices.

gvdhoorn gravatar image gvdhoorn  ( 2017-09-27 02:12:14 -0500 )edit

answered 2017-09-24 20:20:46 -0500

updated 2017-09-24 20:21:35 -0500

The info at the beginning of the message should tell you the min and max angle, and the angle between readings so you could work out from that which elements in the array correspond to those positions. There are also elements relating to the time

See details of the format of the scan message type here

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-09-24 11:20:36 -0500

Seen: 1,097 times

Last updated: Sep 24 '17