Code Monkey home page Code Monkey logo

steam-deck-ros-controller's Introduction

Steam Deck ROS Robot Controller

Steps done to configure Steam Deck as a ROS robot controller.

Prepare the system

At any time, if you are in the gaming mode, switching to desktop mode is done via the Power off menu.

To summon the on-screen keyboard, press STEAM+X. To hide it, press B.

Keep the Deck connected to a power source to prevent it from falling asleep.

  1. Set the amount of reserved GPU memory to 4 GB (in Desktop mode, the auto mode somehow doesn't work and VRAM is capped at 1 GB normally).
  2. Still in gaming mode, go to Settings->Enable developer mode .
  3. Still in gaming mode, go to Developer->Enable Wifi power management and turn it off (it lowers the performance and make SSH sessions very sluggish). This will want a reboot. Do it.
  4. Switch to Desktop mode (see the notice above).
  5. Tap the Steam icon in taskbar, select Settings -> Controller -> Desktop configuration. This menu allows you to configure the gamepad behavior, so that the joy_node can read it. Press X to browse available configs. Select Templates->Gamepad->Apply configuration. Do any other adjustments you like, but do not touch the JOYSTICK MOVE areas. You can't return these values back! What I do is configure L4 as Ctrl+R, L5 as Ctrl+C, R4 as up arrow and R5 as down arrow.
  6. Open terminal (Konsole) from the KDE app menu->System.
  7. Set the user's password: type passwd and type your password twice. Now you can use sudo.
  8. Make the filesystem read-write: sudo steamos-readonly disable .
  9. Enable SSH server: sudo systemctl enable sshd.service && sudo systemctl start sshd.service .
  10. Now you can finally connect to the deck via SSH from your laptop.
  11. Clone this repo into home directory of the deck user: git clone https://github.com/ctu-vras/steam-deck-ros-controller .
  12. Symlink or copy everything from etc folder to the respective locations on the Steam Deck.
  13. Symlink or copy everything from home/deck folder to your home directory.

Make the Arch Linux OS package manager usable

echo "keyserver hkps://keyserver.ubuntu.com" | sudo tee -a /etc/pacman.d/gnupg/gpg.conf
wget https://archlinux.org/packages/core/any/archlinux-keyring/download -O ~/arch-keyring.tar.zst
sudo pacman-key --init
sudo pacman-key --populate
sudo pacman-key --refresh-keys
sudo pacman -U ~/arch-keyring.tar.zst
# SteamOS changed the pacman repos in November 2022, so this just updates the specs of the repo files
# https://www.reddit.com/r/SteamDeck/comments/zrc2ep/comment/j14iysa/
sudo sed -i -e 's/\[jupiter\]/[jupiter-rel]/g' -e 's/\[holo\]/[holo-rel]/g' -e 's/\[core\]/[core-rel]/g' -e 's/\[extra\]/[extra-rel]/g' -e 's/\[community\]/[community-rel]/g' -e 's/\[multilib\]/[multilib-rel]/g' /etc/pacman.conf
# Upgrade the whole system
sudo pacman -Syu
yay -S base-devel
# compatibility library for conda ROS libraries
sudo pacman -S core-rel/libxcrypt-compat

Install ROS Noetic

wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
bash Mambaforge-$(uname)-$(uname -m).sh
# follow the install steps; when finished, open a new bash console
conda install mamba -c conda-forge
mamba create -n ros_env python=3.9
conda activate ros_env
conda config --env --add channels conda-forge
conda config --env --add channels robostack-staging
mamba install ros-noetic-desktop ros-noetic-image-transport-plugins
mamba install compilers cmake pkg-config make ninja catkin_tools
mamba install rosdep
rosdep init # note: do not use sudo!
rosdep update
pip install -U vcstool

Create the catkin workspace

# Install extra packages
mamba install mesalib mesa-libgl-devel-cos7-x86_64 festvox-kallpc16k alsa-plugins

mkdir -p workspaces/deck_ws/src
cd workspaces/deck_ws/src
# choose the .repos files you want here
ln -s ~/steam-deck-ros-controller/home/deck/workspaces/deck_ws/src/jsk.repos ./
for f in *.repos; do vcs import < $f; done
conda activate ros_env # if not already in an environment
cd ..
catkin init
catkin config --extend /home/deck/mambaforge/envs/ros_env
catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo
catkin config --skiplist husky_control husky_desktop husky_gazebo husky_navigation husky_simulator spot_driver sound_classification imagesift jsk_tilt_laser multi_map_server audio_video_recorder jsk_rosbag_tools jsk_recognition jsk_perception jsk_people_tracking_filter jsk_pcl_ros_utils jsk_pcl_ros jsk_recognition_utils jsk_recognition people_tracking_filter people leg_detector people_velocity_tracker people_velocity_tracker face_detector
rosdep install --from-paths src --ignore-src -r
catkin build

# ugly fix to allow sound_play node to work
ln -s /usr/lib/alsa-lib/libasound_module_pcm_pipewire.so /home/deck/mambaforge/envs/ros_env/lib/alsa-lib/libasound_module_pcm_pipewire.so

steam-deck-ros-controller's People

Contributors

peci1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

saga0619

steam-deck-ros-controller's Issues

Can I use this in ROS1(Ubuntu 1804)?

Hello , this is a good project! I am using Ubuntu1804 ROS Melodic by distrobox.
Can i just use the src folder to build the project? or it need some drivers?

Question Regarding the Absence of Controller Settings on Steam Deck

no_Controller_Screenshot_20230830_

Hi,
I'm currently following the Steam Deck ROS installation guide provided by you. You mentioned to go to "Settings -> Controller -> Desktop configuration." However, as shown in the screenshot above, we cannot find the controller option in the settings menu on our Steam Deck. We would like to ask where we should perform the settings.

Thank you for providing this guide.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.