Skip to content

Commit 3f9c11c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 2654830 commit 3f9c11c

File tree

4 files changed

+23
-15
lines changed

4 files changed

+23
-15
lines changed

script/grasp_ball.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Transformation,
99
)
1010
from pyhpp.core import ConfigurationShooter, Discretized # noqa: F401
11-
from pyhpp.gepetto import Viewer #noqa
11+
from pyhpp.gepetto import Viewer # noqa
1212
from pyhpp.manipulation import (
1313
Device,
1414
Graph,
@@ -94,7 +94,9 @@
9494
False,
9595
]
9696
ballOnGround = SE3(Quaternion(0, 0, 0, 1), np.array([0, 0, 0.025]))
97-
function = Transformation("placement_constraint", robot, pokeball, I_SE3, ballOnGround, mask)
97+
function = Transformation(
98+
"placement_constraint", robot, pokeball, I_SE3, ballOnGround, mask
99+
)
98100
cts = ComparisonTypes()
99101
cts[:] = 3 * (ComparisonType.EqualToZero,)
100102
placement_constraint = Implicit(function, cts, [True, True, True])
@@ -117,8 +119,12 @@
117119

118120
# Grasp
119121
ballInGripper = SE3(Quaternion(0.5, 0.5, -0.5, 0.5), np.array([0, 0.137, 0]))
120-
mask = 6 * [True,]
121-
function = RelativeTransformation("grasp", robot, gripper, pokeball, ballInGripper, I_SE3, mask)
122+
mask = 6 * [
123+
True,
124+
]
125+
function = RelativeTransformation(
126+
"grasp", robot, gripper, pokeball, ballInGripper, I_SE3, mask
127+
)
122128
cts = ComparisonTypes()
123129
cts[:] = 6 * (ComparisonType.EqualToZero,)
124130
grasp_constraint = Implicit(function, cts, mask)
@@ -135,7 +141,9 @@
135141
)
136142

137143
problem.pathValidation(Discretized(robot, 0.01))
138-
problem.pathProjector(ProgressiveProjector(problem.distance(), problem.steeringMethod(), 0.1))
144+
problem.pathProjector(
145+
ProgressiveProjector(problem.distance(), problem.steeringMethod(), 0.1)
146+
)
139147
graph.initialize()
140148

141149
q1 = np.array([0, -1.57, 1.57, 0, 0, 0, 0.3, 0, 0.025, 0, 0, 0, 1])

script/grasp_ball_in_box.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import numpy as np
22
from pinocchio import SE3, Quaternion
33
from pyhpp.constraints import (
4-
ComparisonType,#noqa
5-
ComparisonTypes,#noqa
6-
Implicit,#noqa
7-
RelativeTransformation,#noqa
8-
Transformation,#noqa
4+
ComparisonType, # noqa
5+
ComparisonTypes, # noqa
6+
Implicit, # noqa
7+
RelativeTransformation, # noqa
8+
Transformation, # noqa
99
)
1010
from pyhpp.core import ConfigurationShooter, Discretized # noqa: F401
11-
from pyhpp.gepetto import Viewer #noqa
11+
from pyhpp.gepetto import Viewer # noqa
1212
from pyhpp.manipulation import (
1313
Device,
1414
Graph,
@@ -82,7 +82,9 @@
8282

8383

8484
problem.pathValidation(Discretized(robot, 0.01))
85-
problem.pathProjector(ProgressiveProjector(problem.distance(), problem.steeringMethod(), 0.1))
85+
problem.pathProjector(
86+
ProgressiveProjector(problem.distance(), problem.steeringMethod(), 0.1)
87+
)
8688
graph.initialize()
8789

8890
q1 = np.array([0, -1.57, 1.57, 0, 0, 0, 0.3, 0, 0.025, 0, 0, 0, 1])

script/motion_planner.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,3 @@ def solveBiRRT(self, maxIter=float("inf")):
2828
return path
2929
else:
3030
print(f"Maximum iterations ({maxIter}) reached without finding solution")
31-
32-

script/rrt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from motion_planner import MotionPlanner
33
from pinocchio import SE3
44
from pyhpp.core import Problem, Roadmap, WeighedDistance
5-
from pyhpp.gepetto import Viewer #noqa
5+
from pyhpp.gepetto import Viewer # noqa
66
from pyhpp.pinocchio import Device, urdf
77

88
# Robot configuration

0 commit comments

Comments
 (0)