-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Coordinate frame cpp #1269
Coordinate frame cpp #1269
Conversation
…ses. i think this might work better.
working on this a lot now. will close and reopen soon. |
@@ -4,7 +4,8 @@ | |||
function obj=AtlasCoordinates(r) | |||
typecheck(r,'TimeSteppingRigidBodyManipulator'); | |||
nq = r.getNumPositions(); | |||
obj = obj@SingletonCoordinateFrame('atlasFrames.AtlasCoordinates',nq,'x',r.getStateFrame.coordinates(1:nq)); | |||
coords = r.getStateFrame(); | |||
obj = obj@SingletonCoordinateFrame('atlasFrames.AtlasCoordinates',nq,'x',coords(1:nq)); |
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.
It's annoying that slicing the coordinate names can no longer be done as a one-liner. But that's unavoidable (unless Mathworks fixes https://github.com/RobotLocomotion/mathworks-requests/issues/8 😉 )
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.
actually, i could have written the coordinates method to (optionally) take in a matrix of indices. but the real pain is that some code was accessing it as coordinates(1:nq)
and others as e.g. coordinates{1}
another step towards being a C++ library w/ matlab wrappers. as described in #1267.