Skip to content

Commit

Permalink
improve group and full configuration docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yck011522 committed Jun 21, 2024
1 parent 58acdf9 commit 6fb586a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/compas_fab/robots/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,11 +631,16 @@ def get_attached_tool_collision_meshes(self):

def zero_configuration(self, group=None):
# type: (Optional[str]) -> Configuration
"""Get the zero joint configuration.
"""Get the zero joint configuration of the specified planning group.
If zero is out of joint limits ``(upper, lower)`` then
``(upper + lower) / 2`` is used as joint value.
Parameters
----------
group : :obj:`str`, optional
The name of the planning group. Defaults to the main planning group.
Examples
--------
>>> robot = RobotLibrary.ur5()
Expand All @@ -657,7 +662,7 @@ def zero_configuration(self, group=None):

def random_configuration(self, group=None):
# type: (Optional[str]) -> Configuration
"""Get a random configuration.
"""Get a random configuration for the specified planning group.
Parameters
----------
Expand Down Expand Up @@ -685,19 +690,20 @@ def random_configuration(self, group=None):

def get_group_configuration(self, group, full_configuration):
# type: (str, Configuration) -> Configuration
"""Get the group's configuration.
"""Filter a full configuration and return only the joints of the specified group.
Parameters
----------
group : :obj:`str`
The name of the planning group.
full_configuration : :class:`compas_robots.Configuration`
The configuration for all configurable joints of the robot.
A full configuration (with all configurable joints of the robot).
Note that this object is not modified.
Returns
-------
:class:`compas_robots.Configuration`
The configuration of the group.
The configuration with only the joints of the specified group.
"""
full_configuration = self._check_full_configuration_and_scale(full_configuration)[
0
Expand Down

0 comments on commit 6fb586a

Please sign in to comment.