.. _acu-connection: How to connect to the ACU ========================= There are various reasons to connect to the ACU, e.g.: - Download recorded rosbags (SFTP) - Change parameters (preferably VSCode or SSH) - Record manual rosbags, e.g. for calibration (SSH) - Camera calibration (SSH + VNC) - and so on... This page will first explain how to connect to the ACU via Ethernet or WiFi. Then it will describe how to connect via - ssh - sftp - vnc - or VSCode .. _ethernet-connection: Connect to ACU via Ethernet or WiFi ----------------------------------- To be able to connect to via an useful protocol, first their needs to be a connection via Ethernet or WiFi to the ACU. Connect to ACU via Ehernet `````````````````````````` .. tab:: Ubuntu #. Click on the settings button under ``Settings / Network / Wired`` #. Edit your IPv4 settings (manuel): a. Adress: 192.168.201. b. Netmask: 255.255.0.0 c. Gateway: 192.168.201.1 d. DNS (if applicable / necessary): 192.168.201.1 #. Add the IP Adress of the ACU to the hostname file: .. code-block:: bash sudo sed -i.BAK "2i192.168.201.4 acu" /etc/hosts .. tab:: Windows 7 .. todo:: This needs to be added. Please orientate at the general approach for the other host systems, research how to do it and add it. .. tab:: Windows 10 .. todo:: This needs to be added. Please orientate at the general approach for the other host systems, research how to do it and add it. .. tab:: Windows 11 .. todo:: This needs to be added. Please orientate at the general approach for the other host systems, research how to do it and add it. .. tab:: Mac OS .. todo:: This needs to be added. Please orientate at the general approach for the other host systems, research how to do it and add it. Other IP Adresses in Ethernet Network ''''''''''''''''''''''''''''''''''''' .. _network-table: .. csv-table:: Network devices with IP Adresses in Ethernet Network :header: "Device", "IP Adress", "Username", "Password" :widths: 15, 20, 45, 45 "Switch", 192.168.201.1, "curemannheim", "curemannheim" "TCU", 192.168.201.2, "", "" "ACU", 192.168.201.4, "curemannheim", "curemannheim" "GPS", 192.168.201.5, "", "" "Lidar", 192.168.201.6, "", "" "ETAS", 192.168.217.100, "", "" .. _wifi-connection: Connect to ACU via WiFi ``````````````````````` #. Connect to the WiFi of the TCU: a. SSID: ``Emma``, Password: ``TCU!Emma2022`` #. Add the IP of the ACU to the hostname file: Linux and Mac OS: .. todo:: Research which IP the ACU has over WiFi .. todo:: Research how to add hostnames under Windows .. code-block:: bash :caption: Add the WiFi IP of the ACU to /etc/hosts sudo sed -i.BAK "2ixxx.xxx.xxx.xxx acu" /etc/hosts Connect via Protocol to ACU --------------------------- Prerequisites ````````````` Before you can connect via an Protocol to the ACU, you need to connect via WiFi or Ethernet. Also you should add the IP Address of the ACU and a respective hostname to the hostname file or your host OS. Both is described above. .. _ssh-connection: Connect via SSH to ACU `````````````````````` See the prerequisites above. #. Generate a ssh key pair if you haven't already: .. code-block:: bash ssh-keygen #. Copy your generated key file once to the ACU. Password: ``curemannheim`` .. code-block:: bash ssh-copy-id curemannheim@acu #. Connect to the ACU via ssh: .. code-block:: bash ssh curemannheim@acu .. _sftp-connection: Connect via SFTP to ACU ``````````````````````` There are multiple ways to connect via SFTP to a SFTP server, e.g. a CLI or GUI. We will focus on different GUIs for different host systems. Prerequisites: '''''''''''''' See the prerequisites above. Generate and copy a ssh key pair to the ACU, if you haven't already done so. Connect via SFTP to ACU via GUI ''''''''''''''''''''''''''''''' .. tab:: Ubuntu #. Open the file browser (nautilus) #. Click on ``Other locations`` in the sidebar at the bottom #. Enter ``sftp://curemannheim@acu`` as server address and connect. .. tab:: Windows .. todo:: Improve SFTP Documentation for Windows. #. Download and install `winSCP`_. Or any other SFTP GUI for windows that you might like. If there is anything better than winSCP don't hesistate to edit this tutorial since the author of this documentation is focused on Ubuntu. #. Setup the Connection to the ACU. Connect via SFTP to ACU via CLI ''''''''''''''''''''''''''''''' #. Open the command line of you host system and connect to the ACU via sftp: .. code-block:: bash sftp curemannheim@acu .. _vnc-connection: Connect via :term:`VNC` to ACU `````````````````````````````` VNC can be used to connect a virtual desktop via ethernet / wifi. See prerequisites above. Connection '''''''''' #. Connect to the ACU via SSH (see above). #. Start a vncserver over the SSH Connection .. code-block:: bash ./as_ros/utils/vnc.sh #. Start your local VNC client a. Ubuntu: e.g. remmina b. Windows: e.g. RealVNC c. Mac: [coming soon, please edit] #. Connect to the ACU via VNC: ``acu:5901``. ``curemannheim`` is the password. Or rather ``curemann``. Passwords are cut after 8 characters. Graphical User Interfaces within a docker container over VNC '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' If you want to open a graphical user interface from within a docker container, you have to do two things: #. Allow the docker container to access the desktop: Execute ``utils/xhost.sh`` outside the container within a terminal over the VNC session. #. Set the DISPLAY environment variable so that the correct display is used within the docker container bash session from where you want to start the graphical user interface. .. code-block:: bash export DISPLAY=:1 .. todo:: Check whether this is the right command. #. Start the GUI. .. _winSCP: https://winscp.net/eng/index.php Connect via :term:`VSCode` to ACU ````````````````````````````````` Prerequisites ''''''''''''' .. todo:: Link correct section for VSCode setup. #. You atleast have to install VSCode with the ``Remote - SSH`` Extension. It is recommended and assumed that you setup the VSCode as desribed in :ref:`vscode`. #. Generated ssh key pair and copied you ssh key pair to the ACU, see SSH Connection above. Connection '''''''''' #. Click on the ``Remote`` Extension (Display with ``><`` in a small circle) in the sidebar and choose ``Remote`` in the ``REMOTE EXPLORER`` dropdown at the top. #. Hover over ``SSH`` and add a new connection: ``ssh curemannheim@acu``. Choose the correct ssh key pair. #. Connect to the ssh connection within VSCode in the current or in a new window. This may take in some minutes when you connect for the first time (in a while). #. Open the workspace: a. Either open ``/home/curemannheim/as_ros`` b. Or install the ``Dev Containers`` extension and connect to the docker container as explained in :ref:`vscode-as-ros-container`.