sr-ros-interface icon indicating copy to clipboard operation
sr-ros-interface copied to clipboard

Remove assumptions about actuator name length from sr-ros-interface

Open dg-shadow opened this issue 9 years ago • 1 comments

Change made to sr_mechanism_controllers/src/srh_fake_joint_calibration_controller.cpp in #328 means there is a tacit assumption of 4 letter actuator names. Discussion seems to suggest there are likely to be other places in the code that this is assumed...

Not causing any problems right now, but concievably could in the future.

dg-shadow avatar Jun 16 '15 11:06 dg-shadow

From previous discussions on how to handle prefix, I think it was said there is a convention for joint naming (an actuator naming too then) There must be some convention somewhere. The trimming on _ is risky too, in case prefix are not called "xxxx_" I will soon propose a PR with code in python where I used regex to find the joint names in the middle of the controller name, assuming there are always constructed like this splitted = re.split('[tfmrlw][fhr]j[0-5]_',controller.name)

this will wall in the same issue then

sr_mechanism_description assumes the joint number is always at the end. joint_name_[joint_name_.size()-1] == '0'

guihomework avatar Jun 16 '15 17:06 guihomework