Skip to content

Commit 167d75d

Browse files
committed
Converted units to meters for ROS
1 parent c40b75c commit 167d75d

File tree

2 files changed

+21402
-21402
lines changed

2 files changed

+21402
-21402
lines changed

cuboid_detection/templates/make_cuboid.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import numpy as np
33

44
parser = argparse.ArgumentParser()
5-
parser.add_argument('-L', '--length', default=200, type=int, help='cuboid length (mm)')
6-
parser.add_argument('-W', '--width', default=100, type=int, help='cuboid width (mm)')
7-
parser.add_argument('-H', '--height', default=75, type=int, help='cuboid height (mm)')
8-
parser.add_argument('-d', '--density', default=2, type=float, help='number of points per unit (mm)')
5+
parser.add_argument('-L', '--length', default=0.2, type=float, help='cuboid length (m)')
6+
parser.add_argument('-W', '--width', default=0.1, type=float, help='cuboid width (m)')
7+
parser.add_argument('-H', '--height', default=0.075, type=float, help='cuboid height (m)')
8+
parser.add_argument('-d', '--density', default=0.002, type=float, help='number of points per unit (m)')
99
parser.add_argument('-f', '--filename', default='', type=str, help='output filename')
1010
args = parser.parse_args()
1111

@@ -16,7 +16,7 @@
1616

1717
# Handle filename
1818
if not args.filename:
19-
args.filename = 'template_cuboid_L%d_W%d_H%d.pcd' % (L, W, H)
19+
args.filename = 'template_cuboid_L%d_W%d_H%d.pcd' % (L * 1000, W * 1000, H * 1000)
2020
elif not args.filename.endswith('.pcd'):
2121
args.filename += '.pcd'
2222

0 commit comments

Comments
 (0)