-
Notifications
You must be signed in to change notification settings - Fork 249
sunrise_project_setup
- Create a Sunrise project, or load an existing one from the controller (do not create a new RoboticApplication)
- Open the StationSetup.cat file
- Select the Software tab
- Enable the Servo Motion packages, this is how that page should look like :
- Save and apply changes
- Browse to the location of the folder iiwa_stack/iiwa_ros_java/src and copy its content (the folder de)
- Select the folder src of the Sunrise Project in Sunrise Workbench and paste what you just copied
- Browse to the location of the folder iiwa_stack/iiwa_ros_java and copy the folder ROSJavaLib
- Select the Sunrise Project in Sunrise Workbench and paste what you just copied.
- In your project, you should now see this :
- Inside Sunrise Workbench select all the files inside ROSJavaLib, right click and choose Build Path -> Add to Build Path...
❗ IMPORTANT ❗ - Have you already set your Safety Configuration? If not, you should! HERE we show how we set up ours.
- Be sure the right master_ip is set in the config.txt file. See below.
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 a 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 synchronise it.
With this setup extending the Java side of iiwa_stack is not optimal, we just copied everything out of the git directory so every change done in Sunrise Workbench won't be seen.
A better idea would be to make an additional Java Project that uses the Java code as external source, the ROSJavaLib and the KUKAJavaLib files as external libraries (Configure Build Path...-> Source->Link Source and Libraries->Add External JARs, respectively), including then this Java Project into the Sunrise Project(Configure Build Path...->Projects->Add).
This way the source code will be only linked to the project but still physically in the git folder, unfortunately this seems to generate a good set of senseless and not really informative errors from Sunrise Workbench when trying to synchronise the project, therefore we have to live like this for the moment :(