I'm having good luck achieving microsecond resolution pulse trains using DMA on a Raspberry Pi at near real-time rates, and I'm confident that with some optimization this will be workable for step generation with low cpu usage. I currently have this step generation hacked into a Machinekit configuration which monitors the trajectory planner position pins. When a loop in Python detects a change in axis.0.motor-pos-cmd, for example, it queries axis.0.joint-vel-cmd and creates a stream of n steps at the proper frequency where n is the number of steps that will fit into my millisecond servo loop.
The DMA library I am using is capable of synchronizing sequential waveforms, so I would like to be able to look ahead in the trajectory planner queue a step or two and construct the waveforms in advance where possible, which should help solve some latency issues. I have a few questions towards achieving this: 1) Is there a better mechanism to detect a new trajectory step than monitoring changes in the position-commanded HAL pin? 2) Is there visibility into the trajectory planning queue somewhere? 3) Perhaps these are not exposed in the current Python bindings; if not, is there a good example of accessing it via C calls? 4) Are there any other tips on source code areas I should investigate as resources in putting this together? Brian -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
