Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
PIDMC Class ReferenceA nice little MotionCommand for manually manipulating the PID values. More...
Inheritance diagram for PIDMC:
Detailed DescriptionA nice little MotionCommand for manually manipulating the PID values. This will, by default, autoprune after its PID values have been set. Although this doesn't handle directly sending PID commands to the system (the MotionManager::updatePIDs() does that) a little documentation on how Tekkotsu ad OPEN-R handle the PIDs might be nice. In Tekkotsu, each of P,I, and D are a single floating point number. However, OPEN-R has, in essence, a limited precision floating point number. Each value is broken into a gain (mantissa) and shift (exponent). The shifts appear to be 4 bit values, and are inverted. In other words, x = g/(1<<(0x10-s)), or The gain is probably 6-8 bits of resolution. On the ERS-2xx series, each joint is completely independent. One caveat is that the shift value 0x0A gives a warning (AGRMSDriver::SetGain() : 0x0A IS USED FOR GAIN SHIFT VALUE.) for some unknown reason. On the ERS-7, all the joints share the last set shift values, so a global set of shifts must be enforced. This of course, pretty much kills the whole point of having the shifts. To understand the conversion from Tekkotsu format to the OPEN-R format, see MotionManager::updatePIDs(). A final note: the OPENR::SetJointGain function seems to be a rather costly function call. You should probably try to avoid setting PIDs at too high a frequency. Definition at line 42 of file PIDMC.h.
Constructor & Destructor Documentation
Constructor, sets general power level of a range of joints, uses default and 0 weight for others, see setRangePowerLevel().
Note that if you want to set a single joint i, then low = i, and high = i + 1 because high is an exclusive upper limit Member Function Documentation
marks this as dirty each time it is added Reimplemented from MotionCommand.
Sets the PIDs to a percentage of default for all joints. Definition at line 111 of file PIDMC.h. Referenced by PIDMC(), and setDefaults().
Sets a range of joints' PIDs to a given power level and weight.
Note that if you want to set a single joint i with this function (as opposed to setJointPowerLevel() which is designed for that...) then you would need to pass low = i, and high = i + 1 because high is an exclusive upper limit Definition at line 128 of file PIDMC.h. Referenced by PIDMC().
Member Data Documentation
true if we've reported completion of this motion command Definition at line 164 of file PIDMC.h. Referenced by doStart(), and updateOutputs().
true if there are changes that have not been picked up by Motion Definition at line 163 of file PIDMC.h. Referenced by doStart(), isAlive(), isDirty(), PIDMC(), setAllPowerLevel(), setDirty(), setJointPowerLevel(), setPID(), setRangePowerLevel(), and updateOutputs().
the PIDs being requested Definition at line 165 of file PIDMC.h. Referenced by getPID(), setAllPowerLevel(), setJointPowerLevel(), setPID(), setRangePowerLevel(), and updateOutputs(). The documentation for this class was generated from the following file: |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:14 2016 by Doxygen 1.6.3 |