Quick-Start
===========

..  .. image:: media/low/flexible_joints.gif
..     :width: 32.5%
..     :alt:   FlexibleJoints

..  .. image:: media/low/squats.gif
..     :width: 32.5%
..     :alt:   Squats

..  .. image:: media/low/roll.gif
..     :width: 32.5%
..     :alt:   Roll   


Quadruped Robotics Europe is a young, but fast growing startup in the
field of legged robotics. In this documentation, the software overview
of GO1 robot is shown. The software is currently under development.
At the moment simples ros drivers are available for the robot along with 
simulation are available in Gazebo.


As several variants of GO1 are provided with different hardware versions, the following video
demonstrates operation of the software development kit 
`GO1 Operation <https://www.youtube.com/watch?v=tTCbdul7xsc&list=PLGhHq8nB_7DWfHPrebqciLoCWMKQAO-6j&index=4>`__ 
for the GO1.

Quick-Start Teleop
------------------

A pre-configured GO1 can start its navigation via the following commands:


.. attention:: 

   Note that the current navigation utilizes unitrees innate controller and it does not
   currently perform terrain adaptibility. For that low-level-mode is required which is
   under development.


- Launch High-level driver (LAN)

 .. code-block:: bash

   sudo su  
   source catkin_ws/devel/setup.bash
   roslaunch go1_bringup bringup.launch

- Launch teleop

 .. code-block:: bash

   rosrun teleop_twist_keyboard teleop_twist_keyboard.py

Low-level Mode
--------------

- Launch Low-level driver (LAN)

 .. code-block:: bash

   sudo su  
   source catkin_ws/devel/setup.bash
   roslaunch go1_base base.launch working_mode:=low_level target_ip:=192.168.123.10 target_port:=8007 local_port:=8090 

Quick-Start Autonomous Navigation
---------------------------------

 A pre-configured GO1 can start its navigation via the following commands:

.. attention::

   Note that the current navigation utilizes unitrees innate controller and it does not
   currently perform terrain adaptibility. For that low-level-mode is required which is
   under development.


1. Launch High-level driver (LAN)


 .. code-block:: bash

   sudo su  
   source catkin_ws/devel/setup.bash
   roslaunch go1_base base.launch working_mode:=high_level target_ip:=192.168.123.161 target_port:=8082 local_port:=8090 

.. note::

   Odom is published by the driver but more sources of odom can be fused such as visual odometry 
   which we generally provide with the Zed2i camera. Incase you need to perform odometry 
   calculation with another camera `VINS_Fusion <https://github.com/HKUST-Aerial-Robotics/VINS-Fusion>`__ 
   is a good software to use.


2. Launch navigation driver

 .. code-block:: bash

    roslaunch go1_navigation go1_navigation.launch

 Now it is possible to give the robot navigation goals via movebase. This works only on high-level mode.

3. Launch visualizer

 .. code-block:: bash

    roslaunch go1_viz view_robot.launch

You can now add point clouds and the raw_rgb_image to view the streamed data. 

.. _Networking:

Network-Setup
=============

- To create a static connection in your own PC, in Ubuntu go to ``Settings`` → ``Network`` then click on ``+`` icon and create a new connection.

   1. The first task is to go to ``IPv4`` and change the connection to ``Manual``.

   2. The second task is to put the Address IP as ``192.168.123.51`` and the Netmask as ``24``.

- Click save and restart your network. Next is to connect the LAN cable to the robot.

- After a successful connection, the host's local IP can be checked by:

.. code:: bash

   ifconfig

This should show the host IP which was assigned in the above step. Now its time to check if we can ping the robot or not, to do so type in your host pc

.. code:: bash

   ping 192.168.123.161

After a successful ping, you can access the robot.


Network-Connection
------------------

The GO1 has multiple networks and vary slightly, the following table shows the networks

.. table:: GO1 network devices

   =================     ================  ========
   Device                Network Address   Password
   =================     ================  ========
   GO1-pi                192.168.123.161   123
   GO1-pi (WiFi)         192.168.12.1      123
   GO1-nvidia (Head)     192.168.123.13    123
   GO1-nvidia (Body)     192.168.123.14    123
   GO1-nvidia (Body)     192.168.123.15    123
   GO1-MCU               192.168.123.10    N/A
   =================     ================  ========

Hotspot
~~~~~~~

GO1 has its own native hot-spot to which users can connect as well as an Ethernet port to access its on-board computers. 
Moreover, GO1 has the network address range of ``192.168.123.*``. 

The SSID of the Wifi network  of GO1's hot-spot begins with **UnitreeRoboticsGO1-000**, 
where the 000 represent the GO1's model number and the default password is ``00000000`` or 8 zeros.

Once connected to the WiFi network, one can access GO1's main pc ip address ``192.168.12.1``. 
To achieve this enter the command terminal of the computer that has connected to the WiFi hot-spot 
of the robot and enter the following: 

- To connect with the on-board PC (WiFi):

.. code-block:: bash

   ssh -X pi@192.168.12.1
   123

- To connect with the on-board PC (LAN):

.. code-block:: bash

   ssh -X pi@192.168.12.1
   123

- To connect with the nvidia1 (LAN):

.. code-block:: bash

   ssh -X unitree@192.168.123.13
   123

- To connect with the nvidia2 (LAN):

.. code-block:: bash

   ssh -X unitree@192.168.123.14
   123

- To connect with the nvidia3 (LAN):

.. code-block:: bash

   ssh -X unitree@192.168.123.15
   123