Software Framework Setup

You are here:
< Back

0. Introduction

In this document we should detail the steps required to setup the different platforms we have such as:

  • Personal Laptops
  • Robot Platform [Jetson]

For now we will have the step-by-step process for software deployment here, but these will be wrapped up  into Ansible in the near future.

Currently we only have one workspace and that is for our Pumba-1 prototype.

1. Installation of Software Framework

1.1 Pumba Setup (developer computer)

  • Setup up your Bitbucket account
    • Go here to create your google account using the company email one.
    • Login into Bitbucket.
  • Add your SSH key into your bitbucket account. Focus on Linux installation Step 1 and 4. Whenever you are asked for a passphrase, press enter twice.
  • Download this script
  • Give permission for execution. For that go to the directory where the previous script was downloaded, i.e. ~/Downloads.
$ cd ~/Downloads
$ chmod +x cm_setup
  • Execute the script in the same downloaded directory
$ ./cm_setup

Note: This script installs and prepare all the environment needed for development. Whenever it’s run some alias are defined, go to section 1.1.1 for further information.

  • Catkin build the pumba workspace
$ pumba
$ cd ..
$ catkin b 

Go to 3rd Party software installation section if you have any build errors

$ spumba
  • Now it is ready for testing. For that you can run the simulation environment.
$ pumba_simulation

Note: The only robot that works now is waffle as it’s the most similar to the one we will use (sensor and shape related).

Link for Jetson setup script

1.1.1 Alias

Whenever the setup script is executed, some alias are defined. Here you can find all of them and their explanation.

  • pumba: (cd ~/cm_robotics_ros/pumba/src) Goes to the source folder of the pumba workspace.
  • spumba: (source ~/cm_robotics_ros/pumba/devel/setup.bash) Sources the pumba workspace. You should use this before you want to use any ROS feature (roslaunch, rosrun, roscd, etc.) for every new terminal you open.
  • pumba_update: (cd ~/cm_robotics_ros/pumba && git remote update && cd ~/.cmr_setup && ./pumba_update && pumba) Updates the pumba project git repositories. Use it to get the newest released features.
  • pumba_simulation: (spumba && roslaunch pumba_capabilities_bringup pumba_capabilities_bringup_simulation.launch) Runs the simulation environment.
  • pumba_hardware: (spumba && roslaunch pumba_capabilities_bringup pumba_capabilities_bringup_hardware.launch) Runs the real robot environment.

2. Network Configuration

2.1 SSH

2.1.1 Remote Access to Pumba computer

  • Create a file in the .ssh folder called authroized_keys, if one is not already created.
  • Copy and paste your public ssh key at the bottom of the file.
  • Write in terminal: ssh pumba@pumba-1.local

2.1.2 Remote Access to Pumba folders

  • In your own computer, open your file explorer window.
  • In the left tabs, click “Connect to server”
  • In the server address text box (in the window that just pop-up) write: “sftp://pumba@pumba-1.local”, and click connect.

2.2 Remote Access to Roscore

The .bashrc file needs to be edited on both your personal computer and the on the robot (server). This is so that you can display graphical interfaces on your PC.

Add the following:

  • Personal Computer:
  • Robot:
    • export ROS_IP=pumba-1.local

3. Interfacing with Hardware

3.1 CAN Communication

The Jetson platform uses

3.2 …

4. 3rd Party Software

4.1 Intel Realsense 3D Cameras

The methods for installing and configuring the software for the Intel Realsense 3D cameras are slightly different for the Jetson and your personal computers.

4.1.1 Personal Laptop Configuration

  • Register the server’s public key.
$ sudo apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C8B3A55A6F3EFCDE
  • Add the server to the list of repositories :
$ sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u
  • When upgrading, remove the old records
$ sudo rm -f /etc/apt/sources.list.d/realsense-public.list.
$ sudo apt-get update.
  • In order to run demos install:
$ sudo apt-get install librealsense2-dkms
$ sudo apt-get install librealsense2-utils

The above two lines will deploy librealsense2 udev rules, build and activate kernel modules, runtime library and executable demos and tools.

  • Install additional development packages:
$ sudo apt-get install librealsense2-dev
$ sudo apt-get install librealsense2-db
  • Reconnect the Intel RealSense depth camera and run: realsense-viewer to verify the installation.

4.1.2 Jetson Configuration

4.2 Hokuyo 2D Safety Lasers Scanner

IP: 192.168.0.42

Subnetmask 255.255.255.0

gateway 192.168.0.1

Edit wireless connection. IPV4-> Routes -> Use only for resources of its network.

4.3 Xbox One controller on PC

Follow the next lines for installation

$ sudo apt-get install dkms 
$ sudo git clone https://github.com/paroj/xpad.git /usr/src/xpad-0.4 
$ sudo dkms install -m xpad -v 0.4

Note: you will be asked here to enable secure boot by entering a password

$ sudo modprobe xpad

Restart your PC, it will appear the secure boot screen, select the second option (MOK key) and enter the password you defined previously. Connect the controller and it should light.

For moving it, you should hold RB button while moving the left stick.

5. Jetson

5.1 Updating Firmware [if required]

Firmware update can be done by downloading JetPack HERE. The minimum requirement that you need for the firmware update is the:

  • File System and OS
  • Drivers
  • Flash OS Image to Target

Follow instructions once you run the software.

WARNING!!! All files will be deleted from the PC once this is done, so backup required files

5.2 Kernel Configuration

5.2.1 Software Version

Firmware version:

$ head -n 1 /etc/nv_tegra_release

E.g. R28 (release), REVISION: 1.0, GCID: 9436269, BOARD: t186ref, EABI: aarch64, DATE: Fri Jul 28 17:04:29 UTC 2017

Kernel version:

$ uname -r

E.g. 4.4.38-tegra

5.2.2 Kernel Configuration

Download kernel source from https://github.com/jetsonhacks/buildJetsonTX2Kernel. Make sure that the kernel version matches the firmware version.

Put kernel into high performance mode [ we should test this see what the difference is]:

$ sudo nvpmodel -m 0
$ git clone https://github.com/jetsonhacks/buildJetsonTX2Kernel
$ cd buildJetsonTX2Kernel

If you are configuring it straight from the Jetson, using a screen, then you can run the following command:

$ ./getKernelSources.sh

6. Website

6.1 Setup

6.2 Content Management

7. ROS Intro

Sensor

8. System Checks for Exhibitions

8.1 Connect to wifi using commnad line -ubuntu

  • List all possible wifi conenctions:
$ nmcli d wifi list
  • Connect to specific wifi network:
$ nmcli device wifi connect <name> password <password>