-
Notifications
You must be signed in to change notification settings - Fork 35
Introduce Action and SceneState #390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
yck011522
wants to merge
29
commits into
main
Choose a base branch
from
introduce_actions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
67aef25
Initial intro of Action and State classes
yck011522 57c7881
doc string wip
yck011522 2e10350
Merge remote-tracking branch 'compas-dev/main' into introduce_actions
yck011522 87c8a10
Refactor SceneState, WorkpieceState, ToolState and
yck011522 b7157a1
Improved documentation of Planning Module
yck011522 1920e28
Fix formatting and typos in planning module
yck011522 9253e24
Added more details to Linear and Free Movement
yck011522 33711f6
CartesianMovement
yck011522 2b881b8
Naming change
yck011522 8e69346
Renaming
yck011522 d657568
lint
yck011522 20cd04d
tests
yck011522 ba607cb
lint
yck011522 aebb0a3
HideWorkpieces and ShowWorkpieces Actions
yck011522 0c3cd1c
Change Naming: CartesianMotion to LinearMotion
yck011522 2779bc9
Update LinearMotion class to include multiple
yck011522 8775f35
missing HideWorkpieces and ShowWorkpieces in action.all
yck011522 1e120e9
Add doc to Action Class about check preconditions and apply effects
yck011522 f0ceebe
update test
yck011522 97bbbb4
Apply suggestions (docstrings) from code review
yck011522 11dfe5c
Rename ManuallyMoveWorkpiece to ManualWorkpieceMotion
yck011522 77b61e3
Fixed Missing autosummary classes
yck011522 3aab57b
fix multiple import per line
yck011522 af5788d
Better Doc String for States,
yck011522 ecc8cea
Fix import WorkpieceState error in example oode
yck011522 8c83e2e
Try something else with the example code
yck011522 38e6de0
Update src/compas_fab/planning/action.py
yck011522 b5da572
Added Planning Group as attribute. Remove planned results.
yck011522 1ff8d20
docstring typo
yck011522 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
.. automodule:: compas_fab.planning |
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1,107 @@ | ||
""" | ||
******************************************************************************** | ||
compas_fab.planning | ||
******************************************************************************** | ||
|
||
.. currentmodule:: compas_fab.planning | ||
|
||
This package contains data classes for modeling robotic process and algorithms for planning robotic motions. | ||
The current implementation supports single-robot (:class:`compas_fab.robots.Robot`) | ||
processes with one or more workpieces (:class:`Workpiece`) and tools (:class:`compas_fab.robots.Tool`). | ||
The processes contains actions that are assumed to be sequentially executed by the robot | ||
or by the operator (manually). Concurrent actions are not supported. | ||
|
||
The FabricationProcess class and its subclasses (such as :class:`PickAndPlaceProcess` and | ||
:class:`ExtrusionProcess`) are used to model a process. They provide helper methods for | ||
creating a ordered list of actions that are used for planning and execution. The beining of the | ||
process is defined by the initial state of the scene, which is a container for the state of all | ||
objects in the scene (see :class:`SceneState`). The initial state is used to plan the first action | ||
in the process. The resulting state of the first action is used as the initial state for the next | ||
action, and so on. See tutorial on :ref:`planning_process` for more details. | ||
|
||
|
||
Actions | ||
-------- | ||
|
||
Action classes are abstractions of the robot's (and, or the operator's) capability to manipulate tools and | ||
workpieces in the scene. Action classes are used for modeling a process for the following purpose: | ||
|
||
* To plan trajectories for robotic motions | ||
* To simulate and visualize the process in a virtual environment | ||
* To execute the process on a real robot or a human-robot collaboration process | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
:nosignatures: | ||
|
||
Action | ||
RoboticAction | ||
LinearMotion | ||
FreeMotion | ||
OpenGripper | ||
CloseGripper | ||
ManualWorkpieceMotion | ||
HideWorkpieces | ||
ShowWorkpieces | ||
|
||
yck011522 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
States | ||
------ | ||
|
||
State classes are used to model the immutable, static state of objects in the planning scene. These include: | ||
:class:`RobotState` for :class:`compas_fab.robots.Robot`, | ||
:class:`ToolState` for :class:`compas_fab.robots.Tool` and | ||
:class:`WorkpieceState` for :class:`compas_fab.robots.Workpiece`. | ||
The :class:`SceneState` class is a container that holds the state of all objects in the scene. | ||
|
||
Typically a robotic process will have an initial (starting) state that is defined manually. | ||
If sequential planning is used, the initial state is used to plan the first action in the process. | ||
The resulting state of the first action is used as the initial state for the next action, and so on. | ||
If non-sequential planning is used, the starting state of actions are inferred from the list of | ||
actions in the process. See tutorial on :ref:`planning_process` for more details. | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
:nosignatures: | ||
|
||
SceneState | ||
WorkpieceState | ||
ToolState | ||
RobotState | ||
|
||
|
||
""" | ||
|
||
from .action import ( | ||
Action, | ||
RoboticAction, | ||
LinearMotion, | ||
FreeMotion, | ||
OpenGripper, | ||
CloseGripper, | ||
ManualWorkpieceMotion, | ||
HideWorkpieces, | ||
ShowWorkpieces, | ||
) | ||
|
||
from .state import ( | ||
SceneState, | ||
WorkpieceState, | ||
ToolState, | ||
RobotState, | ||
) | ||
|
||
__all__ = [ | ||
"Action", | ||
"RoboticAction", | ||
"LinearMotion", | ||
"FreeMotion", | ||
"OpenGripper", | ||
"CloseGripper", | ||
"ManualWorkpieceMotion", | ||
"HideWorkpieces", | ||
"ShowWorkpieces", | ||
"SceneState", | ||
"WorkpieceState", | ||
"ToolState", | ||
"RobotState", | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.