ImportError from file to file of the same folder in ROS Noetic package

31 views Asked by At

I tried to start a semantic mapping script on python 3.8 in ROS Noetic on Ubuntu 20.04. The source folder is https://github.com/ExistentialRobotics/SSMI/tree/main
There are two files in the same folder:
semantic_sensor.py - to receive info from camera (rgb, depth, semantic) and via PCL (Point Cloud Library) make a SemanticPCLGenerator class
semantic_sensor_node.py - to take the class from semantic_sensor.py and make a semantic map
Both scripts may be found here (not to overload the message): https://github.com/ExistentialRobotics/SSMI/tree/main/SSMI-Mapping/scripts
When I start the ros package with this scripts I receive
process[semantic_cloud-1]: started with pid [51614] process[semantic_octomap-2]: started with pid [51615] [ INFO] [1701269714.376682262]: Semantic octomap generated! Traceback (most recent call last): File "/home/s/test_f/devel/lib/semantic_octomap/semantic_sensor_node.py", line 15, in <module> exec(compile(fh.read(), python_script, 'exec'), context) File "/home/s/test_f/src/SSMI-Mapping/scripts/semantic_sensor_node.py", line 17, in <module> from semantic_sensor import PointType, SemanticPclGenerator ImportError: cannot import name 'PointType' from 'semantic_sensor' (/home/s/test_f/devel/.private/semantic_octomap/lib/semantic_octomap/semantic_sensor.py) [semantic_cloud-1] process has died [pid 51614, exit code 1, cmd /home/s/test_f/devel/lib/semantic_octomap/semantic_sensor_node.py __name:=semantic_cloud __log:=/home/s/.ros/log/ffe73552-8ec6-11ee-8488-cfc925150467/semantic_cloud-1.log]. log file: /home/s/.ros/log/ffe73552-8ec6-11ee-8488-cfc925150467/semantic_cloud-1*.log


I've got a husky robot with realsense D435,got a topic with RGB, with Depth and added a Semantic topic with semantic NN, the topics are okey and the messages can be seen via RVIZ

I tried to start scripts without ros package, just run them manually. It seems to me, that scripts are working, althought, no map was generated. At least, I have not receive the mentioned above error.
Tried to add __init__.py in folder and ran as a ros a package - didn't help.
Tried to follow the ROS tutorial step-by-step from here - http://wiki.ros.org/rospy_tutorials/Tutorials/Makefile - didn't help.

0

There are 0 answers