Closed cmower closed 1 year ago
Alternatively, perhaps to be cleaner, the "get" methods should return np.float32
and the "set" methods only accept np.float32
. @mhubii, do you have any thoughts on this?
If I can add here, having two data types is not a good idea. The float32 should be good enough, so maybe stick to that?
on my system, having the data type conversion was not necessary for running the robot
thanks both, I will make the interface float32 for the get/set, since both fri versions succeed
Currently, the user is required to ensure the
dtype
of a numpy array passed to the "set" commands (e.g.setJointPosition
) is anp.float32
, for example:https://github.com/cmower/FRI-Client-SDK_Python/blob/2cb8023c2e47c3250f231a6bc4d6b5760a2b6857/examples/LBRJointSineOverlay.py#L31-L33
What's worse, is that the "get" methods, e.g.
getIpoJointPosition
as above, output numpy arrays withdtype=np.float64
. Two things should be changed in wrapper.cpp:dtype=np.float32
by default.dtype
internally to the correct format.~, see below