ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

John999991's profile - activity

2021-10-18 05:23:28 -0500 received badge  Famous Question (source)
2021-10-18 05:23:28 -0500 received badge  Popular Question (source)
2021-10-18 05:23:28 -0500 received badge  Notable Question (source)
2021-09-20 08:58:07 -0500 received badge  Famous Question (source)
2021-08-24 09:27:56 -0500 received badge  Nice Question (source)
2021-05-28 06:17:06 -0500 received badge  Self-Learner (source)
2021-05-28 06:17:06 -0500 received badge  Teacher (source)
2021-05-28 03:16:54 -0500 received badge  Student (source)
2021-05-14 05:26:34 -0500 marked best answer What does marker.lifetime = rospy.Duration() do?

Simple question :

What effect does marker.lifetime = rospy.Duration() have to a marker?

2021-01-02 06:52:56 -0500 received badge  Famous Question (source)
2021-01-02 06:52:56 -0500 received badge  Notable Question (source)
2020-12-07 09:12:52 -0500 received badge  Famous Question (source)
2020-12-07 09:12:52 -0500 received badge  Notable Question (source)
2020-12-06 20:36:13 -0500 received badge  Famous Question (source)
2020-12-06 20:36:13 -0500 received badge  Notable Question (source)
2020-11-16 02:26:19 -0500 received badge  Famous Question (source)
2020-11-16 02:26:19 -0500 received badge  Notable Question (source)
2020-09-22 05:03:13 -0500 received badge  Notable Question (source)
2020-09-10 09:44:40 -0500 received badge  Popular Question (source)
2020-09-10 00:23:52 -0500 edited question Launching a file after ROS re-installation

Launching a file after ROS re-installation Dear all, I had installed ROS Kinetic for UBUNTU 16.04 and had prepared some

2020-09-09 13:25:19 -0500 asked a question Trouble launching a .launch file after ROS reinstallation

Trouble launching a .launch file after ROS reinstallation Dear all, I had installed ROS Kinetic for UBUNTU 16.04 and had

2020-09-09 13:23:16 -0500 asked a question Launching a file after ROS re-installation

Launching a file after ROS re-installation Dear all, I had installed ROS Kinetic for UBUNTU 16.04 and had prepared some

2020-07-18 18:54:36 -0500 received badge  Famous Question (source)
2020-07-11 14:02:34 -0500 received badge  Notable Question (source)
2020-07-06 04:36:13 -0500 received badge  Notable Question (source)
2020-07-06 04:36:13 -0500 received badge  Popular Question (source)
2020-07-06 04:36:13 -0500 received badge  Famous Question (source)
2020-07-05 09:28:45 -0500 received badge  Notable Question (source)
2020-07-05 09:28:45 -0500 received badge  Popular Question (source)
2020-07-05 09:28:45 -0500 received badge  Famous Question (source)
2020-06-25 03:44:01 -0500 received badge  Notable Question (source)
2020-06-25 03:44:01 -0500 received badge  Famous Question (source)
2020-06-23 10:30:07 -0500 received badge  Popular Question (source)
2020-06-01 09:48:46 -0500 received badge  Famous Question (source)
2020-05-19 11:26:01 -0500 received badge  Notable Question (source)
2020-05-19 11:26:01 -0500 received badge  Famous Question (source)
2020-05-11 00:35:04 -0500 received badge  Famous Question (source)
2020-05-06 00:07:28 -0500 received badge  Notable Question (source)
2020-05-05 10:18:39 -0500 received badge  Popular Question (source)
2020-04-21 03:11:37 -0500 received badge  Popular Question (source)
2020-04-21 03:11:37 -0500 received badge  Notable Question (source)
2020-04-20 04:10:24 -0500 received badge  Famous Question (source)
2020-04-08 00:47:42 -0500 received badge  Notable Question (source)
2020-03-26 13:35:12 -0500 received badge  Popular Question (source)
2020-03-23 14:34:20 -0500 marked best answer Laser scan topic returns many messages

I am using a very simple subscription to a /scan topic to get the laser distances that my hokuyo laser scanner has grabbed, using:

scan_msg = rospy.Subscriber("/scan", LaserScan, scan_message, queue_size=1)

but when I print out the returning message I get 3 message packets, not 1 as expected. Why?

Code:

rospy.init_node("node1")
def scan_message(msg):
        laser_range = msg.ranges
        print "Range: ",laser_range


 scan_msg = rospy.Subscriber("/scan", LaserScan, scan_message, queue_size=1)

Result:

Range: (inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, inf, 2.886342763900757, 2.874502420425415, 2.8628132343292236, 2.8512728214263916, 2.839879274368286, 2.828630208969116, 2.817523241043091, 2.8065567016601562, 2.7957284450531006, 2.785036087036133, 2.7744781970977783, 2.764052629470825, 2.7537574768066406, 2.743590831756592, 2.733551025390625, 2.7236363887786865, 2.7138447761535645, 2.7041749954223633, 2.694624900817871, 2.6851933002471924, 2.6758782863616943, 2.6666784286499023, 2.657592296600342, 2.648618221282959, 2.6397545337677, 2.631000280380249, 2.6223537921905518, 2.613813638687134, 2.6053783893585205, 2.5970470905303955, 2.588818073272705, 2.5806901454925537, 2.572661876678467, 2.564732313156128, 2.5569002628326416, 2.549164295196533, 2.5415234565734863, 2.5339765548706055, 2.526522397994995, 2.5191597938537598, 2.511888027191162, 2.5047056674957275, 2.4976117610931396, 2.490605354309082, 2.4836854934692383, 2.476851224899292, 2.4701013565063477, 2.463434934616089, 2.4568514823913574, 2.4503495693206787, 2.4439284801483154, 2.4375874996185303, 2.431325674057007, 2.4251420497894287, 2.4190359115600586, 2.41300630569458, 2.407052516937256, 2.4011738300323486, 2.395369529724121, 2.389638662338257, 2.3839805126190186, 2.378394365310669, 2.3728795051574707, 2.3674352169036865, 2.362061023712158, 2.3567559719085693, 2.3515193462371826, 2.346350908279419, 2.341249465942383, 2.336214780807495, 2.3312461376190186, 2.326343059539795, 2.3289997577667236, 2.3506991863250732, 2.3728525638580322, 2.3954737186431885, 2.418576717376709, 2.4421770572662354, 2.466289758682251, 2.490931749343872, 2.5161192417144775, 2.541870594024658, 2.568204164505005, 2.5951387882232666, 2.622695207595825, 2.6508941650390625, 2.679757833480835, 2.7093093395233154, 2.739572763442993, 2.770573377609253, 2.802337646484375, 2.8348937034606934, 2.8682701587677, 2.902498245239258 ... (more)

2020-03-23 14:34:12 -0500 received badge  Famous Question (source)
2020-03-17 22:34:31 -0500 received badge  Popular Question (source)
2020-03-16 11:08:46 -0500 commented answer Laser scan topic returns many messages

The idea is to take the incoming message, break down the values into chunks, estimate some distances and take a decision

2020-03-16 11:07:59 -0500 commented answer Laser scan topic returns many messages

The idea is to take the incoming message, break down the values into chunks, estimate some distances and take a decision