Skip to content

Commit 34f6156

Browse files
committed
Corrected class docstring attributes/params
1 parent b133187 commit 34f6156

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

src/compas_fab/robots/trajectory.py

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,23 @@ class JointTrajectoryPoint(Configuration):
2222
Trajectory points are defined either as *values + velocities and
2323
accelerations*, or as *values + efforts*.
2424
25+
Parameters
26+
----------
27+
values : :obj:`list` of :obj:`float`, optional
28+
Joint values expressed in radians or meters, depending on the respective
29+
type.
30+
types : :obj:`list` of :attr:`compas.robots.Joint.TYPE`, optional
31+
Joint types, e.g. a :obj:`list` of
32+
:attr:`compas.robots.Joint.REVOLUTE` for revolute joints.
33+
velocities : :obj:`list` of :obj:`float`, optional
34+
Velocity of each joint.
35+
accelerations : :obj:`list` of :obj:`float`, optional
36+
Acceleration of each joint.
37+
effort : :obj:`list` of :obj:`float`, optional
38+
Effort of each joint.
39+
time_from_start : :class:`Duration`, optional
40+
Duration of trajectory point counting from the start.
41+
2542
Parameters
2643
----------
2744
values : :obj:`list` of :obj:`float`
@@ -38,6 +55,13 @@ class JointTrajectoryPoint(Configuration):
3855
Effort of each joint.
3956
time_from_start : :class:`Duration`
4057
Duration of trajectory point counting from the start.
58+
positions : :obj:`list` of :obj:`float`
59+
Alias of `values`.
60+
data : obj:`dict`
61+
The data representing the trajectory point. By assigning a data
62+
dictionary to this property, the current data of the configuration will
63+
be replaced by the data in the :obj:`dict`. The data getter and setter
64+
should always be used in combination with each other.
4165
"""
4266

4367
def __init__(self, values=None, types=None, velocities=None, accelerations=None, effort=None, time_from_start=None):
@@ -132,6 +156,11 @@ def data(self, data):
132156
class Trajectory(object):
133157
"""Base trajectory class.
134158
159+
Parameters
160+
----------
161+
planning_time : :obj:`float`
162+
Amount of time it took to complete the motion plan
163+
135164
Attributes
136165
----------
137166
planning_time : :obj:`float`
@@ -154,8 +183,22 @@ class JointTrajectory(Trajectory):
154183
start_configuration : :class:`Configuration`
155184
Start configuration for the trajectory.
156185
fraction : :obj:`float`
157-
Indicates the percentage of requested trajectory that was calcuted,
186+
Indicates the percentage of requested trajectory that was calculated,
187+
e.g. ``1`` means the full trajectory was found.
188+
189+
Attributes
190+
----------
191+
points : :obj:`list` of :class:`JointTrajectoryPoint`
192+
List of points composing the trajectory.
193+
joint_names : :obj:`list` of :obj:`str`
194+
List of joint names of the trajectory.
195+
start_configuration : :class:`Configuration`
196+
Start configuration for the trajectory.
197+
fraction : :obj:`float`
198+
Indicates the percentage of requested trajectory that was calculated,
158199
e.g. ``1`` means the full trajectory was found.
200+
data : :obj:`dict`
201+
The data representing the trajectory.
159202
"""
160203

161204
def __init__(self, trajectory_points=None, joint_names=None, start_configuration=None, fraction=None):

0 commit comments

Comments
 (0)