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

Keeping a ROS thread running indefinitely on a Raspberry PI 3 [closed]

asked 2017-06-03 19:34:35 -0500

fhfonsecaa gravatar image

updated 2017-06-14 14:13:20 -0500

Hey guys,

I'm having a lot of problems working with raspberry pi and ROS kinetic.

The project is simple, I'm taking information from the Raspberry's GPIOs in order to communicate some process through iot_bridge. Due the kind of the project is mandatory that the program keep working for at least a day, the more time the better.

But I can only make it work for around half hour and then the loop stop without giving an error or a message, it only gets frozen.

I suspect, is a memory problem but I'm not sure. Does any one have an idea of what could it be and how can I solve it?

Thank you very much

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by NEngelhard
close date 2017-06-15 04:58:15.145465

Comments

1

Maybe try to run your program in a debugger (such as GDB) and interrupt it when it gets stuck, to see where it's stuck?

ahendrix gravatar image ahendrix  ( 2017-06-03 21:35:00 -0500 )edit

Please copy-paste the output. Posting it as a screenshot is the least helpful and discouraged in the support guideline.

130s gravatar image 130s  ( 2017-06-14 12:13:23 -0500 )edit
1

I'm sorry, I wasn't aware of that.

fhfonsecaa gravatar image fhfonsecaa  ( 2017-06-14 14:14:45 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-06-14 14:24:42 -0500

fhfonsecaa gravatar image

I think, I have found the problem.

I was making the ros launch and all the other process through ssh, in order to control it remotely.

Therefore, it was needed to use a local network. If the connection is broken, the ssh will wait unit the connection is reestablished. Because if that it stops the process and put in a queue all the commands, which were not received by the ssh connection.

The answer is to implement an ethernet connection, or run the nodes directly on the raspberry.

With this method is was able to run 2 days long.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-06-03 19:34:35 -0500

Seen: 465 times

Last updated: Jun 14 '17