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

ta's profile - activity

2018-07-27 12:43:45 -0500 received badge  Famous Question (source)
2018-07-03 09:07:09 -0500 received badge  Famous Question (source)
2018-07-03 09:07:09 -0500 received badge  Notable Question (source)
2018-05-28 21:01:55 -0500 received badge  Notable Question (source)
2018-05-28 21:01:55 -0500 received badge  Popular Question (source)
2018-05-16 04:16:22 -0500 received badge  Famous Question (source)
2018-05-01 05:18:20 -0500 received badge  Popular Question (source)
2018-03-22 02:31:40 -0500 received badge  Famous Question (source)
2017-12-07 04:02:20 -0500 received badge  Notable Question (source)
2017-12-07 03:34:07 -0500 asked a question RQT : .moc file not found

RQT : .moc file not found Hello, I'm trying to compile a gui application that interfaces with ROS. This application has

2017-11-10 14:02:55 -0500 received badge  Notable Question (source)
2017-11-03 02:28:35 -0500 marked best answer 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 charge of reading that sensor.

However, I need to make sure to understand how it exactly works before implementing this idea. Let's say that there are 5 different sensors each performing an initialization phase for 1 second to make sure they are behaving adequately. If it's the case, each node reading its corresponding sensor sends a message with the distance measured by the sensor after this initialization phase. If the sensor is faulty, the node sends a minus value instead (let say -1).

Then, the main node in charge of gathering all the sensors' data first wait for the initialization time + a small additional time to make sure all the messages have been sent on the corresponding topics and call afterwards all the callback with ros::spinOnce(). Let's pretend here for sake of simpliticy that the messages were received by the main node in a ascending order (if the sensors are enumerated from 1 to 5, the messages were received in that exact order). If the second sensor is faulty (hence the node did send a -1 value) and the callback determines its faultiness and throws an exception, what would happen to the other callbacks waiting to process the other messages in the queue ? Would they still be evaluated or would I have to call another time the ros::spinOnce() function in order to do so ?

Thanks in advance for your help.

2017-11-03 02:28:31 -0500 commented answer How are exceptions dealt with in callback ?

Thanks for your answer and taking the time to set up this experiment. It's eyes opening. So, if message callbacks behave

2017-11-03 02:24:13 -0500 received badge  Supporter (source)
2017-11-03 02:23:33 -0500 received badge  Enthusiast
2017-11-02 12:37:24 -0500 received badge  Popular Question (source)
2017-11-02 12:18:16 -0500 received badge  Student (source)
2017-11-02 03:22:57 -0500 asked a question How are exceptions dealt with in callback ?

How are exceptions dealt with in callback ? Hello, I'm currently thinking about throwing an exception directly in a call

2017-10-12 04:34:27 -0500 asked a question How to create unique Mavros messages

How to create unique Mavros messages Hello, Skimming through the online documentation, I've figured out how to send defa

2017-10-11 09:45:13 -0500 marked best answer Dealing with several sensors

Hi, I'm wondering about best practices (when it comes to performance or robustness for instance) for dealing with several sensors. Imagine our robot has 5 IR sensors and 2 sonars, is it better to handle the communication with all the IRĀ sensors with one node and the communication with the 2 sonars with another node and then publish on two different ROS topics messages with the relevant sensors' data or is it better to handle the communication with 7 nodes (5 for the IRĀ and 2 for the sensors) that all publish messages on a unique topic associated with that node (7 topics therefore).

Thanks.

2017-10-11 09:45:13 -0500 received badge  Scholar (source)
2017-10-11 06:52:05 -0500 received badge  Popular Question (source)
2017-10-10 11:11:12 -0500 asked a question Dealing with several sensors

Dealing with several sensors Hi, I'm wondering about best practices (when it comes to performance or robustness for inst