Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can I post to ros's callbackQueue()?

Looking at the "Callbacks and Spinning" wiki, ROS apparently is using an event queue under the hood.

I would like to post a callback to this queue from within another callback.

Is this possible, and how do I do it?

Can you point me to example?

---Background ---

I have 4 callbacks that are processed. A,B,C, and D

Assume these get posted in FIFO order [C A D B].

I would like the first (C in the example) processed, to post another event E to the callback queue. So after processing, C, the queue should be [A D B E], so that A is processed next.

If I understand the wiki, I could call ros::spin() within the C callback function to process A-D-B, and then call E directly, but for various reasons I prefer to post a separate callback.

Thoughts?

How can I post to ros's callbackQueue()?

Looking at the "Callbacks and Spinning" wiki, ROS apparently is using an event queue under the hood.

I would like to post a callback to this queue from within another callback.

Is this possible, and how do I do it?

Can you point me to example?

---Background ---

I have 4 callbacks that are processed. A,B,C, and D

Assume these get posted in FIFO order [C A D B].

I would like the first (C in the example) processed, to post another event E to the callback queue. So after processing, C, the queue should be [A D B E], so that A is processed next.

If I understand the wiki, I could call ros::spin() within the C callback function to process A-D-B, and then call E directly, but for various reasons I prefer to post a separate callback.

Thoughts?

How can I post to ros's callbackQueue()?

Looking at the "Callbacks and Spinning" wiki, ROS apparently is using an event queue under the hood.

I would like to post a callback to this queue from within another callback.

Is this possible, and how do I do it?

Can you point me to example?

---Background ---

I have 4 callbacks that are processed. A,B,C, and D

Assume these get posted in FIFO order [C A D B].

I would like the first (C in the example) processed, to post another event E to the callback queue. So after processing, C, the queue should be [A D B E], so that A is processed next.

If I understand the wiki, I could call ros::spin() within the C callback function to process A-D-B, and then call E directly, but for various reasons I prefer to post a separate callback.

Thoughts?

How can I post to ros's callbackQueue()?

Looking at the "Callbacks and Spinning" wiki, ROS apparently is using an event queue under the hood.

I would like to post a callback to this queue from within another callback.

Is this possible, and how do I do it?

Can you point me to example?

---Background ---

I have 4 callbacks that are processed. A,B,C, and D

Assume these get posted in FIFO order [C A D B].

I would like the first (C in the example) processed, to post another event E to the callback queue. So after processing, C, the queue should be [A D B E], so that A is processed next.

If I understand the wiki, I could call ros::spin() within the C callback function to process A-D-B, and then call E directly, but for various reasons I prefer to post a separate callback.

Thoughts?

How can I post to ros's callbackQueue()?

Looking at the "Callbacks and Spinning" wiki, ROS apparently is using an event queue under the hood.

I would like to post a callback to this queue from within another callback.

Is this possible, and how do I do it?

Can you point me to example?

---Background ---

I have 4 callbacks that are processed. A,B,C, and D

Assume these get posted in FIFO order [C A D B].

I would like the first (C in the example) processed, to post another event E to the callback queue. So after processing, C, the queue should be [A D B E], so that A is processed next.

If I understand the wiki, I could call ros::spin() within the C callback function to process A-D-B, and then call E directly, but for various reasons I prefer to post a separate callback.

Thoughts?

How can I post to ros's callbackQueue()?

Looking at the "Callbacks and Spinning" wiki, ROS apparently is using an event queue under the hood.

I would like to post a callback to this queue from within another callback.

Is this possible, and how do I do it?

Can you point me to example?

---Background ---

I have 4 callbacks that are processed. A,B,C, and D

Assume these get posted in FIFO order [C A D B].

I would like the first (C in the example) processed, to post another event E to the callback queue. So after processing, C, the queue should be [A D B E], so that A is processed next.

If I understand the wiki, I could call ros::spin() within the C callback function to process A-D-B, and then call E directly, but for various reasons I prefer to post a separate callback.

Thoughts?