Skip to content

Commit 96420e2

Browse files
authored
Merge pull request #797 from compas-dev/joint_config
Upstream Configuration
2 parents 07b52e0 + 7fbbe90 commit 96420e2

File tree

6 files changed

+883
-18
lines changed

6 files changed

+883
-18
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
### Added
1212

1313
* Added a `invert` and `inverted` method `compas.geometry.Vector`.
14-
* Added unetary `__neg__` operator for `compas.geometry.Vector`
14+
* Added unetary `__neg__` operator for `compas.geometry.Vector`.
15+
* Added `compas.robots.Configuration`, moved from `compas_fab`.
1516

1617
### Changed
1718

src/compas/robots/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Model
1010
=====
1111
12-
.. inheritance-diagram:: RobotModel Joint Link ToolModel
12+
.. inheritance-diagram:: RobotModel Joint Link ToolModel Configuration
1313
:parts: 1
1414
1515
The root of the model is the :class:`RobotModel` class, which
@@ -24,6 +24,7 @@
2424
Joint
2525
Link
2626
ToolModel
27+
Configuration
2728
2829
2930
Geometric description
@@ -115,6 +116,9 @@
115116
"""
116117
from __future__ import absolute_import
117118

119+
from .configuration import (
120+
Configuration
121+
)
118122
from .model import (
119123
Axis,
120124
Box,
@@ -186,5 +190,7 @@
186190
'AbstractMeshLoader',
187191
'DefaultMeshLoader',
188192
'LocalPackageMeshLoader',
189-
'GithubPackageMeshLoader'
193+
'GithubPackageMeshLoader',
194+
195+
'Configuration'
190196
]

src/compas/robots/base_artist/_artist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def update(self, joint_state, visual=True, collision=True):
230230
231231
Parameters
232232
----------
233-
joint_state : :obj:`dict`
233+
joint_state : :obj:`dict` or :class:`compas.robots.Configuration`
234234
A dictionary with joint names as keys and joint positions as values.
235235
visual : bool, optional
236236
``True`` if the visual geometry should be also updated, otherwise ``False``.
@@ -264,7 +264,7 @@ def update_tool(self, joint_state=None, visual=True, collision=True, transformat
264264
265265
Parameters
266266
----------
267-
joint_state : :obj:`dict`, optional
267+
joint_state : :obj:`dict`or :class:`compas.robots.Configuration`, optional
268268
A dictionary with joint names as keys and joint positions as values.
269269
Defaults to an empty dictionary.
270270
transformation : :class:`compas.geometry.Transformation`, optional

0 commit comments

Comments
 (0)