Skip to content

Setup (Orin)

manx52 edited this page Sep 6, 2024 · 2 revisions

Prerequisites

Device Minimum Requirements

  • 128 GB SSD NVME

Remove unnecessary packages

sudo apt-get -y purge chromium-browser thunderbird libreoffice* cuda-samples-10-2

# See disk size remaining
df -h

Verify CUDA on Jetson Orin

cd /usr/bin
sudo ./tegrastats

Install ROS and related Software

Look at Setup (ROS)

Running Instructions

Launching Natively

cd ~/catkin_ws
catkin build soccerbot
source ~/devel/setup.bash
roslaunch soccerbot soccerbot.multi.launch

Pull and Run the ARM image for Jetson Nano

docker login -u utrasoccer # Password dckr_pat_r8_EwMV7RmiYNG2VbnculJUqc1w
docker compose -f compose.yaml pull soccerbot_arm64
docker compose -f compose.yaml up soccerbot_arm64

MISC Setup

Add a Configuration for SFTP (Pycharm)

Under Pycharm > Settings > Build, Execution, Deployment, add a SSH connecction

  • Make sure the root path is /home/soccer or the user in the tx2
  • Under Mappings, make sure
    • local path is /home/user name/catkin_ws/src/soccerbot
    • Deployment path /catkin_ws/src/soccerbot
    • Leave web path blank

Now you can right click a file or directory > Deployment > Upload to device

Setup auto ssh on personal computer, this will make it so you don't need to enter the password every time
ssh-copy-id robot1@robot1_ip

Setup Automatic Hotspot

  • Turn off auto connect on other wifi and turn on hotspot autoconnect
sudo nmcli connection modify Techatronic connection.autoconnect no
sudo nmcli connection modify EuroExoticCar connection.autoconnect no
sudo nmcli connection modify Hotspot connection.autoconnect yes

Setup Automatic Connection to Hotspot

  • Create a bash file. sudo nano ~/hotspot.sh and add
#!/usr/bin/env bash
sudo nmcli connection up Hotspot
  • Give permission sudo chmod 755 ~/hotspot.sh

Setup Automatic Wifi

  • Create a bash file. sudo nano ~/wifi.sh and add
#!/usr/bin/env bash
sudo nmcli connection up Techatronic
  • Give permission sudo chmod 755 ~/wifi.sh

Setup Automatic Docker

  • Create a bash file. sudo nano ~/docker.sh and add
#!/usr/bin/env bash
cd ~/catkin_ws/src/evtol_software
docker compose -f compose.yaml up evtol_arm64
  • Give permission sudo chmod 755 ~/docker.sh

Setting up multi-computer system

Ground Station

address  | netmask       | gateway    |       DNS       |
10.0.0.1 | 255.255.255.0 | 192.168.1.1| 8.8.8.8,8.8.4.4 |

Orin

address  | netmask       | gateway    |       DNS       |
10.0.0.2 | 255.255.255.0 | 192.168.1.1| 8.8.8.8,8.8.4.4 |

Px4 6x

  • Verify that Orin and Ground station can communicate on the network.
  • Use ping 10.0.0.2 on RPI and ping 10.0.0.1 on Jetson

Other Instructions

  • Sometimes you need to source ~/.bashrc in a terminal to get it to work
  • To exit gazebo quicker run
# For noetic
sudo gedit /opt/ros/noetic/lib/python3/dist-packages/roslaunch/nodeprocess.py

change these 2 lines

_TIMEOUT_SIGINT  = 1.0 #seconds
_TIMEOUT_SIGTERM = 1.0 #seconds

updater

#!/usr/bin/env bash
cd ~/catkin_ws/src/evtol_software
git stash
git pull
git submodule sync
git submodule update --init --recursive
git-lfs pull
git submodule foreach git-lfs pull
docker compose -f compose.yaml build evtol_arm64

TODO need to do for ftp server

Clone this wiki locally