Skip to content

Commit 0f3efed

Browse files
authored
Merge branch 'development' into feature/better_calc
2 parents 7972d44 + d7063b2 commit 0f3efed

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

evasdk/eva_http_client.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,21 @@ def __ensure_pyt3d(self):
471471
if not has_pyt3d:
472472
raise ImportError('''this feature is provided by `pytransform3d`, which we do not ship by default anymore due to its dependencies
473473
474+
If you require this feature, just install it yourself (e.g. `pip3 install pytransform3d`, add it to your `Pipfile`, etc)
475+
''')
476+
477+
def __normalize(self, vec):
478+
if has_pyt3d:
479+
return [round(num, self.__N_DIGITS) for num in pyrot.check_quaternion(vec)]
480+
norm = sum(vec)
481+
if norm == 0:
482+
norm = 1
483+
return [round(n / norm, self.__N_DIGITS) for n in vec]
484+
485+
def __ensure_pyt3d(self):
486+
if not has_pyt3d:
487+
raise ImportError('''this feature is provided by `pytransform3d`, which we do not ship by default anymore due to its dependencies
488+
474489
If you require this feature, just install it yourself (e.g. `pip3 install pytransform3d`, add it to your `Pipfile`, etc)
475490
''')
476491

0 commit comments

Comments
 (0)