Skip to content

Commit

Permalink
Add documentation to setup the screen of the ergocub-head (#385)
Browse files Browse the repository at this point in the history
Co-authored-by: Ugo Pattacini <[email protected]>
  • Loading branch information
GiulioRomualdi and pattacini authored Jan 8, 2025
1 parent 37982c5 commit 6ced6c2
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/icub_operating_systems/icubos/jetpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,4 @@ After successfully flashing your NVIDIA board by following the dedicated procedu
- [Install jtop](./install-jtop.md)
- [Install CMake (only for Ubuntu 20.04)](./install-cmake.md)
- [Setup Orin NX for FRAMOS-IMX415 (only for `iCub head v2.10`)](./setup-framos-imx415.md)
- [Setup ergoCub screen (only for `ergocub-head`)](./setup-ergocub-screen.md)
67 changes: 67 additions & 0 deletions docs/icub_operating_systems/icubos/setup-ergocub-screen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Setup ergoCub Screen

!!! info
This procedure should be performed after the [JetPack installation](./jetpack.md) has been completed.

When you start the ergoCub head for the first time, the screen will display a desktop showing the NVIDIA logo. While this is generally fine, it requires the user to manually run the [`ergoCubEmotions`](https://github.com/icub-tech-iit/ergocub-software/tree/master/src/modules/ergoCubEmotions) module. This procedure allows you to hide all bars on the desktop and set the wallpaper to one of the images stored in the [expressions folder](https://github.com/icub-tech-iit/ergocub-software/tree/14599254440686b8a373e1635f046a6821ddee78/src/modules/ergoCubEmotions/expressions/images).

---

## Hide the Ubuntu Bar

This guide is based on these [instructions](https://askubuntu.com/questions/1264686/is-there-a-way-to-hide-ubuntu-dock-and-top-bar-using-terminal).

1. Create a script in the `ergocub-head` home directory:

```bash
#!/bin/bash

status1=$(gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval string:'Main.panel.actor.visible;')
status2=$(gdbus call --session --dest org.gnome.Shell.Extensions --object-path /org/gnome/Shell/Extensions --method org.gnome.Shell.Extensions.GetExtensionInfo [email protected] | grep "'state': <2.0>" >/dev/null && echo "OFF" || echo "ON")

if [ "$status1" == "(true, 'false')" ]; then
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.panel.actor.show();'
else
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'Main.panel.actor.hide();'
fi

if [ "$status2" == "ON" ]; then
gdbus call --session --dest org.gnome.Shell.Extensions --object-path /org/gnome/Shell/Extensions --method org.gnome.Shell.Extensions.DisableExtension [email protected]
else
gdbus call --session --dest org.gnome.Shell.Extensions --object-path /org/gnome/Shell/Extensions --method org.gnome.Shell.Extensions.EnableExtension [email protected]
fi
```

2. Run the script to toggle hiding or showing the bars.

---

## Change the Desktop Wallpaper

1. SSH into the `ergocub-head` and use the following command to set the wallpaper:

```bash
gsettings set org.gnome.desktop.background picture-uri <uri-of-the-wallpaper>
```

2. If [ergocub-software](https://github.com/icub-tech-iit/ergocub-software) is installed via the robotology-superbuild, you can use this command:

```bash
gsettings set org.gnome.desktop.background picture-uri file:///usr/local/src/robot/robotology-superbuild/src/ergocub-software/src/modules/ergoCubEmotions/expressions/images/exp_img_1.png
```

---

## Clean the Icons from the Desktop

1. Create a folder in the home directory to store the desktop files:

```bash
mkdir ~/all_desktop
```

2. Move all files from the desktop to the newly created folder:

```bash
mv ~/Desktop/* ~/all_desktop/
```
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ nav:
- Install jtop: icub_operating_systems/icubos/install-jtop.md
- Install CMake (only for Ubuntu 20.04): icub_operating_systems/icubos/install-cmake.md
- Setup for FRAMOS-IMX415 (only for iCub head v2.10): icub_operating_systems/icubos/setup-framos-imx415.md
- Setup ergoCub screen (only for ergocub-head): icub_operating_systems/icubos/setup-ergocub-screen.md

- iCub Setup Multiple Robots:
- Summary: icub_setup_multiple_robots/index.md
- How to use two iCub robots in gazebo simulation: icub_setup_multiple_robots/two_robots_simulation.md
Expand Down

0 comments on commit 6ced6c2

Please sign in to comment.