shadow-robot / sr-ros-interface

A ROS interface for Shadow Robot's hand.
GNU General Public License v2.0
22 stars 12 forks source link

non unified urdf.xacro #194

Open guihomework opened 9 years ago

guihomework commented 9 years ago

With the addition of the lite hand, again, new hand specific copies of palm, forearm etc.. appeared in the sr_description whereas some other xacro macros remained generic but got a specific is_lite parameter. Last year I worked hard to try unify the files for different types of hand in order to never have copy paste to do in all the files in case one needs to fix a small thing in one element. With several files, there are redundant information and updates might be forgotten in all instances of the files.

recent xacro 1.9.3 https://github.com/ros/xacro/commit/ee442c9f3f44c355dccf9d76b7790bd4386f4812 (soon available in upstream ros indigo), includes default parameters for xacro:macro. This way is_lite:=0 could be added to palm and forearm macros, which will not require any change to the standard hands using the macro as is, without adding the is_lite parameter, and the new hand lite could use the same macro specifying is_lite=1 to override the default. The same could be done for a lot of other parameters (creating default standard hand settings and cleaning up the long list of parameters for optional values)

Isn't this the better way to go to keep the sr_description maintainable ?

toliver commented 9 years ago

It certainly is a better way. We'll do these changes as soon as we can.