RobotLabLTH / skiros2

A skill-based platform for ROS v.2
Other
163 stars 20 forks source link

GUI crashing when adding properties #24

Closed emmanuelkring closed 4 years ago

emmanuelkring commented 4 years ago

How to reproduce: Run any example you like that uses the GUI. Click on the plus to add an object to the scene. As type choose Location, as subtype choose TransformationPose and as individual choose new TransformationPose. This should give the following output:

SkirosWidget Create element based on skiros:TransformationPose [get_individual] error: Ignoring skiros:TransformationPose-rdfs:subClassOf-skiros:Location. Predicate is not defined in the ontology. SkirosWidget Added element owl:Class-33-TransformationPose to skiros:Scene-0

Now select the object and add a property like PositionX. The GUI then crashes and the following error message is printed:

setValues error: skiros:PositionX: Input <type 'unicode'> != <type 'float'>. Debug: skiros:PositionX:[] Service call failed: service [/wm/modify] responded with an error: error processing request: list index out of range Traceback (most recent call last): File "/home/emmanuel/rvmi_ws/src/libs/skiros2/skiros2/skiros2_gui/src/skiros2_gui/core/skiros_widget.py", line 681, in on_add_property_button_clicked self._wmi.update_element_properties(elem) File "/home/emmanuel/rvmi_ws/src/libs/skiros2/skiros2/skiros2_world_model/src/skiros2_world_model/ros/world_model_interface.py", line 230, in update_element_properties res = self._call(self._modify, msg) File "/home/emmanuel/rvmi_ws/src/libs/skiros2/skiros2/skiros2_world_model/src/skiros2_world_model/ros/ontology_interface.py", line 305, in _call raise WmException("Service call failed: %s" % e) skiros2_world_model.core.world_model_abstract_interface.WmException: Service call failed: service [/wm/modify] responded with an error: error processing request: list index out of range [skiros_gui-3] process has died [pid 22690, exit code -6, cmd /opt/ros/melodic/lib/rqt_gui/rqt_gui -s gui.skiros __name:=skiros_gui __log:=/home/emmanuel/.ros/log/44ef3bea-8985-11ea-be3b-a86daad6e8db/skiros_gui-3.log]. log file: /home/emmanuel/.ros/log/44ef3bea-8985-11ea-be3b-a86daad6e8db/skiros_gui-3*.log

emmanuelkring commented 4 years ago

A simpler way to reproduce this crash (or a similar one rather) is to open up the turtlesim example and adding an object with "Type = Agent" and "Individual = new Agent". Then click "ok".

Output:

SkirosWidget Create element based on sumo:Agent [get_individual] error: Ignoring sumo:Agent-rdfs:subClassOf-Nc430253a12844a09bc794cb00ee53782. Predicate is not defined in the ontology. [get_individual] error: Ignoring sumo:Agent-rdfs:subClassOf-sumo:Object. Predicate is not defined in the ontology. [ERROR] [1588631571.698589]: Error processing request: <class 'struct.error'>: 'argument for 's' must be a string' when writing 'Ndee4f61c8f954354b08a0166dc83a20f' ['Traceback (most recent call last):\n', ' File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 633, in _handle_request\n transport.send_message(response, self.seq)\n', ' File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/tcpros_base.py", line 668, in send_message\n serialize_message(self.write_buff, seq, msg)\n', ' File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/msg.py", line 152, in serialize_message\n msg.serialize(b)\n', ' File "/home/emmanuel/rvmi_ws/devel/lib/python2.7/dist-packages/skiros2_msgs/srv/_WmGet.py", line 720, in serialize\n except struct.error as se: self._check_types(struct.error("%s: \'%s\' when writing \'%s\'" % (type(se), str(se), str(locals().get(\'_x\', self)))))\n', ' File "/opt/ros/melodic/lib/python2.7/dist-packages/genpy/message.py", line 343, in _check_types\n raise SerializationError(str(exc))\n', "SerializationError: <class 'struct.error'>: 'argument for 's' must be a string' when writing 'Ndee4f61c8f954354b08a0166dc83a20f'\n"] Service call failed: service [/wm/get] responded with an error: error processing request: <class 'struct.error'>: 'argument for 's' must be a string' when writing 'Ndee4f61c8f954354b08a0166dc83a20f' Traceback (most recent call last): File "/home/emmanuel/rvmi_ws/src/libs/skiros2/skiros2/skiros2_gui/src/skiros2_gui/core/skiros_widget.py", line 646, in on_add_object_button_clicked elem = self._wmi.get_template_element(dialog.object) File "/home/emmanuel/rvmi_ws/src/libs/skiros2/skiros2/skiros2_world_model/src/skiros2_world_model/ros/world_model_interface.py", line 355, in get_template_element res = self._call(self._get, msg) File "/home/emmanuel/rvmi_ws/src/libs/skiros2/skiros2/skiros2_world_model/src/skiros2_world_model/ros/ontology_interface.py", line 305, in _call raise WmException("Service call failed: %s" % e) skiros2_world_model.core.world_model_abstract_interface.WmException: Service call failed: service [/wm/get] responded with an error: error processing request: <class 'struct.error'>: 'argument for 's' must be a string' when writing 'Ndee4f61c8f954354b08a0166dc83a20f' [skiros_gui-4] process has died [pid 1518, exit code -6, cmd /opt/ros/melodic/lib/rqt_gui/rqt_gui -s gui.skiros __name:=skiros_gui __log:=/home/emmanuel/.ros/log/2023fca2-8e57-11ea-a548-a86daad6e8db/skiros_gui-4.log]. log file: /home/emmanuel/.ros/log/2023fca2-8e57-11ea-a548-a86daad6e8db/skiros_gui-4*.log

frovida commented 4 years ago

Issues are fixed in devel branch