JdeRobot / RoboticsApplicationManager

Robotic applications lifecycle management
3 stars 12 forks source link

RAM is not able to unzip a zip file containing .xml and .weights files. #46

Closed siddheshsingh26 closed 1 year ago

siddheshsingh26 commented 1 year ago

So basically i am working on building a webpage using Robotics Infrastructure and RAM in which i am taking a user input through a zip file . The zip file will contain .xml and .weights files which are needed to run the main.py . Below are the screenshots of the zips: XML: Screenshot from 2023-07-10 21-04-15

weights: In this by removing the .weights file the RAM is able to unzip remaining 3 files Screenshot from 2023-07-10 21-04-59

Error :

  File "/RoboticsAcademy/src/manager/manager/launcher/launcher_ros_api.py", line 57, in wait_for_shutdown
    start_time = rospy.Time.now().to_sec()
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/rostime.py", line 155, in now
    return get_rostime()
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/rostime.py", line 190, in get_rostime
    raise rospy.exceptions.ROSInitException("time is not initialized. Have you called init_node()?")
rospy.exceptions.ROSInitException: time is not initialized. Have you called init_node()?
ReyDoran commented 1 year ago

Hi, I was able to run a simple program using an xml file sent in the zip file. These are the contents of main.py and test.xml:

import xml.etree.ElementTree as ET
def read_xml(filename):
    tree = ET.parse(filename)
    root = tree.getroot()
    for element in root.iter():
        if element.text:
            print(element.text)
xml_file = "/workspace/code/test.xml"
read_xml(xml_file)
<data>
  <person>
    <name>John Doe</name>
    <age>30</age>
    <city>New York</city>
  </person>
  <person>
    <name>Jane Smith</name>
    <age>25</age>
    <city>Los Angeles</city>
  </person>
</data>

However, when running the Edge_face_detector.zip I found another problem. The manager is able to find the python files and modules in the workspace using relative paths, but any other file is only found with absolute paths. I'm creating an issue and solving it now, please try again with this patch or using absolute paths