-
Notifications
You must be signed in to change notification settings - Fork 1
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
audible feedback #15
base: main
Are you sure you want to change the base?
audible feedback #15
Conversation
…emove unecessary files
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.
looks good to me, although I want to get feat/ros-unity-integration merged first as its own PR so that it isn't part of this PR to keep things more separated so waiting on merging this for a bit
<package format="3"> | ||
<name>autonav_hardware</name> | ||
<version>0.0.0</version> | ||
<description>TODO: Package description</description> |
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.
version 2025.0.1 (or .1.0, whichever you prefer) and package description
20 | ||
) | ||
|
||
self.system_state_monitor = self.create_timer(0.5, self.monitor_system_state) |
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.
SystemStateTransition might get implemented this year, TBD, so you might be able to change this in the future
def on_audible_feedback_received(self, msg:AudibleFeedback): | ||
self.monitor_tracks() | ||
|
||
self.log(f"{len(self.tracks)}", LogLevel.ERROR) |
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.
change to LogLevel.DEBUG before merging so no red ERROR color jumpscares
|
||
def play_sound(self, filename): | ||
playback = Playback() | ||
playback.load_file(filename) |
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.
if this file doesn't exist does this fail gracefully or crash the code? if it crashes a try/catch would be nice, otherwise no problems, although doing some processing on the file name (like a .strip() maybe) might be worth it?
…use buttons to controller dpad, and secondary tracks example to controllre X button
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.
looks good to me
audible_feedback.pause_all = True | ||
self.audibleFeedbackPublisher.publish(audible_feedback) | ||
|
||
if self.controller_state['abs_hat0x'] == 1: |
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.
could be an elif instead of an if but no biggie
Will play audio files sent in an AudibleFeedback message.
AudibleFeedback message also contains a field which if True will stop all currently playing tracks.