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

Logging direct VR joystick inputs #648

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

stephenmcc
Copy link
Collaborator

Changing the logging scheme for VR to directly log the joystick pose/velocity and button inputs - a/b/trigger. On replay, it interpolates the pose/velocity of the controller. Trackers are also logged, with the restriction that the set of trackers has to be the same as recording (could do more flexible setup in the future). Adding button to load the latest modified csv file in the logs directory for quicker playback.

{
return doneReplaying;
IntFunction<TrackerData> trackerDataSupplier = index -> segmentType.getSegmentSide() == null ? vrInputData.get(index).trackerData.get(trackerIndex.get(segmentType)) : vrInputData.get(index).controllerData.get(segmentType.getSegmentSide());
packTrackerDataInternal(trackerDataSupplier, poseToPack, angularVelocityToPack, linearVelocityToPack);
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calculation of interpolated pose/velocity

if (reset)
this.reset();
ControllerData controllerData = vrInputData.get(index).controllerData.get(robotSide);
return controllerData.triggerPressed;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks button press over the interval from the previous update to this update, so that buttons aren't missed or replayed multiple times.

Copy link
Member

@calvertdw calvertdw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but Luigi should be the main approver.

@stephenmcc stephenmcc modified the milestone: Sprint 3 Feb 6, 2025
@stephenmcc
Copy link
Collaborator Author

Currently on hold until the ProMP test can be reworked

@stephenmcc stephenmcc force-pushed the feature/vr-input-logging branch 3 times, most recently from 61eb25a to 70bda6e Compare February 11, 2025 16:20
@stephenmcc stephenmcc force-pushed the feature/vr-input-logging branch from 70bda6e to 5fe22c1 Compare February 18, 2025 21:36
@stephenmcc stephenmcc force-pushed the feature/vr-input-logging branch from 5fe22c1 to 52d5f4d Compare February 28, 2025 17:06
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

Successfully merging this pull request may close these issues.

2 participants