Skip to content

sunrise_project_setup

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

Set up your Sunrise Project

  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 : 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 could either:

  • Copy iiwa_ros_java into the Sunrise Project: (changes will not be seen by git)

    1. Copy the content of iiwa_stack/iiwa_ros_java/src inside the src folder.
    2. Copy the folder iiwa_stack/iiwa_ros_java/ROSJavaLib into the root of the project.
    3. Inside Sunrise Workbench select all the files inside ROSJavaLib, right click and choose Build Path -> Add to Build Path...
  • Create symlinks to iiwa_ros_java: (changes will be tracked by git!)

    1. Run the command prompt as an administrator (press windows key->type cmd->right click->run as an administrator).
    2. type cd \path\to\sunrise\project
    3. type mklink /D ROSJavaLib ..\relative\path\to\iiwa_stack\iiwa_ros_java\ROSJavaLib
    4. type cd src
    5. type mklink /D de ..\relative\path\to\iiwa_stack\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...

IMPORTANT
6. Have you already set your Safety Configuration? If not, you should! HERE we show how we set up ours.
7. Be sure the right master_ip is set in the config.txt file. See below.

Configuration File

From release 1.7.x, we introduced a configuration file that allows to easily set some parameters.
In the Java project you just created, you should have a config.txt file.

There you can set :

  • robot_name: name of your robot, by default iiwa. Read more about this HERE;
  • master_ip: IP of the ROSCORE machine you just set HERE, for example 160.69.69.100;
  • master_port: port for ROS communication, also set HERE, by default is 11311;
  • ntp_with_host: turns on/off the ntptimeprovider from ROSJava to sync the two machines. The default value is false, note that you need an NTP provider on the external machine if you want to set it to true.

Once you properly fill this file, everything is ready. There should be no red sign or problem found by the IDE. If this is a new project? Then you first need to Install it (Station Setup -> Installation) and then synchronize it.

Clone this wiki locally