Skip to main content

Questions tagged [spinonce]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
8 views

Standby mode for nodes depending on topic value

Let's assume we have 10 nodes performing various operations. We run all the nodes with one launch file at a time. We also have one topic "/mode" in which we specify the value of int. Now we ...
user avatar
0 votes
1 answer
3 views

Design advice for executing sequence of ros msg interactions

I am struggling with a good design for nodes that when receiving a callback must perform a sequence of interactions with one or more other ros nodes. So far I ended up mixing spin and spinOnce but ...
user avatar
0 votes
1 answer
6 views

How are exceptions dealt with in callback?

Hello, I'm currently thinking about throwing an exception directly in a callback method if the message received is an error message (faulty sensor), which has been sent by the corresponding node in ...
user avatar
0 votes
1 answer
10 views

What can cause spinOnce to stop processing messages?

I'm trying to debug a very rare instance (that happens randomly) in my node when I will be waiting for a specific message and it never gets received. I've created a very rough code example to help ...
user avatar
0 votes
1 answer
3 views

Is there a way to call spinOnce for a specific subscriber?

Inside my node I have several callbacks. I want to avoid using spinOnce() inside my node as much as possible since the current job should always finish what it is doing before the next callback begins....
user avatar
0 votes
1 answer
9 views

Can't get dynamic reconfigure to spin when callback is a member of a class

I am using ROS Indigo, Ubuntu 14.04. Get no compile errors. When I debug with GDB I can see I go into my callback once, but no more thereafter. This also happened when the callback was made global ...
user avatar
0 votes
1 answer
11 views

One Global callbackqueue for each node?

From what I know: If we do not specify, by default the subscribe is going to global callbackqueue on that node. I assume that each node has 1 global callbackqueue However I read question&ans ...
user avatar
0 votes
1 answer
6 views

Which data is thrown away in queue if publish and spinonce rate is different?

I read that SpinOnce does not only make callback, but it will also clean the queue if possible. is that right? Let's say publisher publish alphabets (a,b,c,...) at 9hz, and subscriber call Spinonce at ...
user avatar
0 votes
1 answer
3 views

Method does not return after subscription - EDIT : ROS shutdowns after ros::spinOnce()

I am drawing waypoints on a map. I have a MapViewer class with the following constructor. ...
Janindu's user avatar
  • 517
0 votes
1 answer
2 views

Redeclare loop_rate depending on boolean

Given this example, in which I want to decide via if which loop_rate to use when spinning ...
user avatar
0 votes
1 answer
5 views

Why doesn't my node publish to the topic cmd_vel?

Hi, I'm trying to send commands to an Ardrone through cmd_vel topic. But I don't know why it isn't working, here is my code: ...
user avatar
0 votes
2 answers
3 views

Order of called-back program when execute spinOnce

Hi there, it's my first time asking question, if there is something I missed please inform me:) So my question is like this. I have one node, with two subscriber, linked to two different topic. When ...
user avatar
0 votes
2 answers
55 views

Getting messages after an user input?

Hi all, Right now my situation is that there is a node that publishes information, and I need to be able grab information from the publishing node and then print out (I need it for more than just &...
user avatar
0 votes
2 answers
46 views

The difference between Spin() and SpinOnce()

Can someone tell me the difference between Spin() and SpinOnce()? And what exactly they are doing, is it like a while loop to process some ROS stuff? Originally posted by Winston on ROS Answers with ...
user avatar
0 votes
1 answer
25 views

Using CallbackQueue

Hi, I have a code where I have already subscribed to the following topics ...
user avatar
0 votes
1 answer
10 views

Node crashes on spinOnce

Hi, I have a node that is crashing with a terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check error. The backtrace ...
user avatar
0 votes
1 answer
11 views

Is spinOnce needed?

If I have ROS node that has an infinite loop that has other things running, do I need to use spin or spinOnce? The other items have specific timing such as 100 and 50 Hz but the subscriber I have ...
user avatar
0 votes
1 answer
31 views

segmentation fault (core dumped) caused by ros::spinOnce?

In these days, I spent all my time with coding, but there always problems with me, the newbie to ROS. And I try to search the answer here, but I still need some help. For the question, main point is ...
user avatar
0 votes
1 answer
1 view

If publishes faster than calling SpinOnce, would CallBack Queue be filled up eventually?

If we have a publisher publishing at 40Hz, and the subscriber is calling SpinOnce at 20Hz, would our CallBack Queue be filled up eventually? Originally posted by Dumpsomer on ROS Answers with karma: ...
user avatar
0 votes
1 answer
6 views

What are possible reasons for ros::spinOnce causing segmentation faults?

I'm having a problem where ros::spinOnce() will cause my code to stop running because of a segmentation fault when it reaches that line. I'm not sure if it's possible to answer without seeing code but ...
user avatar
0 votes
2 answers
52 views

ros::spinOnce() not functioning properly

Hello, So I went through the tutorials for publishing/subscribing for a message over a ROS topic over here http://ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29 So, I ran ...
user avatar