Skip to content

Commit

Permalink
refactor: Use TOL.is_close for checking if scaling is needed in Robot…
Browse files Browse the repository at this point in the history
… class (#436)

* refactor: Use TOL.is_close for checking if scaling is needed in Robot class

* not
  • Loading branch information
yck011522 authored Jun 14, 2024
1 parent 9195ee5 commit d6d080a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compas_fab/robots/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from compas.data import Data
from compas.geometry import Frame
from compas.geometry import Transformation
from compas.tolerance import TOL
from compas_robots import Configuration
from compas_robots import RobotModel
from compas_robots.model import Joint
Expand Down Expand Up @@ -1389,7 +1390,7 @@ def plan_cartesian_motion(self, waypoints, start_configuration=None, group=None,
# =======
# Scaling
# =======
need_scaling = self.scale_factor != 1.0
need_scaling = not TOL.is_close(self.scale_factor, 1.0, rtol=1e-8)

if need_scaling:
waypoints = waypoints.scaled(1.0 / self.scale_factor)
Expand Down

0 comments on commit d6d080a

Please sign in to comment.