FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
duobench/scripts/example.py at master · RobotControlStack/duobench · GitHub
RobotControlStack
/
duobench
Public
Notifications
You must be signed in to change notification settings
Fork
1
Star
19
Code
Issues
2
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
duobench
/
scripts
/
example.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (30 loc) · 1.17 KB
Breadcrumbs
duobench
/
scripts
/
example.py
Copy path
File metadata and controls
33 lines (30 loc) · 1.17 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import
time
from
duobench
.
tasks
.
example
import
MyTaskEnvConfig
if
__name__
==
"__main__"
:
scene
=
MyTaskEnvConfig
()
env
=
scene
.
create_env
(
scene
.
config
())
obs
,
info
=
env
.
reset
()
time
.
sleep
(
5.0
)
print
(
obs
)
# Duo
for
_
in
range
(
100
):
for
_
in
range
(
10
):
# move 1cm in x direction (forward) and close gripper
act
=
{
"left"
: {
"tquat"
: [
0.01
,
0
,
0
,
0
,
0
,
0
,
1
],
"gripper"
: [
0
]},
"right"
: {
"tquat"
: [
0.01
,
0
,
0
,
0
,
0
,
0
,
1
],
"gripper"
: [
0
]},
}
obs
,
reward
,
terminated
,
truncated
,
info
=
env
.
step
(
act
)
# print(obs)
print
(
reward
,
terminated
,
truncated
,
info
)
time
.
sleep
(
1.0
)
for
_
in
range
(
10
):
# move 1cm in negative x direction (backward) and open gripper
act
=
{
"left"
: {
"tquat"
: [
-
0.01
,
0
,
0
,
0
,
0
,
0
,
1
],
"gripper"
: [
1
]},
"right"
: {
"tquat"
: [
-
0.01
,
0
,
0
,
0
,
0
,
0
,
1
],
"gripper"
: [
1
]},
}
obs
,
reward
,
terminated
,
truncated
,
info
=
env
.
step
(
act
)
# print(obs)
print
(
reward
,
terminated
,
truncated
,
info
)
time
.
sleep
(
1.0
)
Back
|
FazBrowse Home
|
New Git URL