Closed gavanderhoorn closed 5 years ago
hi, is this as straightforward as raising as error and returning?
@Ridhwanluthra: yes, it should fail:
This is not a good behaviour: the function should fail if it cannot find any joint names.
a suitable message printed using ROS_ERROR(..)
and returning false
would be good.
cool, fixing this as a part of #wrid18
PR #195 has been merged closing.
In
industrial_utils/param_utils::getJointNames(..)
:https://github.com/ros-industrial/industrial_core/blob/9a0fe17aa129fe1857dccf54043ab534379eb924/industrial_utils/src/param_utils.cpp#L122-L129
If either
controller_joint_names
cannot be found, or the urdf cannot be parsed for joint names,getJointNames(..)
returns a set of 'default names'.This is not a good behaviour: the function should fail if it cannot find any joint names. Making some names up (even though they follow ros-i conventions) and then returning successfully makes for poor reproducibility and complicates debugging.