-
Notifications
You must be signed in to change notification settings - Fork 10
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
[LANGUAGE INCOMPATIBILITY] Different behaviors from fkm() on MATLAB and Python #57
Comments
Hi @anachristinaac, This topic has appeared in many forms along the years. I can’t link you to all of the appearances now, but the major point is that we chose to adjust the indexing of fkm to match the language. From your example, in MATLAB, index 0 stands for the reference frame which can otherwise be obtained. The rest are shifted by 1 to match the 0-indexing in C++ and Python. Please let me know if this explanation does not match your experience and if there are other situations in which the indexing is causing issues so that the discussion can progress. |
Hi, @mmmarinho, Thanks for the reply! The index 0 in MATLAB does not give me the reference frame. Considering the figure I attached before, In my experience, when the first and last frames are not aligned, respectively, with the reference and end effector frames (both set through Is this what I should expect considering the choice of indexing that you mentioned? |
Thanks, I think that your explanation makes sense. Could you help by delving a bit on the implementations and see exactly what is different? If the behaviour is this different we need to adjust it. |
Hi, @mmmarinho, I'm not sure about what is the problem, but I checked the codes, and here is what I noticed so far: When you call If the index N is accepted, then we could have different results when calling fkm(q) and fkm(q,N). I believe reference_frame_ * raw_fkm(q_vec, get_dim_configuration_space()-1) * curr_effector_ while reference_frame_ * raw_fkm(q_vec, N-1) I would like to point here that calling the However, I don't undestand entirely the implementation of the method raw_fkm() in Python/C++. A variable I'm afraid I don't have answers yet, but maybe you can think of something just by looking at the implementation again with these questions in mind. I'll let you know if I have any new ideas on where the problem might be and how to solve it. |
What you said makes sense but the problem we have is that fkm is used everywhere in C++ and changing its behavior won’t be trivial. Unless you and other members/users help in a deeper level, I’m afraid I can’t address this in a timely manner. This help is by checking the behavior, what would be affected, and also a deeper testing after the changes are made. |
Hi, @anachristinaac and @mmmarinho. Thanks for this productive discussion. @anachristinaac, we (@mmmarinho and I) reached a point where we do not have the time to spend many hours on non-critical issues in DQ Robotics (well, I reached that point many years ago, but I'm stubborn and too passionate about the library to let it go!). To ensure that this issue is adequately addressed, I suggest you follow Murilo's suggestion, namely:
Kind regards, |
Hi @bvadorno, Since @juanjqo is already pulling enough weight fixing the website, can we relieve him from this task and have me double-checking it instead? I'm even currently sitting by @anachristinaac in the office, which should make the whole process easier. Kind regards, |
Hi @ffasilva, @juanjqo already fixed the website! 😄 Your help is appreciated, though. Therefore, I suggest you take the lead on the double-checking procedure, but I believe @juanjqo's help will still be fundamental because the process is not easy, especially with all quality-control measures in place. He already passed the trial by fire and can guide you and @anachristinaac along the way. Kind regards, |
Hi all, I'll follow the suggestions, and let you know of any update on this issue. Kind regards, |
Describe the missing/unexpected functionality
For DQ_SerialManipulatorDH objects, I'm getting different behaviors in MATLAB and Python when trying to obtain the poses of intermediate frames. The minimum example below uses the 2-DOF planar robot shown in the figure, but I've also tried with robots available in the library, such as the KukaLw4Robot.
The Matlab behavior is what I would expect to be the correct output, since with it is possible to obtain the pose of the first and last frames when they are different from the reference and the end effector, respectively.
This is the robot of the example:
Matlab behavior
MATLAB SCRIPT
MATLAB OUTPUT
Python behavior
PYTHON SCRIPT
PYTHON OUTPUT
Environment:
Additional context
I have also tried in a machine running Ubuntu 22.04 LTS, with the dqrobotics for Python versions 20.04 and 23.4.0a22, and obtained the same results.
The text was updated successfully, but these errors were encountered: