Closed PeterBowman closed 5 years ago
Excellent! BTW, nice to finally see some use of typemaps.i
in practice. Ok ready to merge?
I'd rather have this working (ref):
It should also be noted that although the %apply directive is used to associate typemap rules to datatypes, you can also use the rule names directly in arguments. For example, you could write this:
That is, write the typemap rule specific to a single function (stat
) instead of all function parameters that happen to share the same name (state
, timestamp
). However, I did not succeed to make that work with class methods...
Ok ready to merge?
Yes!
Closes https://github.com/roboticslab-uc3m/kinematics-dynamics/issues/175. The signature of
ICartesianControl::stat
has been changed in order to include the instant in which joint data acquisition has been performed:Now, the
state
parameter is optional, therefore consumers don't need to declare an unused variable anymore, just calliCartesianControl->stat(x)
in case they don't care about the current controller state (nor the encoder timestamp).The BCC implementation relies on the availability of a
yarp::dev::IPreciselyTimed
implementation on the remote robot. If that's not the case, BCC generates a timestamp on the fly. This could be turned into an error on BCC's initialization.Python bindings have been updated, see example:
ret, state, timestamp = iCartesianControl->stat(x)
. I believe that the glue file.i
could be improved upon, but this is beyond my SWIG skills.