[Documentation] [TitleIndex] [WordIndex

Quick Start for Two Computers

These directions assume you purchased a Navigator™ or Navigator Elite™ system from Stanley Innovation. Two_Computers_preconfigured.png

Necessary Hardware

There's a script for that!

For the case where you have a RMPv3 Navigator or Navigator Elite from Stanley Innovation, we have generated a script you can use run on your remote PC to do the setup for you! If you prefer, instructions are below. Find the script here!

Install ROS Indigo on desktop computer

Perform these install steps on the computer responsible for human input and visualization.

1. Some assumptions about your Ubuntu Install

These instructions make the following assumptions about your Ubuntu 14.04LTS install. These are not hard and fast rules, however, the instructions assume these things. When asked during the install you should select the following:

  • username : si

  • computer name : SIDEV1

  • password : Welcome00

  • The SSH client and server are installed.
    • If not run the following commands:

sudo apt-get update
sudo apt-get install openssh-client
sudo apt-get install openssh-server

2. Setup your ROS sources.list

Setup your computer to accept software from packages.ros.org. ROS Indigo ONLY supports Saucy (13.10) and Trusty (14.04) for debian packages.

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

3. Set up your ROS keys

sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

4. ROS Installation

Make sure the Debian package is up to date:

sudo apt-get update
sudo apt-get install ros-indigo-desktop-full

5. Initialize rosdep

sudo rosdep init
rosdep update

6. Getting rosinstall

Rosinstall is a frequently used command-line tool in ROS that is distributed separately. It enables you to easily download many source trees for ROS packages with one command.

sudo apt-get install python-rosinstall

Install required packages

Connected to the internet run the following commands:

1. Install useful Linux utilities

These tools are useful for monitoring system processes, setting up networking, and setting up NTPD for the remote computer. They are not necessary but recommended.

sudo apt-get install iperf chrony htop bridge-utils

2. Install required ROS third party packages for segway_v3_robot

These are the packages that RMP V3 depends on:

sudo apt-get install ros-indigo-navigation ros-indigo-gmapping ros-indigo-robot-localization ros-indigo-yocs-cmd-vel-mux ros-indigo-joy ros-indigo-urg-node ros-indigo-lms1xx ros-indigo-pointgrey-camera-driver ros-indigo-cmake-modules ros-indigo-imu-tools daemontools openssh-server libpcap0.8-dev

3. Add yourself to the dialout group

This is necessary if you have serial, or serial-USB devices:

sudo adduser $USER dialout

Environment setup

Edit the local bash environment to add a few useful aliases

gedit ~/.bashrc

Add the following lines to the end of the file each provides a few shortcuts:

source /opt/ros/indigo/setup.bash
export LIBGL_ALWAYS_SOFTWARE=1
alias sws='source ./devel/setup.bash'
alias clean_backups='find ./ -name '*~' | xargs rm'
alias clean_pyc='find ./ -name '*.pyc' | xargs rm'
alias clean_rosbuild='rm -rf build devel install'

#change SIBOT1 to whatever you onboard PC name is
export ROBOT_PC_NAME=SIBOT1
export ROS_MASTER_URI=http://$ROBOT_PC_NAME:11311

# This is the IP of the remote desktop it set eth0 to whatever NIC your using to connect to the platform
# It grabs whatever IP is associated with that NIC
export ROS_IP=$(ip -4 address show eth0 | grep 'inet' | sed 's/.*inet \([0-9\.]\+\).*/\1/')

#change SIBOT1 to whatever you onboard PC name is
alias s1='ssh -X sibot@SIBOT1'

Now, make sure you close all terminals and open a new one to make the changes effective.

Setup Workspace

Create a workspace in your home directory.

mkdir -p ~/segway_remote_ws/src
cd ~/segway_remote_ws/src
catkin_init_workspace
cd ..
catkin_make

Download and install ROS software packages

cd ~/segway_remote_ws/src
git clone https://github.com/StanleyInnovation/segway_v3.git
git clone https://github.com/StanleyInnovation/segway_v3_desktop.git
git clone https://github.com/StanleyInnovation/segway_v3_simulator.git
git clone https://github.com/StanleyInnovation/segway_v3_network.git
cd ..
catkin_make

Network Setup

You need to set the network up for the connection to the robot PC. This is an outline and is intended to be a guide.

Please make sure you have completed the Robot Setup and that the system is powered on with the networking setup. If you purchased a Navigator package with integrated PC from Stanley Innovation, this will already be done for you.

1. Setup Wireless Router

To connect with the platform these instructions assume you will be using a wireless router. Instructions for our recommended wireless router are here Wireless Router

2. Local ROS Networking Configuration

The file that contains the relevant networking is

~/segway_remote_ws/src/segway_v3_network/segway_network_config.bash

This file is setup by default for the ROS master. In this case, the PC on the robot is the master. So we need to change:

export ROBOT_NETWORK=wlan0

to the network device associated with your wireless NIC and

export ROS_MASTER_IP=$ROS_IP

to

export ROS_MASTER_IP=SIBOT1

The contents of your file should now look like:

# Set this to whatever physical port you are using to communicate externally 
# (eg. eth0, eth1, wlan0,...etc)
export ROBOT_NETWORK=wlan0
export ROS_IP=$(ip -4 address show $ROBOT_NETWORK | grep 'inet' | sed 's/.*inet \([0-9\.]\+\).*/\1/')

# Set this to the IP address of the ROS master if it is this computer just 
# use ROS_IP defined above; if it is say the remote computer it would be 10.66.171.4
export ROS_MASTER_IP=SIBOT1 
export ROS_MASTER_URI=http://$ROS_MASTER_IP:11311/

3. Configure networking on desktop computer

  • Connect to the wireless network. If you purchased a Navigator package from Stanley Innovation, the SSID is

SIBOT_XXYYZZ

where XX is the day, YY is the month, and ZZ is the year that the router was configured.

  • The password is:

Welcome00
  • You can either use a static IP or just use the DHCP that was setup on the wireless router
    • DHCP is typically best
  • Make sure you can ping the wireless router

ping 10.66.171.1
  • And now make sure you can ping the Robot PC

ping 10.66.171.4

Setup Robot PC Name Resolution

  • We need to add the robot pc to our known hosts list so we can resolve it by name:

sudo gedit /etc/hosts
  • Add the following line:

10.66.171.4 SIBOT1
  • Save and close

Make sure you can ping the robot

From the terminal

ping sibot1

Setup an SHH connection

You need to be able to SSH into the robot PC here are some basic instructions

These are a quick review of the defaults because they affect this section directly:

  • Robot PC user name: sibot

  • Robot PC name: SIBOT1

  • Robot PC IP address: 10.66.171.4

  • Remote Desktop user name: si

  • Remote Desktop PC name: SIDEV1

  • password for both users: Welcome00

  • ssh port (standard): 22

1. Setup your SSH Keys

Open a terminal and create the RSA key pair:

ssh-keygen -t rsa

Once you have entered the Gen Key command, you will get a few more questions:

Enter file in which to save the key (/home/si/.ssh/id_rsa):

You can press enter here, saving the file to the user home (in this case, my example user is called si).

Enter passphrase (empty for no passphrase):

It's up to you whether you want to use a passphrase. The robot network generally isn't connected to public networks. Entering a passphrase does have its benefits: the security of a key, no matter how encrypted, still depends on the fact that it is not visible to anyone else. Should a passphrase-protected private key fall into an unauthorized users possession, they will be unable to log in to its associated accounts until they figure out the passphrase, buying the hacked user some extra time. The only downside, of course, to having a passphrase, is then having to type it in each time you use the Key Pair.

The entire key generation process looks like this:

ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/si/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/si/.ssh/id_rsa.
Your public key has been saved in /home/si/.ssh/id_rsa.pub.
The key fingerprint is:
4a:dd:0a:c6:35:4e:3f:ed:27:38:8c:74:44:4d:93:67 si@sidev1
The key's randomart image is:
+--[ RSA 2048]----+
|          .oo.   |
|         .  o.E  |
|        + .  o   |
|     . = = .     |
|      = S = .    |
|     o + = +     |
|      . o + o .  |
|           . o   |
|                 |
+-----------------+

2. Copy the public key

Once the key pair is generated, it's time to place the public key on the robot PC.

You can copy the public key into the new machine's authorized_keys file with the ssh-copy-id command. From the terminal:

ssh-copy-id sibot@SIBOT1

You should see something like this:

The authenticity of host '12.34.56.78 (12.34.56.78)' can't be established.
RSA key fingerprint is b1:2d:33:67:ce:35:4d:5f:f3:a8:cd:c0:c4:48:86:12.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.66.171.4' (RSA) to the list of known hosts.
sibot@SIBOT1's password:

Now enter the password you chose for the robot PC and you should see:

Now try logging into the machine, with "ssh 'sibot@SIBOT1'", and check in:

  ~/.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

You should now be able to ssh into the robot PC. Test it to make sure. From the terminal:

s1

At this point you should be able to successfully establish a connection with the robot computer. If not stop and troubleshoot the networking and the ssh connection.

You can now close the ssh connection with:

exit

Setup chrony

  • If you are going to be running ROS nodes on a remote computer it is a good idea to setup chrony to synchronize time between the machines
  • The onboard robot PC should ideally run the server
  • Specific directions for setting up chrony can be found online

Test the robot upstart service

  • SSH in:

s1

The default user password is Welcome00

  • Stop the service:

segstop
  • Start the service:

segstart
  • To make sure everything starts fine you can enter the following

 segchk
  • You can repeatedly enter this to view the latest status.
  • You should hear 2 beeps when the configuration server is initialized and 2 more when the platform is ready to accept commands.
  • The launch is time staged so it takes ~15 seconds to complete
  • Close the SSH connection:

exit

Test Visualization

  • Close all the terminals and open a fresh one
  • Start robot visualization:

cd ~/segway_remote_ws
sws
roslaunch segway_viz view_robot.launch
  • You should see your robot model come up and be able to see all the different sensors

Source Your Workspace

It is important to note that any time you open a new terminal, before running anything in ROS, you must browse to the appropriate workspace and source it. We have set up the alias "sws" for this purpose.

Reconfiguration GUI

  • Open another terminal

sws
rosrun rqt_reconfigure rqt_reconfigure
  • Expand Segway and mouse over the options to get a description
    • Make sure you understand what parameters do before changing them
  • Changes made here will not persist between power-up cycles. To make a change permenant you'll need to modify this file (or the one for your platform):

/segway_ws/src/segway_v3_robot/segway_bringup/launch/platform/config/RMP_220/segway_params.yaml
  • Note - The following parameters have to be changed in the above file because they require a power cycle to take effect. Changing them in the re-configuration gui will not affect performance:
    • tire_rolling_diameter_m, wheel_base_length_m, wheel_track_width_m,wheel_track_width_m

rqt

sws
rqt
  • If you are not familiar with RQT just click in the menu and select a few useful ones
    • Robots->Segway_RMP_V3

    • Visualization->RVIZ

    • Topics->Topic Monitor

    • Configuration->Dynamic Reconfigure

  • Experiment, play around with it etc.

Joystick setup

First make sure the switch in the top/back of your Logitech F710 or F310 controller is set to X, not D. Connect the controller to the remote computer. Install this lightweight joystick tester and run it.

sudo apt-get install jstest-gtk
jstest-gtk

You should get a pop-up window with your joystick information. Go ahead and double click on the correct one to open a window that gives feedback for all buttons and axes. Move the joysticks and press the buttons and verify that it works. Write down the /dev/input/jsX number.

1. Drive the system around

Making sure that js0 is replaced the the appropriate number as noted previously, enter:

sws
roslaunch segway_remote_teleop segway_remote_teleop.launch dev:=/dev/input/js0
  • Press the 'B' button to enter tractor mode the platform will beep to confirm
  • Hold the deadman switch (left trigger)
  • You should now be able to drive the platform around.
  • See the control mapping in the configuration files

    Joystick Information

Enjoy your newly configured remote PC with your RMP V3 by Stanley Innovation!


2024-11-09 12:59