# ⚒️ Assembly

> Estimated Assembly time: From scratch: 2-4 hrs; with assembled SO100/SO101 arms: 1-2 hrs
>
```{tip}
You can also buy [pre-assembled kits](https://github.com/TheRobotStudio/SO-ARM100#kits) for SO101 arms.
```
Official Assembly Videos from Wowrobo:
Tips from Greg's Tech
## 🦾 SO101 Arms

> If you already have 2x SO101 arms assembled with motors configured, skip.
>
- Build 2x SO101 arms by following [SO101 Step-by-Step Assembly Instructions](https://huggingface.co/docs/lerobot/so101) to build 2 identical follower arms with 2 sets of motors (both previous indexed as 1-6) for 2 control boards.
- Then continue to [configure the motors](https://huggingface.co/docs/lerobot/so101#configure-the-motors) for the SO101 arms.
- Follow this [installation guide](https://github.com/TheRobotStudio/SO-ARM100/tree/main/Optional/SO101_Wrist_Cam_Hex-Nut_Mount_32x32_UVC_Module) to add wrist cameras.
- If you have [3M gripper tape](https://www.amazon.com/gp/product/B0093CQPW8/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1), now it's time to wrap it on the fingers.
## 🤔 Configure Motors

> Since the official lerobot codebase currently doesn't support motor configuring besides the arm, we use [Bambot](https://bambot.org/) instead (works on Windows and Mac, Linux needs 'sudo chmod 666 /dev/ttyACM0' first).
>
- Connect the motor you want to configure (one-by-one) to a control board, and directly connect the board to your computer.
- Navigate to [the motor configuration page of Bambot](https://bambot.org/feetech.js), establish the connection and scan for your servo motor.

- Rename the motor id following the instruction below.

- You need to configure two sets of motors for 2 motor control boards in addition to the SO101 arms:
- one for **head** (motor ids: 7, 8)
- and the other for **the wheel base** (motors ids: 7, 8, 9).
- Tips: write the numbers on motors with marker and distinguish motors for different boards (such as L1-L8 and R1-R9).
## 🛒 IKEA Cart
- Just in case you accidentally throw your manual away, [here it is](https://github.com/Vector-Wangel/XLeRobot/blob/main/others/Manuals_raskog_utility_cart.pdf).
## 🧑🦼➡ Wheel Base
> If you already have a Lekiwi base, detach the battery, servo mounts, etc. Base plate will only have 3 mounted motors with wheels (keep the wirings).
>

```{note}
Don't choose the wrong plate, each plate comes in a certain order.
```
- Mount the omni-wheels to the plate according to the figure above.
- The specific motor id should be installed accordingly.
- Note that the connector of the omni-wheel needs 3x M4 screws.
- Wiring the motors regularly as the [tutorial](https://github.com/SIGRobotics-UIUC/LeKiwi/blob/main/Assembly.md#2-bottom-plate-assembly), after that instead of connecting the motor cable to the control board, use the extended wire/connector kit to extend the wire.

- Mount the top plate according to the figure above.
- Leave the motor cable hanging ,don't pull it out from the top plate just yet.

- Mount 3x connectors on the top plate according to the figure above.
```{tip}
Put the Lekiwi base with the connectors under the cart to see whether it can give enough pressure to the cart, with four wheels of the cart can still touch the ground. If not, try to modify the connectors' 3D model by slightly adjust the z-axis scale directly in the slicer software (keeping the xy-axis scale unchanged) and print them again.
```

```{tip}
Flip the cart over to do the assembly below.
```
- Now install the Lekiwi base with the connectors onto the bottom of the IKEA cart, with the thinner plate on the other side.
- Refer to the figure to find the desired assembly direction based on the motor index.
```{note}
This new hardware version is compatible with the IKEA cart metal mesh, and all the 12 M3 screws should be able to fit in easily.
```

- Use needle-nose pliers to cut out the metal mesh at the corresponding holes in the top base, removing only the central "x" to maintain structural integrity. This creates openings for cable routing.
- Then, run the previously extended wire up through the cart from below.
## 🦾 Arm Base
### Top Base Assembly

- Easier assembly when the base is flipped over.
### Head Assembly

- It should be the same as the first two steps of [SO101 arm assembly](https://huggingface.co/docs/lerobot/so101#joint-1).
## 🧵 Wiring
```{important}
Complete all wiring and cable management for the top base and put the Raspberry Pi in its case before clamping the top base into the IKEA cart.
```

- Prepare the extended 5264 wire with the connector kit if you don't have one already.
- Use needle-nose pliers to cut out the metal mesh at for the upper two layers for cable routing, similar to the bottom layer previously. Choose the location as needed.
```{note}
When extending the 5264 wire yourself, be careful with the polarity—reversed connections will cause errors.
```
- Connect the extended 5264 **motor cable** from **the Lekiwi base** to **one of the SO101 arms** (this makes the base and the arm as Lekiwi).
- Connect the 2 **USB-C to USB-A** **data cables** from 2 **motor control board** to **Rasberry Pi** (2 USB-A slots left for the cameras).
- Connect all 3 **power cables**: 2 **USB-C to DC(12V)** from 2 **motor control board** and 1 **USB-C to USB-C** from **Rasberry Pi**, to the fast charging section of the power supply. Each slot provides up to 100W power when charging simultaneously, which is tested sufficient for 12V version operation.
### 🔋 Place the Battery 🛒
- Anywhere you like on the middle or lower level of the cart to maintain a low center of mass. The battery has an anti-slip bottom so it won't easily slide during normal operations.
- Maintain placed upright for safety.
- Just in case you also accidentally throw the battery manual away, [here it is](https://github.com/Vector-Wangel/XLeRobot/blob/main/others/Manual_Anker_SOLIX_C300_DC_Portable_Power_Station.pdf).
```{important}
In order to protect the motor control board, make sure to connect the power cables last. And always disconnect the power cables when plugging/unplugging other cables.
```
## 📸 Final Assembly
### Base into the Cart
```{important}
Complete all wiring and cable management for the top base and put the Raspberry Pi in its case before clamping the top base into the IKEA cart.
```

- Be careful not to break the case when you jam the IKEA cart edge into the case socket.
- For easier testing, the SO101 arms clamp directly onto the cart. Position the [arm bases](https://github.com/Vector-Wangel/XLeRobot/blob/main/3D_Models/3D_models_for_printing/XLeRobot_special/SO_5DOF_ARM100_Assemblybases.stl) at the two corners of the cart's top layer, then secure with clamps.
- Don't forget to put the bambulab filament cardboard spool inside to provide stable structural support if you have one.
After these steps, the XLeRobot should be physically well-built and ready to do some chores.


```{important}
Once XLeRobot is fully assembled, do not push it around like the IKEA cart, as this can damage the motor gears. Instead, lift the robot (~12kg) whenever you need to move it manually.
```
```{note}
Current form of the wheel connector is not strong, occasionally rescrewing the center screw may be needed.
```
### Optional Visual Upgrades
For better visual outlook, you can wear these parts to XLeRobot if you like.

- **Shells** for the Control board and the first joint for better protection and visual.
- You may need to take off the hand camera first before wearing the 2nd shell onto the arm.
- Sports sleeves to hide the cables and make XLeRobot more sleek.
