Skip to content

Create GUI for configuring deployment#166

Merged
NadiaHG merged 7 commits into
ipa320:masterfrom
ipa-rwu:rwu/feature/deployment_interface
Nov 10, 2021
Merged

Create GUI for configuring deployment#166
NadiaHG merged 7 commits into
ipa320:masterfrom
ipa-rwu:rwu/feature/deployment_interface

Conversation

@ipa-rwu

@ipa-rwu ipa-rwu commented Oct 7, 2021

Copy link
Copy Markdown
Member

@ipa-nhg I created Gui for configuring deployment, including:

  • Support defining ROS distro
  • Support select ports, e.g. port for joystick

@NadiaHG NadiaHG left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me! 👍🏽
I like the idea of the plugin. But It is not working to me when I select a parameter, I think then it should appear a new pop-up windows to set the value but it ends with the following error:

 Caused by: java.lang.NullPointerException
	at de.fraunhofer.ipa.rossystem.deployment.GenerationHandler.get_component_port_value(GenerationHandler.java:161)
	at de.fraunhofer.ipa.rossystem.deployment.GenerationHandler.set_ports_from_parameters(GenerationHandler.java:128)

@NadiaHG

NadiaHG commented Oct 28, 2021

Copy link
Copy Markdown
Member

Error only appears if the selected parameter hasn't got a default value. Ideally the plugin will check that, say to the user that the value wasn't set during the design of the system and let him/her to set it "in the loop" for the docker-compose generation.

@ipa-rwu ipa-rwu force-pushed the rwu/feature/deployment_interface branch 2 times, most recently from 1303683 to e8c5f8d Compare October 28, 2021 10:52
@ipa-rwu

ipa-rwu commented Oct 28, 2021

Copy link
Copy Markdown
Member Author

Error only appears if the selected parameter hasn't got a default value. Ideally the plugin will check that, say to the user that the value wasn't set during the design of the system and let him/her to set it "in the loop" for the docker-compose generation.

I updated.

It will tell users: "Null. Didn't find value for this parameter. Please set a value in docker-compose.yml manually." in the pop-up windows.
And "Set a value for the port (port name): Set a value for the port (port name)" in docker-compose.yml

@NadiaHG

NadiaHG commented Oct 28, 2021

Copy link
Copy Markdown
Member

@ipa-rwu Thanks a lot for the update, now I don't get the error anymore but the text taken from the input is wrong, my generated docker.compose.yaml file looks:

version: "3.3"
networks:
  ros:
    driver: bridge
services:
  ros-master:
    image: ros:melodic-ros-core
    command: stdbuf -o L roscore
    networks:
      - ros

  demo:
    image: "demo:latest"
    depends_on:
      - ros-master
    environment:
      - "ROS_MASTER_URI=http://ros-master:11311"
      - "ROS_HOSTNAME=demo"
    networks:
      - ros
    devices:
      - "Set a value for the port (bluetooth_teleop/joy_node/dev):Set a value for the port (bluetooth_teleop/joy_node/dev)"
    command: stdbuf -o L roslaunch demo demo.launch --wait

@ipa-rwu

ipa-rwu commented Oct 28, 2021

Copy link
Copy Markdown
Member Author

@ipa-nhg
I want to give users some information about how to define devices and which parameter is attempted to use.

devices:
      - "Set a value for the port (bluetooth_teleop/joy_node/dev):Set a value for the port (bluetooth_teleop/joy_node/dev)"

But probably it is not so clear here.
Do you think if it shows the information below in docker-compose file is better?

devices:
      - "Didn't find value for parameter (bluetooth_teleop/joy_node/dev). Please set a value".

@ipa-rwu ipa-rwu force-pushed the rwu/feature/deployment_interface branch from e8c5f8d to f5113ab Compare October 29, 2021 12:57
@NadiaHG

NadiaHG commented Nov 4, 2021

Copy link
Copy Markdown
Member

In case the user doesn't want to select ports, because is not needed for the target system or because he/she prefers to set the permissions manually and not using parameters values, we have to also be able to generate the deployment artifacts. The current code is giving an error for this use case. @ipa-rwu Please review my suggestion here: ipa-rwu/ros-model#5

@NadiaHG NadiaHG linked an issue Nov 4, 2021 that may be closed by this pull request

@NadiaHG NadiaHG left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with a couple of types of system models and it works as expected! 👍🏽

Thanks a lot!

@NadiaHG NadiaHG merged commit 4f51f57 into ipa320:master Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assign hardware port to docker-compose file

2 participants