0
$\begingroup$

Rosanswers logo

hi guys!

Let say that I'm using an action server to request some action to my realtime controller. And let say that my hardware (motors and sensors) are being communicating trough a CANBus (not realtime) and I have a node to parse the CAN messages and read/write over the bus. The question is how to link up the "CAN node-driver" to the controller in a "realtime-safe way". I should use another action client? I should use services?

PS: the message parser communicates with the bus using treads, and currently is not linked with the realtime controller.

thank you in advance!


Originally posted by Bemfica on ROS Answers with karma: 482 on 2011-10-25

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you're talking to the controller over a CAN bus, which is not realtime safe. There's no way to implement a realtime controller in software.

A common way to do a realtime controller is to have the realtime thread and a non-realtime thread which does the external communications, and passes data into the realtime thread in a lock free manner. You can do this but it's not going to be worth the effort if you're on the other side of a CAN bus. Realtime requirements are about guaranteeing maximum response times, if there's ever a link which cannot provide those guarantees you cannot continue to be realtime beyond that connection.


Originally posted by tfoote with karma: 58457 on 2011-10-26

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Bemfica on 2011-10-27:
okay I know that, BUT, I can do guarantee if the bus doesn't gives me the response in X time, the data is no more valid so, do some safety action... this is sotf realtime but it's good enough in my case. tks for the look free trick

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.