Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
itmo-sai-code
rostok
Commits
ac6b4b53
Commit
ac6b4b53
authored
2 years ago
by
K Z
Browse files
Options
Download
Email Patches
Plain Diff
add piramida
parent
25780214
article_mor
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
article/obj_grasp/PUNK_PIRAMIDA_M.obj
+215
-0
article/obj_grasp/PUNK_PIRAMIDA_M.obj
article/obj_grasp/objects.py
+27
-39
article/obj_grasp/objects.py
with
242 additions
and
39 deletions
+242
-39
article/obj_grasp/PUNK_PIRAMIDA_M.obj
0 → 100644
View file @
ac6b4b53
# WaveFront *.obj file (generated by Autodesk ATF)
mtllib PUNK_PIRAMIDA_M.mtl
g Body1
v 0.156759 -0.084400 0.146344
v 0.191385 -0.031735 0.220599
v 0.112245 -0.084400 0.241805
v 0.112245 0.020930 0.241805
v 0.156759 0.020930 0.146344
v -0.001640 0.134659 0.193737
v -0.043524 0.221252 0.280329
v -0.001640 0.099257 0.269656
v -0.085408 0.099257 0.269656
v -0.085408 0.134659 0.193737
v -0.189886 0.082500 -0.041847
v -0.289612 0.037500 -0.184270
v -0.189886 -0.007500 -0.041847
v -0.132035 -0.007500 -0.110791
v -0.132035 0.082500 -0.110791
v 0.225000 -0.225000 0.000000
v 0.000000 -0.000000 -0.268145
v 0.225000 0.225000 0.000000
v -0.225000 0.225000 0.000000
v -0.225000 -0.225000 0.000000
v 0.000000 0.000000 0.482514
vt 0.000000 0.000000 0.000000
vt -5.266482 8.193191 0.000000
vt -10.532964 0.000000 0.000000
vt -0.000000 0.000000 0.000000
vt -5.266482 8.193191 0.000000
vt -10.532964 0.000000 0.000000
vt 0.000000 0.000000 0.000000
vt -5.266482 8.193191 0.000000
vt -10.532964 0.000000 0.000000
vt 0.000000 0.000000 0.000000
vt -5.266482 8.193191 0.000000
vt -10.532964 -0.000000 0.000000
vt 0.000000 0.000000 0.000000
vt -4.188392 12.246040 0.000000
vt -8.376784 0.000000 0.000000
vt 0.000000 0.000000 0.000000
vt -4.188392 12.246040 0.000000
vt -8.376784 0.000000 0.000000
vt 0.000000 0.000000 0.000000
vt -4.188392 12.246040 0.000000
vt -8.376784 -0.000000 0.000000
vt -0.000000 0.000000 0.000000
vt -4.188392 12.246040 0.000000
vt -8.376784 0.000000 0.000000
vt 0.000000 0.000000 0.000000
vt -4.500000 17.386665 0.000000
vt -9.000000 -0.000000 0.000000
vt 0.000000 0.000000 0.000000
vt -4.500000 17.386665 0.000000
vt -9.000000 0.000000 0.000000
vt 0.000000 -0.000000 0.000000
vt -4.500000 17.386665 0.000000
vt -9.000000 -0.000000 0.000000
vt 0.000000 -0.000000 0.000000
vt -4.500000 17.386665 0.000000
vt -9.000000 -0.000000 0.000000
vt 0.000000 -0.000000 0.000000
vt -22.500000 35.003786 0.000000
vt -45.000000 -0.000000 0.000000
vt 0.000000 0.000000 0.000000
vt -22.500000 35.003786 0.000000
vt -45.000000 -0.000000 0.000000
vt -14.250000 14.462721 0.000000
vt -14.250000 5.462721 0.000000
vt 0.000000 0.000000 0.000000
vt -23.250000 5.462721 0.000000
vt -45.000000 0.000000 0.000000
vt -23.250000 14.462721 0.000000
vt -22.500000 35.003786 0.000000
vt 0.000000 0.000000 0.000000
vt -22.500000 35.003786 0.000000
vt -45.000000 0.000000 0.000000
vt -22.500000 53.239536 0.000000
vt -45.000000 0.000000 0.000000
vt -22.336025 29.753262 0.000000
vt -45.000000 0.000000 0.000000
vt -22.336025 21.376477 0.000000
vt -0.000000 0.000000 0.000000
vt -13.959240 21.376477 0.000000
vt -13.959240 29.753262 0.000000
vt -22.500000 53.239536 0.000000
vt -20.407008 16.147244 0.000000
vt -30.939972 16.147244 0.000000
vt -45.000000 0.000000 0.000000
vt -30.939972 26.680208 0.000000
vt -22.500000 53.239536 0.000000
vt -20.407008 26.680208 0.000000
vt 0.000000 0.000000 0.000000
vt 0.000000 0.000000 0.000000
vt -22.500000 53.239536 0.000000
vt -45.000000 0.000000 0.000000
vn 58.256342 -76.604444 27.165378
vn 58.256342 -76.604444 27.165378
vn 58.256342 -76.604444 27.165378
vn 25.881905 0.000000 96.592583
vn 25.881905 0.000000 96.592583
vn 25.881905 0.000000 96.592583
vn 58.256342 76.604444 27.165378
vn 58.256342 76.604444 27.165378
vn 58.256342 76.604444 27.165378
vn 90.630779 0.000000 -42.261826
vn 90.630779 0.000000 -42.261826
vn 90.630779 0.000000 -42.261826
vn 93.969262 30.997552 14.454396
vn 93.969262 30.997552 14.454396
vn 93.969262 30.997552 14.454396
vn 0.000000 -8.715574 99.619470
vn 0.000000 -8.715574 99.619470
vn 0.000000 -8.715574 99.619470
vn -93.969262 30.997552 14.454396
vn -93.969262 30.997552 14.454396
vn -93.969262 30.997552 14.454396
vn 0.000000 70.710678 -70.710678
vn 0.000000 70.710678 -70.710678
vn 0.000000 70.710678 -70.710678
vn -81.915204 0.000000 57.357644
vn -81.915204 0.000000 57.357644
vn -81.915204 0.000000 57.357644
vn -19.826689 -96.592583 -16.636568
vn -19.826689 -96.592583 -16.636568
vn -19.826689 -96.592583 -16.636568
vn 42.261826 0.000000 -90.630779
vn 42.261826 0.000000 -90.630779
vn 42.261826 0.000000 -90.630779
vn -19.826689 96.592583 -16.636568
vn -19.826689 96.592583 -16.636568
vn -19.826689 96.592583 -16.636568
vn 76.604444 0.000000 -64.278761
vn 76.604444 0.000000 -64.278761
vn 76.604444 0.000000 -64.278761
vn 0.000000 76.604444 -64.278761
vn 0.000000 76.604444 -64.278761
vn 0.000000 76.604444 -64.278761
vn -76.604444 0.000000 -64.278761
vn -76.604444 0.000000 -64.278761
vn -76.604444 0.000000 -64.278761
vn -76.604444 0.000000 -64.278761
vn -76.604444 0.000000 -64.278761
vn -76.604444 0.000000 -64.278761
vn -76.604444 0.000000 -64.278761
vn 0.000000 -76.604444 -64.278761
vn 0.000000 -76.604444 -64.278761
vn 0.000000 -76.604444 -64.278761
vn -90.630779 0.000000 42.261826
vn -90.630779 0.000000 42.261826
vn -90.630779 0.000000 42.261826
vn 0.000000 90.630779 42.261826
vn 0.000000 90.630779 42.261826
vn 0.000000 90.630779 42.261826
vn 0.000000 90.630779 42.261826
vn 0.000000 90.630779 42.261826
vn 0.000000 90.630779 42.261826
vn 0.000000 90.630779 42.261826
vn 90.630779 0.000000 42.261826
vn 90.630779 0.000000 42.261826
vn 90.630779 0.000000 42.261826
vn 90.630779 0.000000 42.261826
vn 90.630779 0.000000 42.261826
vn 90.630779 0.000000 42.261826
vn 90.630779 0.000000 42.261826
vn 0.000000 -90.630779 42.261826
vn 0.000000 -90.630779 42.261826
vn 0.000000 -90.630779 42.261826
usemtl Steel_-_Satin
f 1/1/1 2/2/2 3/3/3
f 3/4/4 2/5/5 4/6/6
f 4/7/7 2/8/8 5/9/9
f 5/10/10 2/11/11 1/12/12
f 6/13/13 7/14/14 8/15/15
f 8/16/16 7/17/17 9/18/18
f 9/19/19 7/20/20 10/21/21
f 10/22/22 7/23/23 6/24/24
f 11/25/25 12/26/26 13/27/27
f 13/28/28 12/29/29 14/30/30
f 14/31/31 12/32/32 15/33/33
f 15/34/34 12/35/35 11/36/36
f 16/37/37 17/38/38 18/39/39
f 18/40/40 17/41/41 19/42/42
f 15/43/43 11/44/44 19/45/45
f 19/45/45 11/44/44 13/46/46
f 19/45/45 13/46/46 20/47/47
f 20/47/47 13/46/46 14/48/48
f 20/47/47 14/48/48 17/49/49
f 17/49/49 14/48/48 15/43/43
f 17/49/49 15/43/43 19/45/45
f 20/50/50 17/51/51 16/52/52
f 20/50/53 21/53/54 19/54/55
f 8/55/56 18/56/57 6/57/58
f 6/57/58 18/56/57 19/58/59
f 6/57/58 19/58/59 10/59/60
f 10/59/60 19/58/59 9/60/61
f 9/60/61 19/58/59 21/61/62
f 9/60/61 21/61/62 8/55/56
f 8/55/56 21/61/62 18/56/57
f 5/62/63 1/63/64 16/64/65
f 16/64/65 1/63/64 3/65/66
f 16/64/65 3/65/66 21/66/67
f 21/66/67 3/65/66 4/67/68
f 21/66/67 4/67/68 18/68/69
f 18/68/69 4/67/68 5/62/63
f 18/68/69 5/62/63 16/64/65
f 16/69/70 21/70/71 20/71/72
# 21 vertices
# 71 texture params
# 72 normals
# 38 facets
# 1 groups
This diff is collapsed.
Click to expand it.
article/obj_grasp/objects.py
View file @
ac6b4b53
...
...
@@ -71,61 +71,35 @@ def get_obj_COMPLEX():
obj
=
BlockWrapper
(
ChronoBodyEnv
,
shape
=
shape_box
,
material
=
matich
,
pos
=
FrameTransform
([
0
,
1
,
0
],
[
1
,
0
,
0
,
0
]))
pos
=
FrameTransform
([
0
.3
,
1
,
0
.3
],
[
1
,
0
,
0
,
0
]))
return
obj
def
get_obj_easy_long_tilt_box
():
matich
=
DefaultChronoMaterial
()
matich
.
Friction
=
0.65
matich
.
DampingF
=
0.65
shape_box
=
envbody_shapes
.
Box
(
0.4
,
0.6
,
4
)
obj
=
BlockWrapper
(
ChronoBodyEnv
,
shape
=
shape_box
,
material
=
matich
,
pos
=
FrameTransform
([
0
,
1
,
0
],
rotation_x
(
15
)))
return
obj
def
get_obj_easy_cylinder
():
matich
=
DefaultChronoMaterial
()
matich
.
Friction
=
0.2
matich
.
DampingF
=
0.65
shape_box
=
envbody_shapes
.
Cylinder
(
0.
6
,
0.4
)
shape_box
=
envbody_shapes
.
Cylinder
(
0.
3
,
1
)
obj
=
BlockWrapper
(
ChronoBodyEnv
,
shape
=
shape_box
,
material
=
matich
,
mass
=
1
,
pos
=
FrameTransform
([
0
,
1
,
0
],
[
1
,
0
,
0
,
0
]
))
pos
=
FrameTransform
([
0
.25
,
1.25
,
-
0.5
],
rotation_x
(
15
)
))
return
obj
def
get_object_to_grasp_sphere
():
"""Medium task"""
def
get_obj_easy_long_tilt_box
():
matich
=
DefaultChronoMaterial
()
matich
.
Friction
=
0.
65
matich
.
Friction
=
0.
3
matich
.
DampingF
=
0.65
shape
=
envbody_shapes
.
Sphere
(
0.4
)
shape
_box
=
envbody_shapes
.
Box
(
0.4
,
0.6
,
1
)
obj
=
BlockWrapper
(
ChronoBodyEnv
,
shape
=
shape
,
shape
=
shape
_box
,
material
=
matich
,
pos
=
FrameTransform
([
0
,
0.9
,
0
],
[
0
,
0
,
0
,
1
]))
return
obj
def
get_obj_hard_mesh
():
# Create object to grasp
shape
=
envbody_shapes
.
FromMesh
(
"examples\obj_grasp\Ocpocmaqs_scaled.obj"
)
mat
=
DefaultChronoMaterial
()
mat
.
Friction
=
0.2
mat
.
DampingF
=
0.2
obj
=
BlockWrapper
(
ChronoBodyEnv
,
shape
=
shape
,
material
=
mat
,
pos
=
FrameTransform
([
0
,
1
,
0
],
[
0.854
,
0.354
,
0.354
,
0.146
]))
mass
=
3
,
pos
=
FrameTransform
([
0
,
1
,
0
],
rotation_x
(
15
)))
return
obj
def
get_obj_hard_ellipsoid
():
...
...
@@ -177,9 +151,9 @@ def get_obj_hard_long_ellipsoid():
def
get_obj_hard_long_tilt_ellipsoid
():
shape
=
envbody_shapes
.
Ellipsoid
()
shape
.
radius_x
=
0.
4
shape
.
radius_y
=
0.
4
shape
.
radius_z
=
2
shape
.
radius_x
=
0.
15
shape
.
radius_y
=
0.
15
shape
.
radius_z
=
0.15
mat
=
DefaultChronoMaterial
()
mat
.
Friction
=
0.30
...
...
@@ -287,4 +261,18 @@ def get_obj_hard_mesh_piramida():
material
=
mat
,
pos
=
FrameTransform
([
0
,
1
,
0
],
quat
))
return
obj
\ No newline at end of file
def
get_obj_hard_mesh_punk_piramida
():
# Create object to grasp
quat
=
Rotation
.
from_euler
(
'xyz'
,
[
90
,
0
,
0
],
degrees
=
True
).
as_quat
()
shape
=
envbody_shapes
.
FromMesh
(
"article\obj_grasp\PUNK_PIRAMIDA_M.obj"
)
mat
=
DefaultChronoMaterial
()
mat
.
Friction
=
0.2
mat
.
DampingF
=
0.1
obj
=
BlockWrapper
(
ChronoBodyEnv
,
shape
=
shape
,
mass
=
2
,
material
=
mat
,
pos
=
FrameTransform
([
0
,
1.5
,
0
],
quat
))
return
obj
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help