Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Q
quadruped-reactive-walking
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gepetto
quadruped-reactive-walking
Commits
2123bd5a
Commit
2123bd5a
authored
2 years ago
by
Ale
Browse files
Options
Downloads
Patches
Plain Diff
add file saving management
parent
7efab56a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/quadruped_reactive_walking/main_solo12_control.py
+11
-6
11 additions, 6 deletions
python/quadruped_reactive_walking/main_solo12_control.py
with
11 additions
and
6 deletions
python/quadruped_reactive_walking/main_solo12_control.py
+
11
−
6
View file @
2123bd5a
...
@@ -2,6 +2,7 @@ import threading
...
@@ -2,6 +2,7 @@ import threading
import
time
import
time
from
pathlib
import
Path
from
pathlib
import
Path
import
numpy
as
np
import
numpy
as
np
import
git
import
quadruped_reactive_walking
as
qrw
import
quadruped_reactive_walking
as
qrw
from
.Controller
import
Controller
from
.Controller
import
Controller
...
@@ -15,6 +16,9 @@ pd = ProblemDataFull(params)
...
@@ -15,6 +16,9 @@ pd = ProblemDataFull(params)
target
=
Target
(
pd
)
target
=
Target
(
pd
)
target
.
update
(
0
)
target
.
update
(
0
)
repo
=
git
.
Repo
(
search_parent_directories
=
True
)
sha
=
repo
.
head
.
object
.
hexsha
if
params
.
SIMULATION
:
if
params
.
SIMULATION
:
from
.tools.PyBulletSimulator
import
PyBulletSimulator
from
.tools.PyBulletSimulator
import
PyBulletSimulator
else
:
else
:
...
@@ -222,13 +226,14 @@ def control_loop():
...
@@ -222,13 +226,14 @@ def control_loop():
if
device
.
is_timeout
:
if
device
.
is_timeout
:
print
(
"
Masterboard timeout detected.
"
)
print
(
"
Masterboard timeout detected.
"
)
#if params.LOGGING:
if
params
.
LOGGING
:
# log_path = Path("/tmp") / "logs"
log_path
=
Path
(
"
/home/aassirelli/devel/experimental_stuff/experiments/solo-reduced-model
"
)
/
sha
/
"
log
"
# log_path.mkdir(parents=True)
try
:
# loggerControl.save(str(log_path / "data"))
log_path
.
mkdir
(
parents
=
True
)
except
:
print
(
"
The directory already exists, delete it before running
"
)
if
params
.
PLOTTING
:
loggerControl
.
save
(
str
(
log_path
/
"
data
"
))
loggerControl
.
plot
()
if
params
.
SIMULATION
and
params
.
enable_pyb_GUI
:
if
params
.
SIMULATION
and
params
.
enable_pyb_GUI
:
device
.
Stop
()
device
.
Stop
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment