Skip to content

Commit 49117a0

Browse files
committed
(tm_mod_urdf) more pythonic str to float conversion
1 parent cb863de commit 49117a0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tm_mod_urdf/tm_mod_urdf/modify_urdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ def _gen_urdf(args=None):
146146
node.get_logger().error('stop service, invalid delta_dh parameters')
147147
return
148148

149-
dh = [float(i) for i in dh_strs]
150-
dd = [float(i) for i in dd_strs]
149+
dh = list(map(float, dh_strs))
150+
dd = list(map(float, dd_strs))
151151

152152
# find urdf path
153153
curr_path = os.path.dirname(os.path.abspath(__file__))

tm_mod_urdf/tm_mod_urdf/modify_xacro.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ def _gen_xacro(args=None):
146146
node.get_logger().error('stop service, invalid delta_dh parameters')
147147
return
148148

149-
dh = [float(i) for i in dh_strs]
150-
dd = [float(i) for i in dd_strs]
149+
dh = list(map(float, dh_strs))
150+
dd = list(map(float, dd_strs))
151151

152152
# find xacro path
153153
curr_path = os.path.dirname(os.path.abspath(__file__))

0 commit comments

Comments
 (0)