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
bc90403c
Commit
bc90403c
authored
3 years ago
by
Pierre-Alexandre Leziart
Browse files
Options
Downloads
Patches
Plain Diff
Remove -i argument to launch the script, read the yaml data instead for the name of the interface
parent
8d09e59c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/main_solo12_control.py
+5
-7
5 additions, 7 deletions
scripts/main_solo12_control.py
with
5 additions
and
7 deletions
scripts/main_solo12_control.py
+
5
−
7
View file @
bc90403c
...
@@ -83,17 +83,19 @@ def clone_movements(name_interface_clone, q_init, cloneP, cloneD, cloneQdes, clo
...
@@ -83,17 +83,19 @@ def clone_movements(name_interface_clone, q_init, cloneP, cloneD, cloneQdes, clo
return
0
return
0
def
control_loop
(
name_interface
,
name_interface_clone
=
None
,
des_vel_analysis
=
None
):
def
control_loop
(
name_interface_clone
=
None
,
des_vel_analysis
=
None
):
"""
Main function that calibrates the robot, get it into a default waiting position then launch
"""
Main function that calibrates the robot, get it into a default waiting position then launch
the main control loop once the user has pressed the Enter key
the main control loop once the user has pressed the Enter key
Args:
Args:
name_interface (string): name of the interface that is used to communicate with the robot
name_interface_clone (string): name of the interface that will mimic the movements of the first
name_interface_clone (string): name of the interface that will mimic the movements of the first
"""
"""
# Check .yaml file for parameters of the controller
# Check .yaml file for parameters of the controller
# Name of the interface that is used to communicate with the robot
name_interface
=
params
.
interface
# Enable or disable PyBullet GUI
# Enable or disable PyBullet GUI
if
not
params
.
SIMULATION
:
if
not
params
.
SIMULATION
:
params
.
enable_pyb_GUI
=
False
params
.
enable_pyb_GUI
=
False
...
@@ -350,17 +352,13 @@ def main():
...
@@ -350,17 +352,13 @@ def main():
"""
"""
parser
=
argparse
.
ArgumentParser
(
description
=
'
Playback trajectory to show the extent of solo12 workspace.
'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'
Playback trajectory to show the extent of solo12 workspace.
'
)
parser
.
add_argument
(
'
-i
'
,
'
--interface
'
,
required
=
True
,
help
=
'
Name of the interface (use ifconfig in a terminal), for instance
"
enp1s0
"'
)
parser
.
add_argument
(
'
-c
'
,
parser
.
add_argument
(
'
-c
'
,
'
--clone
'
,
'
--clone
'
,
required
=
False
,
required
=
False
,
help
=
'
Name of the clone interface that will reproduce the movement of the first one
\
help
=
'
Name of the clone interface that will reproduce the movement of the first one
\
(use ifconfig in a terminal), for instance
"
enp1s0
"'
)
(use ifconfig in a terminal), for instance
"
enp1s0
"'
)
f
,
v
=
control_loop
(
parser
.
parse_args
().
interface
,
parser
.
parse_args
().
clone
)
# , np.array([1.5, 0.0, 0.0, 0.0, 0.0, 0.0]))
f
,
v
=
control_loop
(
parser
.
parse_args
().
clone
)
# , np.array([1.5, 0.0, 0.0, 0.0, 0.0, 0.0]))
print
(
f
,
v
)
print
(
f
,
v
)
quit
()
quit
()
...
...
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