feat: Dualsense device support#645
feat: Dualsense device support#645kevin-thankyou-lin merged 5 commits intoARISE-Initiative:masterfrom
Conversation
|
Hi @OceanPresentChao, thanks for this awesome contribution! Yes, if you're able to update the docs here that'd be awesome too. |
kevin-thankyou-lin
left a comment
There was a problem hiding this comment.
Small comment on docs, otherwise looks great and thank you!
| | b | toggle arm/base mode (if applicable) | | ||
| | s | switch active arm (if multi-armed robot) | | ||
| | = | switch active robot (if multi-robot env) | | ||
| | ESC | quit | |
There was a problem hiding this comment.
I think ESC still works for quitting across all devices? Maybe let's keep that?
There was a problem hiding this comment.
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.
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.
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.
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 |
|
Merging in for now - thanks for your great contribution, @OceanPresentChao! |
57e5d3b
into
ARISE-Initiative:master




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
dualsenseoption fordevicearg 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.