Skip to content

Commit

Permalink
Cleanup of #381 (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
pattacini authored Jan 2, 2025
1 parent d6c13db commit bcdf82d
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 471 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ How to run:
- Check the README file for further instructions
- launch as `sudo` the `start.sh` file
```
git clone https://github.com/icub-tech-iit/iCubOS-playbook.git
git clone https://github.com/icub-tech-iit/icubos-playbook.git
cd iCubOS-playbook/
cd icubos-playbook/
sudo ./start.sh
```
A reboot is recommended in order to load the Lowlatency kernel instead of the Generic.
A reboot is recommended in order to load the `Lowlatency` kernel instead of the `Generic`.

Once the installation is completed follow the [Networking](https://icub-tech-iit.github.io/documentation/icub_operating_systems/icubos/networking/#external-network-configurations) chapter of the guide to configure the network using netplan or your favourite network manager system.
Once the installation is completed follow the [Networking](https://icub-tech-iit.github.io/documentation/icub_operating_systems/icubos/networking/#external-network-configurations) chapter of the guide to configure the network using netplan or your favorite network manager system.
4 changes: 4 additions & 0 deletions docs/icub_operating_systems/icubos/installation-from-image.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# The OS on icub-head - Installation from pre-built image

!!! warning

The instructions for installing a pre-built images are currently outdated. Please, refer to the other modes of installation.

This method uses a pre-built disk image to install the icub-head, this image is a 1:1 copy of a working system: once the image is written on the icub-head disk (**erasing any data currently on the disk!**) you get a working system, with only a few customiztion required.
If you prefer to install the system from scratch, please check the [_appropriate guide_](installation-from-scratch.md).

Expand Down
103 changes: 0 additions & 103 deletions docs/icub_operating_systems/icubos/installation-from-scratch-22.04.md

This file was deleted.

103 changes: 3 additions & 100 deletions docs/icub_operating_systems/icubos/installation-from-scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Since iCubOS is based on the Ubuntu server, we will install the latter from the

## Latest versions

The latest version is based on Ubuntu Server 20.04.1
The latest version is based on Ubuntu Server 22.04

## Create the USB installer

The first step is to download the **official Ubuntu 20.04 LTS Server install media** from the [release page](https://releases.ubuntu.com/focal). Search for `ubuntu-20.04.x-live-server-amd64.iso`.
The first step is to download the **official Ubuntu 22.04 LTS Server install media** from the [release page](https://releases.ubuntu.com/jammy). Search for `ubuntu-22.04.x-live-server-amd64.iso`.

Then, please create the USB installer using a USB memory and a tool like [Balena Etcher](https://www.balena.io/etcher/).

Expand Down Expand Up @@ -52,7 +52,7 @@ Install the system by choosing the default options, except for the following ste

Install the following packages
```
nfs-common python-tk libopencv-dev ntpdate vim ssh cmake-curses-gui iperf libportaudio2 portaudio19-dev linux-sound-base alsa-base alsa-utils gdb meld bmon libi2c-dev expect libgfortran10-dev qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings
nfs-common python-tk libopencv-dev ntpdate vim ssh cmake-curses-gui iperf libportaudio2 portaudio19-dev linux-sound-base alsa-base alsa-utils gdb meld bmon libi2c-dev expect libgfortran-10-dev qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings
```

### Low Latency kernel
Expand Down Expand Up @@ -98,103 +98,6 @@ sudo systemctl disable gdm
net.core.rmem_max=8388608
```

### NTP

Edit the file `/etc/default/ntpdate` by changing the following lines
```
NTPDATE_USE_NTP_CONF="no"
...
NTPSERVERS="10.0.0.1 ntp.ubuntu.com"
```

### IMU Bosch

#### Installation

To use the IMU Bosch BNO055 through the i2c bus these additional steps are required:

1. Install libraries for i2c:
`sudo apt install libi2c-dev i2c-tools`

2. Unzip [kempld-drivers.30.tar.gz](https://github.com/icub-tech-iit/icub-os-files/blob/master/drivers/imu-bosch/kempld-drivers.30.tar.gz)

3. Compile the custom kernel modules:
```
cd kempld-drivers.30/kempld-modules-{ver}
make
sudo make install
```
{ver} is the Linux version (see uname -r). Ignore ssl errors during installation.

4. Load the required kernel module(the best should be add them at the startup):
```
sudo insmod kempld-core.ko
sudo insmod i2c-kempld.ko
```

5. Finally add `icub` user to `i2c` group:
```
usermod -a -G i2c icub
```

#### Test the configuration of i2c and BNO055

To test the installation with the [python script BNO055](https://github.com/icub-tech-iit/icub-os-files/blob/master/drivers/imu-bosch/BNO055.zip):
```
python BNO055.py
```

Note that to make it work you might change the script at line 195:
```
# Open I2C bus
self._bus = smbus.SMBus(1)
```

specifying the right number: instead of 1, specify the correct number that can be found through:

```
i2cdetect -l
```
Another possible troubleshooting could be to change in the script BNO055.py (line 187) the default address from 0x28 to 0x29

### Fixed USB resource names

In order to get a fixed device name for some USB resources such as IMU and USB2SERIAL, you have to create the following UDEV rules

- IMU BOSCH: add the file `/etc/udev/rules.d/88-bosch-i2c-imu.rules` as follows
```
# iCub Bosch i2c IMU
SUBSYSTEM=="i2c-dev", ATTRS{name}=="i2c-kempld", SYMLINK+="bosch-i2c-imu", MODE="0660", GROUP="i2c"
```

- USB to Serial interface: add the file `/etc/udev/rules.d/99-usb-serial.rules` as follows
```
# tty Xsens
SUBSYSTEM=="tty", ATTRS{idVendor}=="2639", SYMLINK+="ttyXsens", MODE="0660", GROUP="tty"
```

## Further installation steps and configuration

### Mount via SSH

On the icub-head, graphics-based tools have not been installed (except the ones required for firmware interfaces) and it is better not to install them. Anyway, using graphic tools (like editors, file managers, etc..) is very useful and sometimes essential. Instead of running remotely a tool and displaying it locally (like we did in old PC104), we can mount locally the icub-head filesystem via SSH and run locally all the tools we need.
In order to mount locally the icub-head filesystem on your client:

1. install the sshfs package
```
sudo apt-get install sshfs
```
2. create a mount point for the remote filesystem (eg.) `mkdir /home/icub/icub-head_fs`
3. mount the remote `/usr/local/src/robot` via SSH
```
sudo sshfs -o allow_other [email protected]:/usr/local/src/robot/ /home/icub/icub-head_fs
```

If you already set the passwordless SSH login, you can skip the password:
```
sudo sshfs -o allow_other,IdentityFile=/home/icub/.ssh/id_rsa [email protected]:/usr/local/src/robot/ /home/icub/icub-head_fs
```

## Customize the system

What now you need to do is to customize the installation with your hardware and environment (see the "_Required configuration_" paragraph in [_Networking_](networking.md), [_Bluetooth_](bluetooth.md), [_User Environment_](user-env.md) chapters as well as [_Further Tasks_ chapter](further-tasks.md) )
106 changes: 0 additions & 106 deletions docs/icub_operating_systems/other-machines/generic-machine-22.04.md

This file was deleted.

Loading

0 comments on commit bcdf82d

Please sign in to comment.