Ubuntu System Flashing Process
Precautions
Please read the usage instructions and flashing documentation carefully. Starting the flashing process implies that you have read the following instructions. Any consequences that arise are the responsibility of the customer.
Flashing the system is an irreversible process; once the Ubuntu system is successfully installed, it is not possible to flash back to the original Yocto system.
The current version of the flash is a preliminary version intended for system replacement, with a limited number of built-in functional APIs as follows: ToF data, motion control functions; for future updates on other functional APIs, please pay attention to the official website of Moonshot Robotics.
Preparation Work
Hardware Preparation: The flashing cable that comes with TITA (with logo A facing outwards, insert into the DBG port, plug in the cable before powering on); an Ubuntu system computer. This operation requires downloading the flashing package to the computer (a Linux system is required), creating a new folder, and extracting the flashing package into the newly created folder.
0. sudo apt install abootimg binfmt-support binutils cpio cpp device-tree-compiler dosfstools
lbzip2 libxml2-utils nfs-kernel-server openssl python3-yaml qemu-user-static
sshpass udev uuid-runtime whois rsync zstd lz4 (in your computer system which to flash the robot)
1. Download apollo-ubuntu-${date}.tar (Download the system software package corresponding to the date)
2. mkdir apollo-ubuntu(You can create a folder at any location in your computer's system)
3. tar -xf apollo-ubuntu-${date}.tar -C apollo-ubuntu (Extract the system software package into the newly created folder)
Begin the flashing process.
Navigate into the folder you just created.
cd apollo-ubuntu
sudo ./flash_robot.sh Attention! Some Ubuntu systems may lack the sshpass and nfs-kernel-server plugins. If either is missing, install the one that is not present.
Termination Indicator
When the flashing is complete, you should see the following information:
And by entering the command lsusb
, you can see this information.
Connect TITA Robot System
You can use a USB 3.0 USB-Type C cable to insert into the “DBG” interface and use SSH commands to enter the robot system (Note! The Type C cable included with the package is for flashing and should not be used as a debugging cable).
ssh robot@192.168.42.1
password: apollo
How to connect WIFI
After flashing, you will need to download ROS packages and other dependencies, so you must first connect the robot to the network. Here is a tutorial on how to connect to the local WIFI:
First, run sudo vim /etc/wpa_supplicant/wpa_supplicant-nl80211-wlan0.conf
Modify the configuration to include your network’s SSID and password, like so: ssid=”WIFI name”; psk=”Password”
After making the changes, reboot the system with reboot
Once the robot restarts, it will automatically connect to the WIFI network you configured in the previous steps.
Install Dependencies
In the new system, to ensure that the ROS2 packages can run properly, you need to install the following dependencies:
Install ROS Dependencies
Open Terminal and input:
ssh robot@192.168.42.1
,Password:apollo
, connect RobotDownload ROS2 package:`sudo wget http://webdav:qwVNGwbCzjKRWFx0@61.145.190.130:10088/cdFile/ros2_deb/tita-ros2-20241227153817.deb
Execute
sudo apt-get update
to update the package sources.Execute
sudo dpkg -i tita-ros2-20241227153817.deb
. This installation will not succeed, but it will inform the system of the dependencies needed.Execute
sudo apt install -f
to download the required dependencies. Run the installation command again withsudo dpkg -i tita-ros2-20241227153817.deb
. If successful, the installation is complete.If you find it troublesome to copy each command separately, you can create a bash script from the following code and run it:
Setting up the ROS2 environment
If after the first flash you use ROS2 commands such as ros2 topic list
or ros2 service list
and there are no topics or services showing up, we need to set up the environment. Setting up the ROS2 environment requires manipulation of three files, which are ~/.bashrc
, local_setup.bash
, and tita-bringup.service
.
1. ~/.bashrc
Enter the following command:
sudo vim ~/.bashrc
After opening the
~/.bashrc
file, add the following two lines at the end:
export ROS_DOMAIN_ID=42
source /opt/ros/humble/setup.bash
After saving and exiting, you need to:
source ~/.bashrc
2. tita-bringip.service
enter
sudo vim /usr/lib/systemd/system/tita-bringup.service
Ensure that
ROS_DOMAIN_ID=42
, and changeROS_LOCALHOST_ONLY=1
toROS_LOCALHOST_ONLY=0
, as shown in the figure.After making the changes, save and exit.
3. local_setup.bash
Enter the command:
sudo vim /opt/ros/humble/local_setup.bash
Add the field
export ROS_DOMAIN_ID=42
at the end of the file.After setting up, save and exit, then execute
source local_setup.bash
.
4. selfcheck
If all the above operations are completed, you can execute
sudo systemctl restart tita-bringup.service
.After restarting the ROS2 service, you can enter
ros2 topic list
to check if the ROS2 topics on the machine are being printed, as shown in the figure.
Network Configuration
This network configuration is for the network allocation of the TITA Tower accessory, allowing you to assign a unique IP for use with the TITA Tower in coordination with the robot.
Install Dependencies
sudo apt install network-manager
sudo apt install systemd-networkd
After installing the dependencies, you need to clone the AutoNetworkManager repository:
git clone http://git.ddt.dev:9281/wuyunzhou/AutoNetworkManager.git
Install through the script provided by AutoNetworkManager.
cd AutoNetworkManager
chmod 777 install.sh
./install.sh
After completing the above steps, you should be able to see that eth0 has been automatically assigned an IP of 192.168.19.97
using the ifconfig
command, and you should be able to ping the default IP of the TITA Tower, which is 192.168.19.97
.
How to pair Controller
(Perform this operation in the robot) The latest robotic systems now come with built-in remote control pairing software, and there are two methods to quickly pair the remote control.
Note
For older system versions, you can contact the FAE to obtain the remote control pairing software installation package.
Method One
sudo dpkg -i crsf_deb.deb (If it is already included or installed, please skip this step.)
Execute the command
crsf-app -bind
, you can observe the return:
3. After powering on the remote control, push the button on the right side to the left to enter the interface, then press the buttons in sequence to go to
Tools -> ExpressLRS -> bind mode
for pairing the receiver.
4. Pairing completed, return “pair success”
Method Two
First, you need a dual-headed Type-C data cable, like this:
Connect the data cable to the EXT port on the robot and the data port on the remote control, like this:
Note
The robot and the controller must be powered on.
The remote control will display the
Select mode
interface, and select the third optionUSB Serial
.4.Wait patiently for the pairing. If the pairing is successful, the robot’s battery information will be displayed in the upper right corner of the remote control interface.