Skip to content
This repository has been archived by the owner on Feb 21, 2021. It is now read-only.

New VisualStates_py tool #902

Merged
merged 61 commits into from Oct 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
f2dc5d9
generate python code using jderobot comm interfaces
okanasik Jun 29, 2017
e8a21ca
copy new interfaces bash script to user binary directory
okanasik Jun 29, 2017
de859b4
Merge branch 'master' into visualHFSM_jderobot_comm
okanasik Jun 29, 2017
7926d34
adapt xmlparser
okanasik Jun 29, 2017
23c38e8
update getinterfaces.sh script for new comm framework
okanasik Jul 7, 2017
39430ca
creating gui, menu and visual states and transitions are created
okanasik Jul 15, 2017
4e61e86
name of the state and transition can be easily edited by double click…
okanasik Jul 16, 2017
8dcb21d
python code style changes such as using spaces instead of tabs
okanasik Jul 19, 2017
177960b
states control hierarchies by child states, we can remove all states …
okanasik Jul 19, 2017
d046b86
open saved xml file
okanasik Jul 19, 2017
f16c807
fixed bug when setting the position of the middle handle
okanasik Jul 23, 2017
57bd801
context menu for states are implemented for rename, code edit and mak…
okanasik Jul 23, 2017
63034ec
contextmenu remove state is implemented, contextmenu copy implemented
okanasik Jul 23, 2017
87be2ff
add logo to visual designer
okanasik Jul 26, 2017
1559c46
transitions are also removed when state is removed
okanasik Aug 4, 2017
4d99f45
transition context menu is added. new transition code dialog is added
okanasik Aug 5, 2017
042f62f
hierarchical state creation is added and graphics items are decoupled…
okanasik Aug 6, 2017
752c14f
save/read xml file of the hierarchical automata
okanasik Aug 7, 2017
68f5ad0
the sub automata of the selected state from treeview is displayed on …
okanasik Aug 7, 2017
71ce147
add timer dialog to change the time step duration
okanasik Aug 7, 2017
aadb3d2
config dialog is created and used to modify the configs
okanasik Aug 8, 2017
b0a2984
Merge branch 'master' into pyqt_refactoring
okanasik Aug 8, 2017
309bc2e
filemanager uses fullpath and can return a path and file name seperately
okanasik Aug 16, 2017
094ece9
state and transition indexes are set when a new automata is loaded
okanasik Aug 17, 2017
8fb4c61
configs and libraries are saved in the xml document
okanasik Aug 17, 2017
63b1626
single level automata is generated and tested for c++ and python
okanasik Aug 20, 2017
076c3a5
new python template is created. python code generator is modified for…
okanasik Aug 21, 2017
73657de
safe termination with ctrl+c
okanasik Aug 22, 2017
b36425f
first version python runtime gui is developed.
okanasik Aug 22, 2017
d34d28b
running state has green background in treeview
okanasik Aug 23, 2017
9dc31f3
python runtime gui is completed
okanasik Aug 23, 2017
2eba24c
runtimegui directory is moved. new c++ runtime is installed
okanasik Aug 27, 2017
a4aea3f
restructure python packages to be able to have consistent directory o…
okanasik Aug 28, 2017
51da2f0
ipc communication between python runtime gui and c++ behavior states
okanasik Aug 28, 2017
03bec2c
using qscintilla code editor
okanasik Aug 28, 2017
89d1437
merge from jderobot_comm
okanasik Aug 28, 2017
f414319
adding license term. remove unneccessary commented out codes
okanasik Aug 28, 2017
a8acac0
we use python2.7 because ROS is not compatiple with python3.
okanasik Aug 28, 2017
9819c29
small bug fixes
okanasik Aug 29, 2017
c03c524
the source path is fixed
okanasik Sep 11, 2017
e72a2b9
Merge branch 'master' into pyqt_refactoring
okanasik Sep 11, 2017
1be0170
fix problem when adding cpp functions and variables
okanasik Sep 12, 2017
490603c
merge from master
okanasik Sep 19, 2017
43776e1
add new configuration system to be able to handle pure ros node confi…
okanasik Sep 20, 2017
6aed2ab
config reading and writing implemented. ros generator is created but …
okanasik Sep 21, 2017
83d9850
fix code generation errors and link with runtime library
okanasik Sep 22, 2017
3fd0238
signal handling is added. when CTRL+C the program is terminated.
okanasik Sep 22, 2017
378ad74
install cmake command now will install for component visualStates_py
okanasik Sep 26, 2017
ba09260
python ros generation and changes for setting the interface from uppe…
okanasik Oct 1, 2017
a2d7981
generates package and cmake for python packages
okanasik Oct 3, 2017
8447a1e
do not include same type because of having two or more topics with sa…
okanasik Oct 3, 2017
57b467e
small bug in conditional transition is fixed
okanasik Oct 3, 2017
00eaf88
Merge branch 'master' into pyqt_refactoring
okanasik Oct 4, 2017
e242e15
small error about conditiontransition inheritance is fixed
okanasik Oct 4, 2017
c45f417
class name change is fixed
okanasik Oct 4, 2017
074cfa6
standalone ros package generation
okanasik Oct 4, 2017
06fe666
Merge branch 'master' into pyqt_refactoring
okanasik Oct 5, 2017
e3636bc
signal handler is added
okanasik Oct 5, 2017
3d7e019
integration with new yaml config and communication library
okanasik Oct 7, 2017
a31dddb
remove debug messages and add license terms if missing
okanasik Oct 8, 2017
267ff78
remove debug message
okanasik Oct 8, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/tools/visualHFSM/setup.sh
@@ -0,0 +1,24 @@
#!/bin/sh
#
# Copyright (c) 2016
# Author: Samuel Rey <samuel.rey.escudero@gmail.com>
# License: GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>

#C++ Dependencies
sudo mkdir /usr/local/include/jderobot/visualHFSM
sudo cp *.h /usr/local/include/jderobot/visualHFSM/
sudo mkdir /usr/local/include/jderobot/visualHFSM/popups
sudo cp popups/*.h /usr/local/include/jderobot/visualHFSM/popups/
sudo mkdir /usr/local/share/jderobot/glade/visualHFSM
sudo cp gui/* /usr/local/share/jderobot/glade/visualHFSM/
sudo cp getinterfaces.sh /usr/local/bin

#Python Dependencies
sudo mkdir /usr/local/share/jderobot/python/visualHFSM_py
sudo cp *.py /usr/local/share/jderobot/python/visualHFSM_py
sudo mkdir /usr/local/share/jderobot/python/visualHFSM_py/gui
sudo cp gui/*.py /usr/local/share/jderobot/python/visualHFSM_py/gui

sudo cp visualHFSM /usr/local/bin

echo "Dependencies installed"
15 changes: 1 addition & 14 deletions src/tools/visualStates/getinterfaces.sh
Expand Up @@ -23,18 +23,5 @@
*/
LICENSE

allInterfaces=`egrep -ri interface $1 | awk '{ if ($2 == "interface") print $1 $3 }' | sort`
for interface in $allInterfaces
do
class=`echo $interface | cut -f1 -d: | cut -f7 -d/ | cut -f1 -d.`
theInterface=`echo $interface | cut -f2 -d:`
i="$((${#theInterface}-1))"
last=${theInterface:$i:1}
if [ $last == "{" ]; then
echo "${theInterface%?} $class"
else
echo "$theInterface $class"
fi
done
egrep -ri Client $1 | awk '{ if ($2 == "class") {myindex=index($3,"Client"); print substr($3,1,myindex-1)" "tolower(substr($3,1,1))substr($3,2,length($3)-1); }}' | sort

exit 0
104 changes: 104 additions & 0 deletions src/tools/visualStates/gui/#edittransitioncode.glade#
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="dialog_code">
<property name="width_request">640</property>
<property name="height_request">480</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button_cancel">
<property name="label" translatable="yes">Cancel</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button_accept">
<property name="label" translatable="yes">Accept</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="frame_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;State code&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">button_cancel</action-widget>
<action-widget response="0">button_accept</action-widget>
</action-widgets>
</object>
</interface>
68 changes: 56 additions & 12 deletions src/tools/visualStates/gui/configfile.glade
Expand Up @@ -72,7 +72,7 @@
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
Expand All @@ -84,7 +84,30 @@
<property name="placeholder_text">Name</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_topic">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Topic</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_topic">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
<property name="placeholder_text">Topic</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
</packing>
</child>
Expand All @@ -97,7 +120,7 @@
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="left_attach">7</property>
<property name="top_attach">1</property>
</packing>
</child>
Expand All @@ -108,7 +131,7 @@
<property name="label" translatable="yes">Confirm</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="left_attach">7</property>
<property name="top_attach">0</property>
</packing>
</child>
Expand All @@ -119,7 +142,7 @@
<property name="label" translatable="yes">Interface</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="left_attach">6</property>
<property name="top_attach">0</property>
</packing>
</child>
Expand All @@ -130,7 +153,7 @@
<property name="label" translatable="yes">Port</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="left_attach">5</property>
<property name="top_attach">0</property>
</packing>
</child>
Expand All @@ -142,7 +165,7 @@
<property name="placeholder_text">Port</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="left_attach">5</property>
<property name="top_attach">1</property>
</packing>
</child>
Expand All @@ -153,7 +176,7 @@
<property name="label" translatable="yes">IP</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
</packing>
</child>
Expand All @@ -165,7 +188,7 @@
<property name="placeholder_text">IP</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="left_attach">4</property>
<property name="top_attach">1</property>
</packing>
</child>
Expand All @@ -176,7 +199,7 @@
<property name="label" translatable="yes">Proxy Name</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
</packing>
</child>
Expand All @@ -188,7 +211,7 @@
<property name="placeholder_text">Proxy Name</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="left_attach">3</property>
<property name="top_attach">1</property>
</packing>
</child>
Expand All @@ -199,7 +222,28 @@
<property name="model">liststore1</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="left_attach">6</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_serverType">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Server Type</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="combobox_serverType">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
Expand Down