55
caesar_arm Documentation Release 1.0.0 Motiv Space System Inc. Mar 13, 2019

Release 1.0.0 Motiv Space System Inc

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Release 1.0.0 Motiv Space System Inc

caesar_arm DocumentationRelease 1.0.0

Motiv Space System Inc.

Mar 13, 2019

Page 2: Release 1.0.0 Motiv Space System Inc
Page 3: Release 1.0.0 Motiv Space System Inc

Contents:

1 Motiv CAESAR Documentation 3

2 Where to Begin 5

3 Creating a Virtual Machine 73.1 Set Up a New Virtual Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4 Installing the Motiv ROS Software Suite 154.1 Installing ROS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.2 Installing and Configuring EtherCAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164.3 Installing Motiv ROS Debians . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184.4 Building a Workspace with Motiv ROS Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194.5 Keeping Software Up-To-Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5 CAESAR Software Suite 235.1 Launching a Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.2 CAESAR Arm Quick Start Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

6 CAESAR Network Configuration 436.1 The User Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

7 Configuring CAESAR for LAN 457.1 CAESAR Config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457.2 Operator Config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

8 Hostnames Quick Ref 478.1 CAESAR Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478.2 Operator Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

9 Running the CAESAR Arm 499.1 Running Directly from the CAESAR computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499.2 Running Remotely via SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

10 Indices and Tables 51

i

Page 4: Release 1.0.0 Motiv Space System Inc

ii

Page 5: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

This is where installation and user instructions can be found for all CAESAR Arm software.

Contents: 1

Page 6: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

2 Contents:

Page 7: Release 1.0.0 Motiv Space System Inc

CHAPTER 1

Motiv CAESAR Documentation

The tutorials found in this documentation will instruct a user on how to install and run all software necessary forrunning the Motiv CAESAR Arm.

For questions please email — [email protected]

3

Page 8: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

4 Chapter 1. Motiv CAESAR Documentation

Page 9: Release 1.0.0 Motiv Space System Inc

CHAPTER 2

Where to Begin

The following set of tutorials will walk you through the installation and setup of Motiv ROS software. The processinvolves the following steps:

1. Setting up either a dedicated Linux (Ubuntu 16.04) Machine or VM.

2. Installing ROS

3. Installing and Configuring EtherCAT

4. Installing Motiv debian packages

5. Pulling the latest Motiv ROS repository

6. Building and Configuraing your workspace

5

Page 10: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

6 Chapter 2. Where to Begin

Page 11: Release 1.0.0 Motiv Space System Inc

CHAPTER 3

Creating a Virtual Machine

This tutorial will show you how to set up a virtual machine for running Motiv ROS packages.

First, download and install VirtualBox.

Next, download the ubuntu-16.04.3 iso. This file will be used to install ubuntu on the virtual machine.

3.1 Set Up a New Virtual Machine

These steps will walk you through the process of setting up a VM that will run Motiv and Craftsman software.

1. Start up VirtualBox Manager

2. Select New

7

Page 12: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

3. Enter a userful Name for your new VM

4. Under Type select Linux

5. Under Version select Ubuntu (64-bit)

6. Select Next

7. Allocate a minimum of 6GB (6000MB) to your VM and select Next. You can always adjust this setting later.

8 Chapter 3. Creating a Virtual Machine

Page 13: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

8. Select Create a virtual hard disk now and hit Create

9. When prompted, select VHD (Virtual Hard Disk) and select Next

3.1. Set Up a New Virtual Machine 9

Page 14: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

10. When prompted, select Fixed size and select Next

11. Allocate a mimimum of 30GB to your VM and select Create.

10 Chapter 3. Creating a Virtual Machine

Page 15: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

Note: Once created, it is difficult to resize the partition.

12. Once completed, select your newly created VM and hit Settings

13. Under Network -> Adapter 1 and set Attached to: to Bridged Adapter and select your network adapter underthe Name dropdown.

3.1. Set Up a New Virtual Machine 11

Page 16: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

14. Under Storage -> Controller:IDE select the Empty drive

15. On the right-hand panel, select the disk icon next to IDE Secondary Master and Choose Virtual Optical DiskFile

16. Navigate to and select your saved ubuntu-16.04.3-desktop-amd64 iso file. Click OK.

12 Chapter 3. Creating a Virtual Machine

Page 17: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

17. Start your virtual machine and follow the prompts to install ubuntu.

3.1. Set Up a New Virtual Machine 13

Page 18: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

14 Chapter 3. Creating a Virtual Machine

Page 19: Release 1.0.0 Motiv Space System Inc

CHAPTER 4

Installing the Motiv ROS Software Suite

Note: Be Aware of Ubuntu Version

The following suite requires the use of ROS Kinetic Kame which is compatable only with Ubuntu 16.04 (Xenial) and15.10 (Wily).

4.1 Installing ROS

This tutorial will walk you through installing ROS on your system.

4.1.1 ROS Installation Steps

1. Uncomment deb-src for “restricted”, “universe” and “multiverse” so that ros packages can be found by apt-getupdate

sudo gedit /etc/apt/sources.list

2. Add ROS to your sources list:

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

3. Add the necessary key

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

4. Apt-Get update with new ROS sources

15

Page 20: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

sudo apt-get update

5. Install ROS (and get yourself a coffee)

sudo apt-get install ros-kinetic-desktop-full

6. Use rosdep to install necessary dependencies

sudo rosdep initrosdep update

7. Setup your .bashrc file so that you can find installed ROS packages

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrcsource ~/.bashrc

4.1.2 Motiv ROS Required Packages

Install the following required packages to run with Motiv software

sudo apt-get install python-rosinstall python-rosinstall-generator python-→˓wstool build-essentialsudo apt-get install ros-kinetic-gazebo-ros-controlsudo apt-get install ros-kinetic-moveitsudo apt-get install ros-kinetic-robot-self-filtersudo apt-get install ros-kinetic-move-base ros-kinetic-move-base-msgssudo apt-get install ros-kinetic-industrial-msgs ros-kinetic-industrial-utilssudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers ros-→˓kinetic-rqt-controller-managersudo apt-get install ros-kinetic-trac-iksudo apt-get install python-pippip install --user pyassimp

4.2 Installing and Configuring EtherCAT

This tutorial will walk you through installing and configuring EtherCAT for use with Motiv ROS software.

4.2.1 Installation

1. Download the latest EtherCAT software

cd ~hg clone http://hg.code.sf.net/p/etherlabmaster/code ethercat-hg

2. Configure and build EtherCAT

sudo apt-get install autoconfcd ethercat-hg./bootstrap

./configure --with-linux-dir=/usr/src/linux-{your headers}/ --disable-8139too --→˓enable-generic --disable-eoe --enable-tool

16 Chapter 4. Installing the Motiv ROS Software Suite

Page 21: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

Note: Finding you Linux Headers

When running the ./configure command (above) you will need to insert the linux headers version on your par-ticular machine. To check what you have running:

uname -r

You can then copy the version number in place of {your headers}. As you type, press TAB to autocomplete thepath to make sure you have the corect version in place.

3. Install

Note: Editing cdev.c for Building EtherCAT libraries

Depending on your linux kernel the current version of EtherCAT may build with an error resulting from a callto an object’s member in ethercat-hg/master/cdev.c (line 277):

EC_MASTER_DBG(priv->cdev->master, 1, "Vma fault, virtual_address = %p,"" offset = %lu, page = %p\n", vmf->virtual_address, offset, page);

You will need to change the call from virtual_address to address:

EC_MASTER_DBG(priv->cdev->master, 1, "Vma fault, virtual_address = %p,"" offset = %lu, page = %p\n", vmf->address, offset, page);

make all modulessudo bashmake modules_install installdepmod -a

4.2.2 Configuration and Setup

1. Add and configure the necessary runfiles to your system:

cd ~/ethercat-hgsudo bashcp script/init.d/ethercat /etc/init.dchmod 755 /etc/init.d/ethercatln -s /opt/etherlab/bin/ethercat /usr/local/bin/ethercatmkdir /etc/sysconfigcp script/sysconfig/ethercat /etc/sysconfig

2. Modify some files

First, edit the ethercat file:

gedit /etc/sysconfig/ethercat

Add “generic” to the DEVICE_MODULES parameter following:

DEVICE_MODULES = "generic"

Next create and edit the file:

4.2. Installing and Configuring EtherCAT 17

Page 22: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

gedit /etc/udev/rules.d/98-ethercat

Add the following:

KERNEL=="EtherCAT[0-9]*" , MODE="0666"

3. Modify libc.conf so that Motiv ROS packages can find ethercat at runtime

sudo ldconfigsudo gedit /etc/ld.so.conf.d/libc.conf

Add the following line:

/opt/etherlab/lib

And run:

sudo ldconfig

Leave root:

exit

4. Restart EtherCAT

sudo /etc/init.d/ethercat restart

4.3 Installing Motiv ROS Debians

This tutorial will walk you through the installation of two Motiv ROS packages: ros-kinetic-ees ros-kinetic-motiv-limb

4.3.1 Setting Up AWS

First, you will need to set up AWS credentials for accessing the repositories:

1. Pull key files from bitbucket:

cd ~git clone https://bitbucket.org/motivrobotics/caesar-keys.git caesar-keys

2. Add the credentials file in your homespace:

cd ~/caesar-keyscat credentials | sudo tee -a /etc/apt/s3auth.conf

3. Now install the AWS software required for pulling from Motiv servers

sudo apt-get install apt-transport-s3

18 Chapter 4. Installing the Motiv ROS Software Suite

Page 23: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

4.3.2 Installing the Motiv Packages

1. The Motiv AWS keys are in your credentials file:

sudo gedit /etc/apt/s3auth.conf

2. Add the Motiv gpg key

cd ~/caesar-keyscat motiv-ros.key | sudo apt-key add -

3. Add the AWS bucket to your sources list:

echo 'deb s3://motiv-ros.s3.amazonaws.com/ stable main' | sudo tee -a /etc/→˓apt/sources.list.d/motiv-ros-core.list

4. Apt-Get Update to find all of the Motiv software

sudo apt-get update

5. Install the packages!

sudo apt-get install ros-kinetic-ees ros-kinetic-motiv-limb

4.4 Building a Workspace with Motiv ROS Software

This tutorial will cover pulling CAESAR software and building your workspace to run CAESAR Software.

4.4.1 Install Required Software

1. Install Git

sudo apt-get install git

2. Install tclreadline

sudo apt updatesudo apt install tcl-tclreadline

4.4.2 Set Up Your Workspace

1. Create a workspace

cd ~mkdir caesar-workspace

2. Pull from CAESAR-ROS

cd ./caesar-workspacegit clone https://bitbucket.org/motivrobotics/caesar-workspace.git srccd src/git clone https://bitbucket.org/motivrobotics/caesar-ros.git caesar-ros

4.4. Building a Workspace with Motiv ROS Software 19

Page 24: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

3. Misc Configs:

cd ~/caesar-workspace/src/touch hydro/CATKIN_IGNORE

4.4.3 Build All Packages

1. Install Catkin tools

sudo apt-get install python-catkin-tools python-rosdep rng-tools python-→˓pip dctrl-toolssudo pip install clint

2. Build the Gazebo Spring Plugin

cd ~/caesar-workspace/src/caesar-ros/src/cfspring_pluginmkdir buildcd ./buildcmake ../make

3. Config Build

source /opt/ros/kinetic/setup.bashcatkin config --init --no-install --no-extend

4. Build Workspace

cd ~/caesar-workspacerosdep updaterosdep install --from-path src --ignore-src -ycatkin build

5. Add source spaces to your ~/.bashrc file:

sudo gedit ~/.bashrc

Add the following lines to the bottom of the file

source /opt/ros/kinetic/setup.bashsource /usr/share/gazebo/setup.shsource $HOME/caesar-workspace/devel/setup.bashexport ROSCONSOLE_CONFIG_FILE=$HOME/caesar-workspace/src/motiv_metalaunch/→˓console.cfgexport GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:$HOME/caesar-workspace/→˓src/caesar-ros/src/cfspring_plugin/build

6. Source your newly created workspace:

source ~/.bashrc

4.5 Keeping Software Up-To-Date

This tutorial will instruct you on how to update both debian packages and your workspace.

20 Chapter 4. Installing the Motiv ROS Software Suite

Page 25: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

4.5.1 Updating CAESAR-ROS

The workspace is linked to the CAESAR-ROS repository. To see if anything has been updated, simply use the GITcommand:

cd ~/caesar_workspace/src/caesar-rosgit fetch origin master

Then check the status of the remote repository against what you have in your workspace:

git status

If you have local modifications, you will need to check them out or stash them before you can pull updates. To pullthe latest:

git pull origin master

Once your workspace has been updated, you will need to rebuild and resource the workspace to implement changes:

cd ~/caesar_workspacecatkin build

Note: Rebuilding the Workspace

Anytime you make changes to files in your workspace that need compiling (e.g. .cpp files), you will needto rebuild your workspace to implement these changes. It is also recommended if there are significantchanges to use catkin clean before catkin build.

Now resource your workspace in any open terminals so that you can find/use the newly compiled and built software:

source ~/.bashrc

4.5.2 Updating Debian Packages

You can run normal apt update, apt install commands:

sudo apt updatesudo apt install {debians}

The Motiv {debians} are: ros-kinetic-ees ros-kinetic-motiv-limb

4.5. Keeping Software Up-To-Date 21

Page 26: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

22 Chapter 4. Installing the Motiv ROS Software Suite

Page 27: Release 1.0.0 Motiv Space System Inc

CHAPTER 5

CAESAR Software Suite

This set of tutorials will get you started running the CAESAR Arm. It should be noted that there are slight differencesin the commands used between simulated software and software running on hardware.

Caution should be used when running this arm. Always have the physical ESTOP ready.

5.1 Launching a Simulation

The following tutorial will walk you through some example simulations using the CAESAR software suite. Thestep-by-step instructions will give you an introduction into how both simulation and real-time control of the robot areexecuted. More in-depth pages follow this tutorial.

5.1.1 A Basic Launch

This first walkthrough will load a model of the robot in RViz and launch the armctl GUI for robot control with orwithout hardware.

1. Copy the default.rviz configuration file from the workspace to the ~/.rviz directory:

cp ~/caesar-workspace/src/caesar-ros/rviz/caesar.rviz ~/.rviz/default.rviz

2. Navigate to the source directory of your workspace:

cd ~/caesar-workspace/src

3. Execute the run.py script:

python run.py caesar fake -c

4. RViz will come up with a model of CAESAR loaded and the armctl.py GUI will launch.

23

Page 28: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

5.1.2 Launch with Gazebo

This next example will walk you through launching the robot in RViz and in Gazebo with the armctl.py gui forsimulation purposes only.

1. Copy the default.rviz configuration file from the workspace to the ~/.rviz directory:

cp ~/caesar-workspace/src/caesar-ros/rviz/caesar.rviz ~/.rviz/default.rviz

2. Navigate to the source directory of your workspace:

cd ~/caesar-workspace/src

3. Execute the run.py script with the following configuration:

python run.py caesar gsim -gb -c

4. RViz and Gazebo will come up with a model of CAESAR loaded and the armctl.py GUI will launch.

5.1.3 Launching with Simulated Hardware Control

This next example will walk you through launching the robot with the RViz GUI and a simulated EtherCAT server.

24 Chapter 5. CAESAR Software Suite

Page 29: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

1. Navigate to the source directory of your workspace:

cd ~/caesar-workspace/src

2. Execute the run.py script with the following configuration:

python run.py caesar csim -c

3. RViz will come up with a model of CAESAR loaded and the armctl.py GUI will launch.

5.1.4 Running Simulations

With any of these simulations, you can now control the arm using either the Armctl Gui or the Motion Planning Tool.

5.2 CAESAR Arm Quick Start Tools

The following pages will walk you through the various controlling tools available in the CAESAR Software Suite.

5.2.1 RViz Panels

There are several panels in RViz that have utility in either running or visualizing data with respect to the robot. It isrecommended that you load the default.rviz configuration file as this comes with all RViz configurations for runningthe CAESAR arm. You can always add/remove utilities from your configurations file. To load, either:

• Go to File->Open Config and select ~/caesar_ws/src/default.rviz.

Note: This method will require setting up and saving your configuration

• Copy default.rviz to your .rviz directory:

cp ~/caesar_ws/src/caesar.rviz ~/.rviz/default.rviz

Note: This second method will load the rviz in a pre-configured state

A summary of each panel/utility is outlined below:

Displays

The displays panel is populated with different visualizations of data pertaining to the robot. For more information onthese visualizations visit the ROS RViz page.

5.2. CAESAR Arm Quick Start Tools 25

Page 30: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

A brief description of preloaded displays and what they do is listed below:

• RobotModel: A model of CAESAR built from the URDF that corresponds to the robot’s current(joint) state

• MotionPlanning: A transparent model similar to the RobotModel that will display planned motionsbefore they are executed.

• WrenchStamped: A visualization of the force and torque data coming from the sensor used on theend of the arm (only on physical robot, not in simulation).

5.2.2 The ESTOP Panel

There is an ESTOP panel available for both RViz and the armctl.py gui. This panel has two buttons: HALT! andReset/Enable. These act as virtual estops; an extended precautionary measure on top of a physical estop.

To add the ESTOP panel, select Panels at the top of the window.

26 Chapter 5. CAESAR Software Suite

Page 31: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

Under motiv_rviz_plugins, choose Software Halt|Reset.

5.2. CAESAR Arm Quick Start Tools 27

Page 32: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

Note: ESTOP and Executing ANY Motion

Before being able to execute any motion (either in simulation or on hardware) the Reset/Enable button must be toggledon either the RViz ESTOP panel or the armctl gui, otherwise motion will NOT execute. When the reset is selected, thebutton will highlight green, indicating that motion can be executed. If there is a fault, the button will highlight yellow.The HALT! button can be used to halt motion immediately (on hardware it is always recommended to use the physicalESTOP rather than the virtual one).

28 Chapter 5. CAESAR Software Suite

Page 33: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

5.2.3 The Force Torque Sensor Control Panel

The force torque sensor control panel for RViz visually displays the data received by the sensor in vectors and values.

Before being able to display any force/torque data (either in RViz or on hardware) the Enable button must be toggledon the FTSControl panel and the /force_torque topic must be selected in the WrenchStamped plugin.

FTSControl Panel

To add the FTSControl panel, select Panels at the top of the window.

5.2. CAESAR Arm Quick Start Tools 29

Page 34: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

Under motiv_rviz_plugins, choose FTSControl.

30 Chapter 5. CAESAR Software Suite

Page 35: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

WrenchStamped Panel

To add the WrenchStamped display, under rviz, choose WrenchStamped

5.2. CAESAR Arm Quick Start Tools 31

Page 36: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

5.2.4 Simulating the Compressible Link

The compressible link at the end of the arm contains a 200N constant force spring.

To simulate the link under various forces, right-click on the link and select Apply Force/Torque.

32 Chapter 5. CAESAR Software Suite

Page 37: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

Apply a force in the x-direction by inputting a force and hitting ENTER. The applied force gets latched and the linkreacts accordingly until the applied force changes.

Note that the constant spring applies reacting force only when either the pogo_end_link or SAS link have forces appliedto them.

5.2.5 Armctl.py GUI

The armctl.py gui is a an interface for executing joint level control, cartesian motion and scripting of motion sequences.

To launch:

1. You must have ROS running with either the real or simulated ethercat server and the CAESARmodel loaded

2. Run the follwing command

rosrun caesar armctl.py

The Joint Control Panel

The left-hand side panel of the armctl gui is used to control individual joints on the robot.

5.2. CAESAR Arm Quick Start Tools 33

Page 38: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

• The current position of each joint for the selected limb is shown on the panel:

34 Chapter 5. CAESAR Software Suite

Page 39: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

• You can manually enter a new position you wish to drive the joint to in the provided text box and hit ENTER.

• You can also jog each joint using the provided arrows in the panel and set the jog increment in the text box nextto jog.

Note: All Values in the Joint Control Panel are in Degrees

Cartesian Motion

The right-hand side panel of the armctl gui is used to perform cartesian motion of the end-effector about the xy-planeby selecting coordinates.

If the pose is valid, the motion will execute.

Running Sequences

It is also possible to script the commands you might use in the armctl gui into a canned sequence.

The field at the bottom of the panel is used to enter the file location of a sequence. The Run Sequence button willthen execute the script. The syntax for a script and an example is given below:

• path(“cartesian”) or path(“joint”) – set trajectory path mode

• limb(name) – select planning/control limb group

• joint(speed, pos, pos, . . . ) – absolute FK joint pose, speed = percent of max, pos = joint angles indegrees

• rjoint(speed, pos, pos, . . . ) – relative FK joint pose, speed = percent of max, pos = joint angles indegrees

5.2. CAESAR Arm Quick Start Tools 35

Page 40: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

• gjoint(group_name, speed, pos, pos, . . . ) – absolute joint pose for arbitrary group, speed = percentof max, pos = joint angles in degrees or “-” for (don’t change)

• base(speed, x, y, z, roll, pitch, yaw) – absolute IK/cartesian pose in base frame, speed = percent ofmax, x/y/z=tool position in meters, roll/pitch/yaw = tool orientation in degrees

• rbase(speed, x, y, z, roll, pitch, yaw) – relative IK/cartesian pose in base frame, speed = percent ofmax, x/y/z=tool position in meters, roll/pitch/yaw = tool orientation in degrees

• rtool(speed, x, y, z, roll, pitch, yaw) – relative IK/cartesian pose in tool frame, speed = percent ofmax, x/y/z=tool position in meters, roll/pitch/yaw = tool orientation in degrees

• wait(milliseconds) – pause sequence for fixed time

• wait() – wait for current motion to finish (otherwise a new pose interrupts the current motion)

• abort(string) - abort script with message

• msg(string) - display message in GUI status line, also print to stdout

The “Copy Pose” command button in the arm control GUI copies the current pose (as a “base” command)to the clipboard. “Copy Joints” copies the current joint state (as a “joint” command).

An Exception is raised if estop is active when a joint or pose command is requested. Unless caught witha try block, this aborts the script.

Currently, wait() (with no time value) makes the GUI (including ESTOP!) unresponsive during the motion.

Note: Example:

print "Example arm sequence"limb("Arm")path("joint")

joint(100, -30, -20, -20, 0, 0)wait()rjoint(100, 1.1, 2.2, 3.3, 0, 0)

base(50, 0, 0.1, 0, 0, 0)wait()rbase(50, 0, 0.0, 45, 0, 0)rtool(50, 0.0, -0.0, -.00, 0, 0)wait()

rtool(50, 0.0, -36.0, -.00, 0, 0)wait(100)rtool(50, 0.0, -0.0, -.02, -0, 0)

5.2.6 Motion Planning

RViz allows you to plan and execute on the arm by moving and reorienting the end-effector, shown below:

36 Chapter 5. CAESAR Software Suite

Page 41: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

To add the motion planner interface, select Add in the Displays tab and select MotionPlanning.

5.2. CAESAR Arm Quick Start Tools 37

Page 42: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

There are two methods to choosing a goal position for the arm.

In either method, the arm will highlight Orange if the pose is valid, otherwise a link with invalid collision will highlightRed.

You can select Plan in the Planning tab under the MotionPlanning interface. This will show you the planned motion

38 Chapter 5. CAESAR Software Suite

Page 43: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

for the arm before executing. You can then hit Execute to run the motion.

Interactive Marker

Once the interactive marker appears at the end-effector of the arm, you can translate/rotate along/about any axis.

Dragging one of the arrows available in 6-DOF will translate/rotate the end-effector along/about that axis.

To move the end-effector freely, check Allow Approx IK Solution.

5.2. CAESAR Arm Quick Start Tools 39

Page 44: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

Now you are ready to simply drag the center sphere to a desired location.

Select Goal State

You can choose a predefined position in the Planning tab under the MotionPlanning interface.

Note: Select Goal State

To learn more about defining your own goal state, see the ROS SRDF tutorials.

Consider the case of moving the arm from stow position to full extension.

In this example, the arm begins in its arm_stow position.

Under the Planning tab, click Select Goal State, choose arm_extend, and Update.

40 Chapter 5. CAESAR Software Suite

Page 45: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

Then, select Plan and Execute and watch as the arm swings into action.

Note: Motor Control

You can adjust the PID gains on each motorized joint in your /config/gazebo_controllers.yaml file.

5.2. CAESAR Arm Quick Start Tools 41

Page 46: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

42 Chapter 5. CAESAR Software Suite

Page 47: Release 1.0.0 Motiv Space System Inc

CHAPTER 6

CAESAR Network Configuration

This page will give you an overview of how the CAESAR computer is networked and how to appropriately access it.

6.1 The User Machine

In order to run software remotely, the user will need to SSH into the CAESAR computer and launch the necessarysoftware without a gui. Then, the user will need to launch all interface tools (RViz and the arm control gui) locally.

The user machine can connect to the CAESAR computer via two methods:

• Direct Ethernet Connection

• LAN Connection

All methods use static IPs for communication between the user and the CAESAR computer. This requires setting upconnections with Static IPs on the user machine.

The following table has the preconfigured IP addresses for connecting to CAESAR:

Subsystem Network IPs HostnameLAN Direct Ethernet LAN Direct Ethernet

CAESAR {caesar-lan} 10.42.2.1 caesar caesarOperator {user-lan} 10.42.2.2 operator_lan operator_eth

These IPs/hostnames should be in the /etc/hosts file on your operator machine:

#CAESAR10.42.2.1 caesar #Direct Ethernet{caesar-lan} caesar #LAN Bridge

#Operator IP(s)10.42.2.2 operator_eth #Direct Ethernet{user-lan} operator_lan #LAN

43

Page 48: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

The following section will show you how to add your LAN IPs to all machines.

44 Chapter 6. CAESAR Network Configuration

Page 49: Release 1.0.0 Motiv Space System Inc

CHAPTER 7

Configuring CAESAR for LAN

This tutorial will walk you through adding static IP to CAESAR for use on a private LAN.

For this tutorial, you will need 2 dedicated static IPs:

1. {caesar_lan_ip}

2. {operator_lan_ip}

Note: Operator IP The operator_lan_ip must be on both the CAESAR computer, along with all otheroperator IPs, in order for each machine to resolve the ROS_IP of the operator at runtime.

It is recommended to use relatively high values on your subnet (i.e. XXX.XXX.XXX.200 or higher).

7.1 CAESAR Config

First, add the {caesar_lan_ip} and caesar hostname, and the {operator_lan_ip} and operator_lan hostname to the/etc/hosts file:

$ sudo gedit /etc/hosts

{caesar_lan_ip} caesar{operator_lan_ip} operator_lan

Note: IP and Hostname

The syntax for adding a static ip to your hosts file is:

{ip} {hostname}

Restart networking:

45

Page 50: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

$ sudo /etc/init.d/networking restart

Note: You may lose connectivity, but will be able to reconnect.

To test the new IP, ping the new ip from your local machine while on the LAN network:

$ ping {caesar_lan_ip}

7.2 Operator Config

On the operator machine, add the {operator_lan} IP to your /etc/hosts file:

$ sudo gedit /etc/hosts

{operator_lan} operator_lan

You must also add this static ip, to the connection profile you are using to connect to LAN in the network manager ofyour system.

46 Chapter 7. Configuring CAESAR for LAN

Page 51: Release 1.0.0 Motiv Space System Inc

CHAPTER 8

Hostnames Quick Ref

This page has a quick reference for the hostnames/ips to include in both the /etc/hosts and ~/.bashrc files.

8.1 CAESAR Computer

8.1.1 /etc/hosts

10.42.2.2 operator_eth

8.2 Operator Computer

8.2.1 /etc/hosts

10.42.2.1 caesar10.42.2.2 operator_eth

8.2.2 ~/.bashrc

export ROS_MASTER_URI=http://caesar:11311export ROS_IP=operator_ethexport ROS_HOSTNAME=$ROS_IP

47

Page 52: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

48 Chapter 8. Hostnames Quick Ref

Page 53: Release 1.0.0 Motiv Space System Inc

CHAPTER 9

Running the CAESAR Arm

CAUTION should be used when running the CAESAR arm. Always have the physical ESTOP ready.

9.1 Running Directly from the CAESAR computer

To operate the arm when using the CAESAR computer directly, first navigate to the workspace:

cd ~/caesar-workspace/src

Then launch the run.py scripts with the appropriate parameters:

python run.py caesar rosc -c

9.2 Running Remotely via SSH

To operate the arm remotely, first ssh into the CAESAR computer via chosen networking method (e.g. direct ethernet):

ssh -X caesar

Then navigate to the caesar workspace in the ssh terminal:

cd ~/caesar-workspace/src

Run the run.py script with the appropriate parameters:

python run.py caesar rosc -gn -c

Note: Graphical Forwarding

49

Page 54: Release 1.0.0 Motiv Space System Inc

caesar_arm Documentation, Release 1.0.0

When running remotely, using graphical forwarding for operating the robot is NOT RECOMMENDED.There is significant lag as the interface is not designed to run smoothly over an ssh connection. Insteadthe master and core software components are run on the CAESAR computer, while graphical interfacesare launched on the operator computer.

In a new terminal on the operator station, run rviz:

rviz

50 Chapter 9. Running the CAESAR Arm

Page 55: Release 1.0.0 Motiv Space System Inc

CHAPTER 10

Indices and Tables

• genindex

• modindex

• search

51