Hi all,I'm just getting started with ros_control and attempting to understand a bit better how things are expected to be done, and had a quick question about the diffbot example/tests supplied with diff_drive_controller.Specifically, is this AsyncSpinner business idiomatic ros_control? Given that diff_drive_controller is really only closing the loop around one input (encoders), I'd prefer to trigger the controller update right from that callback, rather than having the callback message cached and consumed in a separate asynchronous rate-loop (thus introducing an unknown and variable delay between data-in and command-out).
Even if it were going to be an asynchronous loop, wouldn't you just call the update from a Timer callback and spin as usual?
--
You received this message because you are subscribed to the Google Groups "ROS/Orocos Robot Control Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-co...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
HI Adolfo,This is helpful to understand, thanks.In my particular case, the telemetry is coming in at 50Hz from a single source (USB-connected microcontroller).
Given that, I'd prefer to just trigger the global controller update right from my telemetry callback. It doesn't sound like it really matters where the update() method is called from, so long as it's regular.
If I decide to go to the realtime thread approach in the future, you'd recommend SCHED_FIFO plus a pam_limits setting for the ros user?
Do you send commands to the controller at 50Hz as well?.
The maximum delay you could have between a command callback being serviced and it getting processed by the update(...) method is one control cycle. Is your setup sensible to such command variations?. If so, would it make sense to push some of the logic that requires tighter integration with the control loop inside a controller?. Considering that commands are sent through ROS interfaces, and are themselves not very deterministic because of the ROS transport, it is typical that they refresh at lower rates than the actual control (e.g., one order of magnitude or more).
You could compute actuator commands right in the callback, with no particular gain, but more complexity. The typical control cycle of a RobotHW implementation looks like:
hw.read();controller_manager.update(time, period);hw.write();
--
You received this message because you are subscribed to the Google Groups "ROS/Orocos Robot Control Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-robot-co...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.