-
Notifications
You must be signed in to change notification settings - Fork 478
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
feat: Dualsense device support #645
base: master
Are you sure you want to change the base?
feat: Dualsense device support #645
Conversation
Hi @OceanPresentChao, thanks for this awesome contribution! Yes, if you're able to update the docs here that'd be awesome too. |
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.
Small comment on docs, otherwise looks great and thank you!
| s | switch active arm (if multi-armed robot) | | ||
| = | switch active robot (if multi-robot env) | | ||
| ESC | quit | |
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.
I think ESC still works for quitting across all devices? Maybe let's keep that?
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.
There isn't any 'esc' key listener in source code. I try esc
key in both MacOS and Ubuntu but it doesn't work. So I think it is a typographical mistake.
We can add key listener if needed:
elif key == pynput.keyboard.Key.esc:
print("Detect `esc` key, exiting")
os._exit(0)
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.
My apologies -- I guess I meant Ctrl + q
, as in robosuite.devices.keyboard.py
's print_command("Ctrl+q", "reset simulation")
. Looks like current docs are incorrect.
I think Ctrl + q is nicer than Ctrl + c
because Ctrl + c
ends the current program and thus you need to run the python script again to e.g. collect more data using python robosuite/scripts/collect_human_demonstrations.py --device keyboard/dualsense
Could we please update to Ctrl + q
? I'll merge after that - thanks for making these updates!
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.
I think I get what you mean and the difference between quit
and reset
. The docs docs/modules/devices.md
already contain both ctrl + q
for reset
and ctrl + c
for quit
. I think we can remain both of them?
Actually, it is q
instead of ctrl + q
in robosuite/devices/keyboard.py
. There isn't binding of ctrl
and I have tried it : ) .
Of course, ctrl + q
still works; it's a very small mistake. Should we update the docs to q
?
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 I see; I think Ctrl
in Ctrl+q
was deliberately added as a way to escape mujoco viewer logging stuff, from this commit: "update keyboard instruction for reseting: add Ctrl to command to prevent interference with mj viewer".
Weird, we're getting a failed test on the robot models --- would it be possible you for to run |
Of course. I run This is my MacOS Environment:
on latest robosuite
|
Gotcha, thanks for running this test! I'll debug later this week/weekend |
What this does
Recently I try to integrate my DualSense controller with robosuite to teleoperate the simulated robot. I finish it and I think maybe we can merge the feature into Robosuite official codebase
PS: The doc has not been updated. If Robosuite has a plan to add this feature, I will commit to update.
How it was tested
dualsense
option fordevice
arg indemos/demo_device_control.py
.How to checkout & try? (for the reviewer)
Connect your dualsense to your computer through USB or BlueTooth
Run
In MacOS, run
SECTION TO REMOVE BEFORE SUBMITTING YOUR PR
Note: Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR. Try to avoid tagging more than 3 people.
Note: Before submitting this PR, please read the contributor guideline.