Skip to content

Commit e4bfe76

Browse files
authored
Merge pull request #174 from tetov/compas_v_bump_scaling
Use new Scale transformation constructor (introduced in compas 0.16)
2 parents 19c0e22 + e966d21 commit e4bfe76

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ Unreleased
4343
* ``MoveItPlanner``: ``inverse_kinematics`` takes now instance of ``Configuration`` and ``robot``
4444
* Property :class:`compas_fab.robots.Robot.artist` does not try to scale robot
4545
geometry if links and/or joints are not defined.
46-
* In :class:``compas_fab.robots.constraints.JointConstraint``, added ``tolerance_above`` and
46+
* In :class:`compas_fab.robots.constraints.JointConstraint`, added ``tolerance_above`` and
4747
``tolerance_below`` for allowing asymmetrical constraints.
48-
* In :class:``compas_fab.robots.Robot``, changed the ``constraints_from_configuration``
48+
* In :class:`compas_fab.robots.Robot`, changed the ``constraints_from_configuration``
4949
function with ``tolerances_above`` and ``tolerances_below``.
5050
* :meth:`compas_fab.robots.CollisionMesh.scale` now takes a scale factor
5151
instead of a :class:`compas.geometry.Scale` instance as an argument.
@@ -82,7 +82,7 @@ Unreleased
8282
* Added ``attach_tool``, ``detach_tool``, ``draw_attached_tool``, ``from_tool0_to_attached_tool`` and ``from_attached_tool_to_tool0`` to ``Robot``
8383
* Added ``attach_tool`` and ``detach_tool`` to ``Artist``
8484
* Added ``add_attached_tool`` and ``remove_attached_tool`` to ``PlanningScene``
85-
* Added redraw/clear layer support to `RobotArtist` for Rhino
85+
* Added redraw/clear layer support to :class:`~compas_fab.rhino.RobotArtist` for Rhino
8686
* Added material/color support for DAE files on ROS file loader
8787

8888
**Changed**
@@ -92,7 +92,7 @@ Unreleased
9292
**Fixed**
9393

9494
* Fixed mutable init parameters of ``Configuration``, ``JointTrajectoryPoint``, ``JointTrajectory`` and ``Robot.basic``.
95-
* Fixed interface of `RobotArtist` for Blender
95+
* Fixed interface of :class:`~compas_fab.blender.RobotArtist` for Blender
9696
* Fixed DAE parsing of meshes with multiple triangle sets
9797

9898
0.9.0
@@ -220,7 +220,7 @@ Unreleased
220220

221221
**Deprecated**
222222

223-
* The aliases for ``Frame`` and ``Transformation`` will be removed, in the future, import directly from `compas` core.
223+
* The aliases for ``Frame`` and ``Transformation`` will be removed, in the future, import directly from ``compas`` core.
224224

225225
0.4.0
226226
----------

docs/examples/01_fundamentals/01_frame_and_transformation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ coordinate system.
3333
# point in F (local coordinates)
3434
P = Point(35., 35., 35.)
3535
# point in global (world) coordinates
36-
P_ = F.to_world_coords(P)
36+
P_ = F.to_world_coordinates(P)
3737
3838
3939
Industrial robots do not have a common way of describing the pose orientation.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
requirements = [
1313
# Until COMPAS reaches 1.0, we pin major.minor and allow patch version updates
14-
'compas>=0.15.6,<0.16',
14+
'compas>=0.16.1,<0.17',
1515
'roslibpy>=0.7.1',
1616
'pyserial',
1717
]

src/compas_fab/artists/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def scale(self, factor):
171171
self.robot.scale(factor) # scale the model
172172

173173
relative_factor = factor / self.scale_factor # relative scaling factor
174-
transformation = Scale([relative_factor] * 3)
174+
transformation = Scale.from_factors([relative_factor] * 3)
175175
self.scale_link(self.robot.root, transformation)
176176
self.scale_factor = factor
177177

src/compas_fab/robots/constraints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def from_mesh(cls, mesh):
9191
return cls(cls.MESH, mesh)
9292

9393
def scale(self, scale_factor):
94-
S = Scale([scale_factor] * 3)
94+
S = Scale.from_factors([scale_factor] * 3)
9595
self.transform(S)
9696

9797
def transform(self, transformation):

src/compas_fab/robots/planning_scene.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def scale(self, scale_factor):
5050
scale_factor : :obj:`float`
5151
Scale factor.
5252
"""
53-
S = Scale([scale_factor] * 3)
53+
S = Scale.from_factors([scale_factor] * 3)
5454
self.mesh.transform(S)
5555

5656

src/compas_fab/robots/robot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ def transformation_RCF_WCF(self, group=None):
568568
569569
"""
570570
base_frame = self.get_base_frame(group)
571-
return Transformation.change_basis(base_frame, Frame.worldXY())
571+
return Transformation.from_change_of_basis(base_frame, Frame.worldXY())
572572

573573
def transformation_WCF_RCF(self, group=None):
574574
"""Returns the transformation from the world coordinate system (WCF) to the robot's coordinate system (RCF).
@@ -584,7 +584,7 @@ def transformation_WCF_RCF(self, group=None):
584584
585585
"""
586586
base_frame = self.get_base_frame(group)
587-
return Transformation.change_basis(Frame.worldXY(), base_frame)
587+
return Transformation.from_change_of_basis(Frame.worldXY(), base_frame)
588588

589589
def set_RCF(self, robot_coordinate_frame, group=None):
590590
"""Moves the origin frame of the robot to the robot_coordinate_frame.

src/compas_fab/robots/wrench.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def gravity_compensated(self, ft_sensor_frame, mass, center_of_mass):
376376
Available at: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.552.109.
377377
"""
378378
# transform gravity vector to FT Sensor coordinate system (FTSCS)
379-
gravity_vector_FTSCS = ft_sensor_frame.to_local_coords(gravity_vector)
379+
gravity_vector_FTSCS = ft_sensor_frame.to_local_coordinates(gravity_vector)
380380

381381
# F gravity compensation, F = gravity * mass
382382
force_gravity = gravity_vector_FTSCS * mass

0 commit comments

Comments
 (0)