Skip to content

Commit 9f68dd5

Browse files
committed
fix docs
1 parent 01b7817 commit 9f68dd5

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

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

src/compas/robots/model/robot.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ def compute_transformations(self, joint_state, link=None, parent_transformation=
766766
767767
Parameters
768768
----------
769-
joint_state : dict
769+
joint_state : dict or :class:`compas.robots.Configuration`
770770
A dictionary with the joint names as keys and values in radians and
771771
meters (depending on the joint type).
772772
link : :class:`compas.robots.Link`
@@ -781,10 +781,8 @@ def compute_transformations(self, joint_state, link=None, parent_transformation=
781781
782782
Examples
783783
--------
784-
>>> names = robot.get_configurable_joint_names()
785-
>>> values = [-2.238, -1.153, -2.174, 0.185, 0.667, 0.000]
786-
>>> joint_state = dict(zip(names, values))
787-
>>> transformations = robot.compute_transformations(joint_state)
784+
>>> config = robot.random_configuration()
785+
>>> transformations = robot.compute_transformations(config)
788786
"""
789787
if link is None:
790788
link = self.root
@@ -814,7 +812,7 @@ def transformed_frames(self, joint_state):
814812
815813
Parameters
816814
----------
817-
joint_state : dict
815+
joint_state : dict or :class:`compas.robots.Configuration`
818816
A dictionary with the joint names as keys and values in radians and
819817
meters (depending on the joint type).
820818
@@ -839,7 +837,7 @@ def transformed_axes(self, joint_state):
839837
840838
Parameters
841839
----------
842-
joint_state : dict
840+
joint_state : dict or :class:`compas.robots.Configuration`
843841
A dictionary with the joint names as keys and values in radians and
844842
meters (depending on the joint type).
845843
@@ -863,7 +861,7 @@ def forward_kinematics(self, joint_state, link_name=None):
863861
864862
Parameters
865863
----------
866-
joint_state : dict
864+
joint_state : dict or :class:`compas.robots.Configuration`
867865
A dictionary with the joint names as keys and values in radians and
868866
meters (depending on the joint type).
869867
link_name : str, optional
@@ -877,10 +875,8 @@ def forward_kinematics(self, joint_state, link_name=None):
877875
878876
Examples
879877
--------
880-
>>> names = robot.get_configurable_joint_names()
881-
>>> values = [-2.238, -1.153, -2.174, 0.185, 0.667, 0.000]
882-
>>> joint_state = dict(zip(names, values))
883-
>>> frame_WCF = robot.forward_kinematics(joint_state)
878+
>>> config = robot.random_configuration()
879+
>>> frame_WCF = robot.forward_kinematics(config)
884880
"""
885881
if link_name is None:
886882
ee_link = self.get_end_effector_link()

0 commit comments

Comments
 (0)