-
Notifications
You must be signed in to change notification settings - Fork 306
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
[WIP] Fix Real Time IK #3705
base: main
Are you sure you want to change the base?
[WIP] Fix Real Time IK #3705
Conversation
CMakeLists.txt
Outdated
@@ -438,6 +438,9 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU" OR | |||
NOT (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "5.0.0")) | |||
add_compile_options(-Wno-unused-local-typedefs) | |||
endif() | |||
# There are so many warnings about using GCC > 7.1. It should be mostly | |||
# harmless, so we can disable it. | |||
add_compile_options(-Wno-psabi) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Driveby comment while you develop, but isn't this quite hamful? Disabling ABI checks on a binary-distributed library codebase like OpenSim for all builders is a no no.
If you're doing something like cross-compiling with a weird compiler etc. etc. and you want this flag for your build specifically then you can specialize in your buildscript by setting the CXXFLAGS
environment variable:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that is a much better option. I'll revert that commit.
@@ -116,14 +116,14 @@ class OSIMSIMULATION_API OrientationsReference | |||
int getNumRefs() const override; | |||
/** get the time range for which the OrientationsReference values are valid, | |||
based on the loaded orientation data.*/ | |||
SimTK::Vec2 getValidTimeRange() const override; | |||
virtual SimTK::Vec2 getValidTimeRange() const override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DBC#2: override
implies virtual
- typical practice is to virtual
the base class's method (it has nothing to override) and then override
in all deriving classes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay. There were a few methods in this class that did not follow this pattern like the hasNext()
method that has the virtual
keyword in the Reference
class, the OrientationsReference
class, and the BufferedOrientationsReference
class. I can revert these changes though.
opensim-core/OpenSim/Simulation/Reference.h
Line 118 in 849a8fb
virtual bool hasNext() const override = 0; |
virtual bool hasNext() const override { return false; }; |
virtual bool hasNext() const override { return !_finished; }; |
Note to self: I think the reason why the build is failing is due to shared pointers of base and derived classes. I discuss it here: #3415 (comment). I thought that using the namespace would fix it, but I think it needs the full inheritance chain (both all derived and all base) to be defined as shared pointers using the macro as discussed in the docs for SWIG. This is not workable since the most base class is the |
Fixes issue #3415
Brief summary of changes
The inverseKinematicsSolver for real time applications was not working. This is a work in progress to try to get it working again. This branch currently has debug code that I will remove in the final version.
Testing I've completed
Right now, I am just using the RealTimeKin repo to test to see if it works. Once I get that to work, I will run through the other tests to make sure that I did not break anything else.
Looking for feedback on...
See the linked issue for most of the conversation. I recently fixed the binding interface by including the namespace, so it compiles and has the BufferedOrientationsReference as a smart pointer. It still seems to have a different instance for the object when the PutValues method is called and when the GetValueAtTime method is called in the InverseKinematicsSolver. The data queue has data after I put the data and is empty when I go to get a value.
The really hacky way that I have been able to get the real time ik working is with just moving the method that adds data to the queue up to the IKSolver class, but this is not ideal.
CHANGELOG.md (choose one)
This change is