Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quaternion class object name conflict with quaternion objects from various MATLAB toolboxes #2138

Closed
ZhangxiJesseFeng opened this issue May 18, 2024 · 4 comments

Comments

@ZhangxiJesseFeng
Copy link

ZhangxiJesseFeng commented May 18, 2024

MTEX could initialize normally if I have MTEX added to path and initialized at launch, then install the toolboxes with quaternions, but I cannot use the quaternion functions from the toolboxes, as MTEX has priority. If I uninstall MTEX, then I can use the quaternion functions, but when I try to reinstall MTEX, I get the errors below. Not a huge priority issue, but might be nice to address the name conflict in the future.

Error Message
If you get an error message copy and paste it below

********************************************************************************
  MTEX: Couldn't get the mex files working!
   
  The original error message was:
 
Error using check_installation>fast_check_mex
Invalid default value for property 'rot' in class 'symmetry':
Class 'quaternion' is Sealed and may not be used as a superclass.

Error in check_installation (line 20)
    fast_check_mex

Error in startup_mtex (line 69)
check_installation;

Error in install_mtex (line 13)
  startup_mtex('noMenu')
 
 Please have a look at https://mtex-toolbox.github.io/installation
 or ask in the forum https://github.com/mtex-toolbox/mtex/discussions for help.

********************************************************************************

--------------------------------------------------------------------------------
 

********************************************************************************
 
  MTEX: Error running NFFT with openMP - I'm going to try it without openmp!
 
  MTEX: Error running NFFT without openMP!
   
 I did not get NFFT working. This restricts the functionality of MTEX.
 To overcome this restriction you may need to compile the NFFT your own.
 Please have a look at https://github.com/mtex-toolbox/mtex/blob/develop/extern/nfft_openMP/readme.md
 or ask in the forum https://github.com/mtex-toolbox/mtex/discussions for help.
 
  The original error message was:
 
Error using check_installation>check_NSOFT
Invalid default value for property 'rot' in class 'symmetry':
Class 'quaternion' is Sealed and may not be used as a superclass.

Error in check_installation (line 54)
  check_NSOFT

Error in startup_mtex (line 69)
check_installation;

Error in install_mtex (line 13)
  startup_mtex('noMenu')

What MTEX version do you use?
5.10.2

@ralfHielscher
Copy link
Member

Hi Zhang,

  1. What toolbox are you using that has its own quaternion implementation?
  2. We could put all MTEX functions into a MTEX namespace. However, this would requite, that throughout all code one has to write mtex.Miller() or mtex.EBSD.load(). The problem is that Matlab does not support specifying a namespace for a block of code.

Ralf

@ZhangxiJesseFeng
Copy link
Author

ZhangxiJesseFeng commented May 18, 2024

There are quite a few: sensor fusion, navigation, radar, etc. The issue is if I create a quaternion object via MTEX, it does not initialize a quaternion object in those toolboxes and I cannot use the quaternion functions from them. I don't know how they resolve conflicts among themselves, maybe their functions are consistent.

Yeah I see the difficulty in it. It never occurred to me either until I tried to use slerp function the other day. Maybe we can add slerp in MTEX.

@ralfHielscher
Copy link
Member

Hi Zhang,

these are official Matlab toolboxes which uses the official Matlab quaternion class. There are two reasons MTEX does not use the Matlab quaternion class (1) MTEX is older than the Matlab quaternion class. and (2) the MTEX implementation is much faster.

From my perspective the toolboxes you mentioned do not have so much in common with MTEX. What you are working on that you want to use MTEX in combination with any of these?

Ralf.

@ZhangxiJesseFeng
Copy link
Author

It is not that I need a combination of the toolboxes, I just have one MATLAB installation with everything in it. It is not a huge issue of the name conflict, I was able to run what I needed to run after uninstalling MTEX. To reinstall MTEX I had to uninstall the toolboxes.

@ralfHielscher ralfHielscher closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants