From a8fecfaa21648bb3eaedc8bc91e5767ace82d193 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Mon, 4 Oct 2021 20:56:37 +0200 Subject: [PATCH] Simplify if-else clauses Improve extensibility (adding more sensors) by emloying an exclusive-if-and-final-else strategy, utilizing a helper variable. This way we avoid augmenting the list in the 'sensor in [...]' tests. --- .../xacro/finger/distal/distal.urdf.xacro | 55 ++++++++++--------- .../hand/xacro/thumb/thdistal.gazebo.xacro | 2 +- .../hand/xacro/thumb/thdistal.urdf.xacro | 31 +++++++---- 3 files changed, 49 insertions(+), 39 deletions(-) diff --git a/sr_description/hand/xacro/finger/distal/distal.urdf.xacro b/sr_description/hand/xacro/finger/distal/distal.urdf.xacro index dd012ba6..a703f545 100644 --- a/sr_description/hand/xacro/finger/distal/distal.urdf.xacro +++ b/sr_description/hand/xacro/finger/distal/distal.urdf.xacro @@ -25,21 +25,22 @@ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"> - - - + + + + - - - - - - - - - - + + + + + + + + + + @@ -47,22 +48,24 @@ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"> - - - - - - - - - + + + + + + - + + + + + + - + diff --git a/sr_description/hand/xacro/thumb/thdistal.gazebo.xacro b/sr_description/hand/xacro/thumb/thdistal.gazebo.xacro index d3581a27..4e86a73d 100644 --- a/sr_description/hand/xacro/thumb/thdistal.gazebo.xacro +++ b/sr_description/hand/xacro/thumb/thdistal.gazebo.xacro @@ -3,7 +3,7 @@ - + 1 1000.0 diff --git a/sr_description/hand/xacro/thumb/thdistal.urdf.xacro b/sr_description/hand/xacro/thumb/thdistal.urdf.xacro index bc912554..f4d2a4d6 100644 --- a/sr_description/hand/xacro/thumb/thdistal.urdf.xacro +++ b/sr_description/hand/xacro/thumb/thdistal.urdf.xacro @@ -125,19 +125,23 @@ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"> - - - - + + + scale="0.001 0.001 0.001" /> + + + + + + @@ -147,19 +151,22 @@ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"> - - - - + + + scale="0.001 0.001 0.001" /> + + + + + +