Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
ur_simple_control
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marko Guberina
ur_simple_control
Commits
492fff46
Commit
492fff46
authored
8 months ago
by
m-guberina
Browse files
Options
Downloads
Patches
Plain Diff
need to fix something broken in p path path following, but something is happening
parent
636437bd
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/examples/crocoddyl_ocp_clik.py
+2
-0
2 additions, 0 deletions
python/examples/crocoddyl_ocp_clik.py
python/examples/heron_pls.py
+50
-0
50 additions, 0 deletions
python/examples/heron_pls.py
with
52 additions
and
0 deletions
python/examples/crocoddyl_ocp_clik.py
+
2
−
0
View file @
492fff46
...
@@ -29,6 +29,8 @@ if __name__ == "__main__":
...
@@ -29,6 +29,8 @@ if __name__ == "__main__":
# both because there can be disturbances,
# both because there can be disturbances,
# and because it is sampled at a much lower frequency
# and because it is sampled at a much lower frequency
jointTrajFollowingPD
(
args
,
robot
,
reference
)
jointTrajFollowingPD
(
args
,
robot
,
reference
)
#reference.pop('dt')
#plotFromDict(reference, args.n_knots + 1, args)
print
(
"
final position:
"
)
print
(
"
final position:
"
)
print
(
robot
.
getT_w_e
())
print
(
robot
.
getT_w_e
())
...
...
This diff is collapsed.
Click to expand it.
python/examples/heron_pls.py
0 → 100644
+
50
−
0
View file @
492fff46
import
numpy
as
np
import
argparse
from
functools
import
partial
from
ur_simple_control.managers
import
getMinimalArgParser
,
ControlLoopManager
,
RobotManager
from
ur_simple_control.clik.clik
import
getClikArgs
,
getClikController
,
controlLoopClik
,
moveL
,
compliantMoveL
from
ur_simple_control.util.get_model
import
heron_approximation
import
time
from
pinocchio.visualize
import
MeshcatVisualizer
import
pinocchio
as
pin
def
get_args
():
parser
=
getMinimalArgParser
()
parser
.
description
=
'
mpc for heron path following
'
parser
=
get_OCP_args
(
parser
)
args
=
parser
.
parse_args
()
return
args
if
__name__
==
"
__main__
"
:
args
=
get_args
()
model
,
collision_model
,
visual_model
,
data
=
heron_approximation
(
args
)
print
(
model
)
viz
=
MeshcatVisualizer
(
model
,
collision_model
,
visual_model
)
viz
.
initViewer
(
open
=
True
)
viz
.
loadViewerModel
()
q
=
np
.
zeros
(
model
.
nq
)
theta
=
np
.
random
.
random
()
*
2
*
np
.
pi
q
[
2
]
=
np
.
cos
(
theta
)
q
[
3
]
=
np
.
sin
(
theta
)
v
=
np
.
random
.
random
(
model
.
nv
)
#q = np.random.random(model.nq) * 0.5
for
i
in
range
(
10000
):
q
=
pin
.
integrate
(
model
,
q
,
v
*
0.001
)
viz
.
display
(
q
)
# robot = RobotManager(args)
# Mgoal = robot.defineGoalPointCLI()
# compliantMoveL(args, robot, Mgoal)
# robot.closeGripper()
# robot.openGripper()
# if not args.pinocchio_only:
# robot.stopRobot()
#
# if args.visualize_manipulator:
# robot.killManipulatorVisualizer()
#
# if args.save_log:
# robot.log_manager.saveLog()
# #loop_manager.stopHandler(None, None)
#
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