-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More WIP migrating robot to robot_cell
- Loading branch information
Showing
31 changed files
with
212 additions
and
192 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
docs/examples/02_description_models/files/02_robot_from_library.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 11 additions & 7 deletions
18
docs/examples/06_backends_kinematics/files/03_iter_ik_pybullet.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
from compas.geometry import Frame | ||
from compas_fab.backends import AnalyticalInverseKinematics | ||
from compas_fab.backends import AnalyticalPyBulletPlanner | ||
from compas_fab.backends import UR5Kinematics | ||
from compas_fab.backends import PyBulletClient | ||
from compas_fab.robots import RobotCellLibrary | ||
from compas_fab.robots import FrameTarget | ||
from compas_fab.robots import TargetMode | ||
|
||
frame_WCF = Frame((0.381, 0.093, 0.382), (0.371, -0.292, -0.882), (0.113, 0.956, -0.269)) | ||
|
||
|
||
with PyBulletClient(connection_type="direct") as client: | ||
robot = client.load_ur5(load_geometry=True) | ||
robot_cell, robot_cell_state = RobotCellLibrary.ur5() | ||
|
||
ik = AnalyticalInverseKinematics(client) | ||
# set a new IK function | ||
client.inverse_kinematics = ik.inverse_kinematics | ||
kinematics = UR5Kinematics() | ||
planner = AnalyticalPyBulletPlanner(client, kinematics) | ||
|
||
options = {"solver": "ur5", "check_collision": True, "keep_order": True} | ||
options = {"check_collision": True, "keep_order": True} | ||
|
||
for config in robot.iter_inverse_kinematics(frame_WCF, options=options): | ||
target = FrameTarget(frame_WCF, TargetMode.ROBOT) | ||
for config in planner.iter_inverse_kinematics(target, robot_cell_state, options=options): | ||
print(config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.