Skip to content

sunrise_project_setup

Salvo Virga edited this page Jun 6, 2019 · 16 revisions

Your Sunrise Project with iiwa_stack

As you might know, to create and synchronize a Sunrise project onto the Sunrise Cabinet, you need to use Sunrise Workbench. That only officially works on Windows 7 😨, this part takes place in your favorite Windows 7 (virtual) machine and using Sunrise Workbench.
You will get Sunrise Workbench from KUKA with the installation media that come with the robot, you can get updated versions of it and the APIs asking KUKA.
We will not cover here how to install Sunrise Workbench and its modules, of which Servoing is required to install iiwa_stack.

Setup

  1. Within Sunrise Workbench, create a Sunrise project or load an existing one from the controller (default IP: 172.31.1.147).
  2. Open the StationSetup.cat file
  3. Select the Software tab
  4. Enable the Servo Motion packages, this is how that page should look like (more or less) : station
  5. Save and apply changes

Now you will need to add iiwa_stack (more precisely the content of iiwa_ros_java) to the Sunrise project.

You have two options:

  1. The correct one, useful for developers, it will let you track your changes in iiwa_stack with git.
  2. The lazy one, good for users that do not plan to change anything within iiwa_stack.

From now on, for simplicity, we will use two pseudo shell variables:
IIWA_STACK_DIR: the path to the root of the iiwa_stack project, you probably cloned it into this folder.
SUNRISE_PROJECT_DIR: the path to the root of your Sunrise project (somewhere in your file system under your Sunrise Workspace)

Remember, these are NOT real variables 😑, we use them just to shorten things, use the full path!

Option #1 - symlinks (changes will be tracked by git!)

  1. Run the command prompt (cmd.exe) as an administrator (press the Windows key --> type cmd --> right click --> run as an administrator).
  2. type cd $SUNRISE_PROJECT_DIR
  3. type mklink /D ROSJavaLib $IIWA_STACK_DIR\iiwa_ros_java\ROSJavaLib
  4. type cd src
  5. type mklink /D de $IIWA_STACK_DIR\iiwa_ros_java\src\de
  6. Inside Sunrise Workbench select all the files inside ROSJavaLib, right click and choose Build Path -> Add to Build Path...

Option #2 - lazy dude (changes will not be seen by git)

  1. Copy the content of $IIWA_STACK_DIR\iiwa_ros_java\src inside the src folder of the *Sunrise project.
  2. Copy the folder $IIWA_STACK_DIR\iiwa_ros_java\ROSJavaLib into the root of the Sunrise project.
  3. Inside Sunrise Workbench select all the files inside ROSJavaLib, right click and choose Build Path -> Add to Build Path...

Setup the ProcessData Configuration

In your Sunrise Project, open the file src/RoboticsAPI.data.xml and modify its content to

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<RoboticsAPIData version="3">
    <world>
        <gravitation x="0.0" y="0.0" z="9.81"/>
    </world>
    <processDataContainer>
        <processData dataType="java.lang.String" defaultValue="iiwa" displayName="Robot Name" editableOnHmi="true" id="robot_name" value="iiwa"/>
        <processData dataType="java.lang.String" defaultValue="172.31.1.150" displayName="ROS Master IP" editableOnHmi="true" id="master_ip" value="172.31.1.150"/>
        <processData dataType="java.lang.String" defaultValue="11311" displayName="ROS Master Port" editableOnHmi="false" id="master_port" value="11311"/>
        <processData dataType="java.lang.String" defaultValue="172.31.1.147" displayName="Robot IP" editableOnHmi="false" id="robot_ip" value="172.31.1.147" visibleOnHmi="false"/>
        <processData dataType="java.lang.Boolean" defaultValue="false" displayName="Enable NTP" editableOnHmi="true" id="ntp" value="false"/>
        <processData dataType="java.lang.Boolean" defaultValue="false" displayName="Enable Debug Output" editableOnHmi="true" id="debug" value="false"/>
    </processDataContainer>
</RoboticsAPIData>

This enables you to dynamically reconfigure some parameters that are used in the Sunrise Application without having to resynchronize it to the Sunrise Cabinet. These options will be available on the Process Data window of the SmartPad.

If your RoboticsAPI.data.xml file contains or will contain something else, adjust it accordingly to your needs maintaining the items above inside the processDataContainer field.

DONE

Whatever option you choose you should now have a Sunrise project without any error.
You can now install it (Station Setup -> Installation) and then synchronize it.

IMPORTANT

Have you already set your Safety Configuration? If not, you should! HERE we show how we set up ours.
Mind that every time you change your Safety Configuration you need to reinstall the project.