Skip to content

Commit

Permalink
Updating UKIT009 (#370)
Browse files Browse the repository at this point in the history
Co-authored-by: Ugo Pattacini <[email protected]>
  • Loading branch information
martinaxgloria and pattacini authored Nov 19, 2024
1 parent 5656c96 commit 11de72b
Show file tree
Hide file tree
Showing 13 changed files with 230 additions and 193 deletions.
32 changes: 32 additions & 0 deletions docs/icub_operating_systems/icubos/install-cmake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Install the latest CMake version (MANDATORY only for Ubuntu 20.04)

!!! info

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

The latest YARP v3.10.0 requires CMake >= 3.19, but Ubuntu 20.04 only provides CMake 3.16, so it needs to be upgraded.

To download the latest version, first remove CMake with:

```bash
sudo apt purge --auto-remove cmake
```

Get a copy of the signing key:

```bash
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
```

Add the repository:

```bash
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
```

Update the repo index and install CMake:

```bash
sudo apt update
sudo apt install cmake
```
21 changes: 21 additions & 0 deletions docs/icub_operating_systems/icubos/install-cuda-libraries.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Install the CUDA libraries

!!! info

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

Usually the Jetpack flashing procedure takes care of installing the Cuda toolkit and libraries. If running the command `nvcc --version` returns `Command not found`, then you need to install them manually though `apt`.

For example **Jetpack 4.5.1**, which uses **Cuda 10.2** do:

```bash
sudo apt install cuda-libraries-dev-10-1 cuda-nvcc-10-2
```

Then, within the `.bashrc`:

```bash
export CUDA_HOME=/usr/local/cuda-10.2
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.2/lib64:/usr/local/cuda-10.2/extras/CUPTI/lib64
export PATH=$PATH:$CUDA_HOME/bin
```
15 changes: 15 additions & 0 deletions docs/icub_operating_systems/icubos/install-jtop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Install jtop

!!! info

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

`jtop` (a.k.a [jetson-stats](https://github.com/rbonghi/jetson_stats)) is a package for monitoring and control your NVIDIA Jetson boards.

![](../img/jtop.gif)

For installing it:

```bash
sudo -H pip install -U jetson-stats
```
39 changes: 39 additions & 0 deletions docs/icub_operating_systems/icubos/install-librealsense.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Install `librealsense` with Cuda support

!!! info

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

`librealsense` is a cross-platform library provided by Intel that can be used to take advantage of the features of the Intel Realsense cameras.
After installing the [cuda libraries](./install-cuda-libraries.md), we can make the Realsense camera use also the gpu resources for better performances, enabling the cuda support.

In a terminal, clone the official repo with:

```bash
git clone https://github.com/IntelRealSense/librealsense.git
```

Install the librealsense required development packages:

```bash
sudo apt install libssl-dev freeglut3-dev libusb-1.0-0-dev pkg-config libgtk-3-dev unzip -y
```

Install the `udev` rules (the librealsense kernel patching procedure does not work with recent Jetpack versions):

```bash
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
```

Now you are ready to compile librealsense with Cuda support:

```bash
cd librealsense
mkdir build && cd build
cmake ../ -DFORCE_LIBUVC=BOOL:ON -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_CUDA=BOOL:ON -DBUILD_EXAMPLE=BOOL:OFF
make -j2
sudo make install
```

For more information, refer to the [official documentation](https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md) provided in the repository.
129 changes: 12 additions & 117 deletions docs/icub_operating_systems/icubos/jetpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Now the board is in programming mode.

With a **Nvidia Jetson Xavier NX**, instead, keep the button RST/RECOVERY pressed for several seconds and then, when released, the board will be in recovery mode.

With the **Nvidia Jetson Orin NX**, the procedure is quite the same. The recovery mode could be achieved by pressing the Force Recovery and the Reset buttons simultaneously, then release the reset when the fan starts and, after ~2 sec, release the FR button too.
With the **Nvidia Jetson Orin NX**, the procedure is quite the same. The recovery mode could be achieved by pressing the Force Recovery and the Reset buttons simultaneously, then release the reset and, after ~2 sec, release the FR button too. The fan should starts.

In order to check that the board went in recovery mode, run on a terminal in the host

Expand All @@ -95,6 +95,10 @@ The board is in recovery mode if it appears something like this

At this point we are ready to flash.

!!! warning

If you want to configure your `Jetson Orin NX` to be used with `FRAMOS-IMX415` cameras, please refer to the [specific procedure](./setup-framos-imx415.md) from hereinafter.

1. From the previously folder, do `cd ..` to return to the Linux_for_Tegra directory
2. Flash the image by running `sudo ./cti-flash.sh` script (otherwise you can use the manual flashing procedure).

Expand Down Expand Up @@ -130,121 +134,12 @@ sudo apt install -f
sudo apt update && sudo apt upgrade
```

#### Install the Cuda libraries (OPTIONAL)

Usually the Jetpack flashing procedure takes care of installing the Cuda toolkit and libraries. If running the command `nvcc --version` returns `Command not found`, then you need to install them manually though `apt`.

For example **Jetpack 4.5.1**, which uses **Cuda 10.2** do:

```bash
sudo apt install cuda-libraries-dev-10-1 cuda-nvcc-10-2
```

Then, within the `.bashrc`:

```bash
export CUDA_HOME=/usr/local/cuda-10.2
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.2/lib64:/usr/local/cuda-10.2/extras/CUPTI/lib64
export PATH=$PATH:$CUDA_HOME/bin
```

#### Install the latest CMake version (MANDATORY only for Ubuntu 18.04)
The latest Robotology superbuild version requires CMake >= 3.12, but Ubuntu 18.04 only provides CMake 3.10, so it needs to be upgraded.

To download the latest version, first remove CMake with:

```bash
sudo apt purge --auto-remove cmake
```

Get a copy of the signing key:

```bash
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
```

Add the repository:

```bash
sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
```

Update the repo index and install CMake:

```bash
sudo apt update
sudo apt install cmake
```

#### Install `librealsense` with Cuda support (OPTIONAL)

`librealsense` is a cross-platform library provided by Intel that can be used to take advantage of the features of the Intel Realsense cameras.
After installing the [cuda libraries](#install-the-cuda-libraries-optional), we can make the Realsense camera use also the gpu resources for better performances, enabling the cuda support.

In a terminal, clone the official repo with:

```bash
git clone https://github.com/IntelRealSense/librealsense.git
```

Install the librealsense required development packages:

```bash
sudo apt install libssl-dev freeglut3-dev libusb-1.0-0-dev pkg-config libgtk-3-dev unzip -y
```

Install the `udev` rules (the librealsense kernel patching procedure does not work with recent Jetpack versions):

```bash
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
```

Now you are ready to compile librealsense with Cuda support:

```bash
cd librealsense
mkdir build && cd build
cmake ../ -DFORCE_LIBUVC=BOOL:ON -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_CUDA=BOOL:ON -DBUILD_EXAMPLE=BOOL:OFF
make -j2
sudo make install
```

For more information, refer to the [official documentation](https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_jetson.md) provided in the repository.


#### Install jtop (OPTIONAL)

`jtop` (a.k.a [jetson-stats](https://github.com/rbonghi/jetson_stats)) is a package for monitoring and control your NVIDIA Jetson boards.

![](../img/jtop.gif)

For installing it:

```bash
sudo -H pip install -U jetson-stats
```

## Create a backup image
# Post-flashing operations

For this step you need to have completed the [steps about the sdkManager](#jetpack-setup-on-the-host).
Make sure that the Xavier was started in [recovery mode](#booting-the-nvidia-jetson-board-in-recovery-mode) and it is found with `lsusb`.
On the host machine go to the `Linux_for_Tegra` folder and run:
After successfully flashing your NVIDIA board by following the dedicated procedure, it is optional to perform a series of post-flashing operations to ensure the system is configured correctly and ready for use. The following steps will help finalize the setup.

```bash
cd ~/nvidia/nvidia_sdk/JetPack_<jetpack_ver>_Linux_<board_type>/Linux_for_Tegra
sudo ./flash.sh -r -k APP -G backup.img <board_identifier> mmcblk0p1
```

For example for flashing the NVIDIA Jetson Xavier NX, `board_identifier` is `jetson-xavier-nx-devkit-emmc`.

## Flashing a backup image

For this step you need to have completed the [steps about the sdkManager](#jetpack-setup-on-the-host) and also have successfully backed up a Jetpack image following [these steps](#create-a-backup-image).

```bash
cd ~/nvidia/nvidia_sdk/JetPack_<jetpack_ver>_Linux_<board_type>/Linux_for_Tegra
sudo mv bootloader/system.img* . #this save old image
sudo mv backup.img.raw bootloader/system.img #rename new image
sudo ./flash.sh -r jetson-xavier-nx-devkit-emmc mmcblk0p1
```
- [Install CUDA libraries](./install-cuda-libraries.md)
- [Install librealsense](./install-librealsense.md)
- [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)
65 changes: 65 additions & 0 deletions docs/icub_operating_systems/icubos/setup-framos-imx415.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Setup Orin NX for using with FRAMOS-IMX415-C

This guide aims to highlight the correct procedure to configure the setup for using the [`FRAMOS-IMX415`](https://www.framos.com/en/products/fsm-imx415-sensor-module-26361) cameras with the [`Orin NX`](https://www.nvidia.com/it-it/autonomous-machines/embedded-systems/jetson-orin/) from Nvidia + [`Boson for FRAMOS`](https://connecttech.com/product/boson-for-framos-carrier-board-for-nvidia-jetson-xavier-nx/) carrier from ConnectTech.

!!! info

Be sure that the [Jetpack installation](./jetpack.md) procedure up to the BSP installation on the setup has been completed. At this point we are ready to flash the image.

### Flash the image

In the host:

1. Navigate into `/nvidia/nvidia_sdk_JetPack_5.1.2_Linux_JETSON_ORIN_NX_TARGETS/Linux_for_Tegra`
2. Run the flash script (as root or sudo):

```
sudo ./cti-nvme-flash.sh cti/orin-nx/boson/fsm-imx415-2cam
```

3. Once the flash has completed, the board will reboot.

Check out the [ConnectTech tutorial](https://connecttech.com/resource-center/kdb373/) explaining the complete procedure.

### Complete the OEM installation
After booting into the OS, follow the OEM installation with the default options.

Set the user name to `ergocub` with the hostname `ergocub-head`. Allow login without password and let the installation process finish.

After rebooting into the graphical OS, run the following commands in a terminal to update the system:

```bash
sudo apt install -f
sudo apt update && sudo apt upgrade
reboot
```

### Switch profile on Orin NX
After the reboot process:

1. Open a new terminal on the Orin NX and run `sudo cti-orin-nx-nano-fdt.sh`
2. Follow the interactive procedure and select `Orin NX`, then `Boson NGX007` and finally the profile for the FRAMOS IMX415 cameras, i.e. `fsm-imx415-2cam`
3. Once the script exits, run `sync` and `reboot` to finalize the changes.

![post-flash](../img/post-flash.png)

## Post-flashing operations

### Install FRAMOS drivers

From the [`FRAMOS Resource Center`](https://www.framos.com/en/fsm-startup), download the proper software by selecting the following entries:

![framos-sw](../img/framos-sw.png)

Unzip the file in the folder you prefer, then navigate into and run:

```
sudo apt install ./framos-libsv_*_arm64.deb
```

As soon as the installation procedure has finished, please power off the Orin NX. Then plug-in your cameras to the `CAM1` and `CAM2` connectors, and finally power on the board again.

!!! warning
During the flashing procedure, the profile `fsm-imx415-2cam` has been selected, which means that two cameras could be used with this configuration. For this reason, only `CAM1` and `CAM2` connectors are enabled to read the data from the FRAMOS-IMX415, while CAM3 and CAM4 are not. Please, be sure that they are properly connected.

Check if the cameras are detected running `ls /dev/video*` from the command line.
Binary file added docs/icub_operating_systems/img/framos-sw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/icub_operating_systems/img/post-flash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/icub_versions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
| v2.6 | v2.5.5 with new face expression (RFE master board) | |
| v2.7 | v2.6 with high-performance IMU on the waist | |
| v2.8 | v2.7 with beam-splitter in the eye for hosting event driven and frame based sensors | |
| v2.9 | **v2.7** with hands mk5 and forearm mk2 | |
| v2.10 | **v2.7** with hands mk5, forearm mk2, new 4k basler cameras, nvidia xavier and intel i7 11th on com express type 10 module (UKIT009) | |
| v2.9 | _obsolete_ | |
| v2.10 | **v2.7** with the 4K FRAMOS-IMX145 cameras, NVidia Orin NX [(UKIT009)](../upgrade_kits/head_4k/support.md) and intel i7 11th on com express type 10 module in the backpack | |

|Special Version | Features | Notes |
| :---:| :---| :---|
Expand Down
Binary file modified docs/upgrade_kits/head_4k/img/1.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/upgrade_kits/head_4k/img/3.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 11de72b

Please sign in to comment.