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

Control Loop and Communication Loop Synchronization (sep. nodes)

asked 2013-01-20 22:54:25 -0600

alexalspach gravatar image

Hello, everyone,

My goal: I would like to find a standard way to allow control loops to be developed separately from the CAN communication. This would allow for easy interfacing with the hand without considering the communication. If this seems impossible, or would take more work than it is worth, please advise.

Background: I am currently building a ROS stack to accompany a 16 DOF robotic hand sold by my company. Packages within currently handle CAN communication and provide some demo control code.

I would like to implement a CAN communication node which publishes raw data (in this case encoder values) and subscribes to torque commands.

In a separate node, I would like to implement a controller that subscribes to the encoder readings and publishes the control torque values. Currently I'm running into problems because the loops do not run at the exact same frequency (333.33Hz, off by about 0.1Hz max).

I am new to ROS, so I have not yet learned some of the more sophisticated practices.

Thank you for your support.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-01-20 23:22:01 -0600

dornhege gravatar image

Actually I am not sure if ROS supports that use case. You could/should try implementing both nodes as nodelets at least, so that you avoid having separate binaries to communicate.

ROS adds queuing/ etc. in between which even if it works in testing, might not give you any guarantees. ROS aims more for asynchronous behaviour. You might need to just do it manually without ROS in between.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-20 22:54:25 -0600

Seen: 347 times

Last updated: Jan 20 '13