how to change sample range readings from default turtlebot3 distance sensor?

asked 2019-04-01 17:25:39 -0500

dranaju gravatar image

Hello, I have the turtlebot3 (BURGER) [not in gazebo] default sensor parameters. There are 360 readings of the sensor, but I want it for 10 readings only.

My readings are:

$ rostopic echo scan -n1
header: 
      seq: 78
      stamp: 
secs: 1553638997
nsecs: 405795087
frame_id: "base_scan"
angle_min: 0.0
angle_max: 5.6548666954
angle_increment: 0.628318548203
time_increment: 2.99099992844e-05
scan_time: 0.0
range_min: 0.119999997318
range_max: 3.5
ranges: [3.802000045776367, 3.9079999923706055, 3.878000020980835, 3.8989999294281006, 3.740000009536743, 1.628999948501587, 0.0, 1.5490000247955322, 1.5750000476837158, 1.597000002861023, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.0929999351501465, 0.0, 0.0, 0.0, 0.0, 0.0, 4.129000186920166, 0.0, 0.0, 0.0, 2.9230000972747803, 2.9619998931884766, 2.9839999675750732, 2.9779999256134033, 3.0350000858306885, 3.0190000534057617, 3.0190000534057617, 3.065999984741211, 2.7750000953674316, 2.3440001010894775, 2.361999988555908, 2.390000104904175, 2.6600000858306885, 2.861999988555908, 3.1570000648498535, 3.2309999465942383, 3.26200008392334, 3.2330000400543213, 3.2709999084472656, 3.36899995803833, 3.328000068664551, 3.3910000324249268, 3.430000066757202, 3.4010000228881836, 3.578000068664551, 3.559999942779541, 3.624000072479248, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.9520000219345093, 0.9520000219345093, 0.0, 0.0, 0.0, 0.0, 0.0, 0.6769999861717224, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 4.177999973297119, 0.0, 0.0, 0.0, 0.0, 3.921999931335449, 0.0, 0.0, 0.0, 3.375, 3.246000051498413, 3.131999969482422, 3.0869998931884766, 3.0390000343322754, 2.9570000171661377, 2.9489998817443848, 2.88700008392334, 2.8320000171661377, 2.802000045776367, 2.760999917984009, 2.7230000495910645, 2.6589999198913574, 2.6419999599456787, 2.632999897003174, 2.5739998817443848, 2.5290000438690186, 0.0, 2.069999933242798, 2.069000005722046, 0.0, 2.3459999561309814, 2.3420000076293945, 2.312999963760376, 2.2839999198913574, 2.25, 2.263000011444092, 2.2239999771118164, 2.2060000896453857, 2.180000066757202, 2.1530001163482666, 2.1559998989105225, 2.134999990463257, 2.125999927520752, 2.117000102996826, 2.0889999866485596, 2.0789999961853027, 2.0769999027252197, 2.0759999752044678, 2.0490000247955322, 2.0429999828338623, 2.0350000858306885, 2.0360000133514404, 1.930999994277954, 2.0169999599456787, 2.052999973297119, 1.9880000352859497, 2.0339999198913574, 2.003000020980835, 2.0480000972747803, 1.968000054359436, 2.0199999809265137, 1.996999979019165, 1.9670000076293945, 1.975000023841858, 1.9589999914169312, 1.9529999494552612, 1.9769999980926514, 2.0280001163482666, 2.002000093460083, 2.003000020980835, 1.9010000228881836, 1.875, 1.875, 1.934999942779541, 0.0, 0.0, 0.0, 0.0, 0.0, 2.178999900817871, 2.059999942779541, 2.072000026702881 ...
(more)
edit retag flag offensive close merge delete