Robotics StackExchange | Archived questions

rqt_publisher Segmentation Failure - ROS - kinetic

Hi everyone, I am trying to execute rqt_publisher rqt_publisher command, however, it is not working. Detail: It is the only app (functionality) from rqt which is not working. I could not fix this issue alone. I tried to uninstall python libraries, reinstall ros-kinetic-desktop full, update and upgrade, but it still keeping the same error... I am using ROS-kinetic in ubuntu 16.04. The error is below:

Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_publisher/publisher_widget.py", line 105, in _update_thread_run
    message_class = roslib.message.get_message_class(base_type_str)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/message.py", line 99, in get_message_class
    cls = genpy.message.get_message_class(message_type, reload_on_error=reload_on_error)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 624, in get_message_class
    cls = _get_message_or_service_class('msg', message_type, reload_on_error=reload_on_error)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/genpy/message.py", line 575, in _get_message_or_service_class
    pypkg = __import__('%s.%s' % (package, type_str))
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/autoware_map_msgs/msg/__init__.py", line 7, in <module>
    from ._LaneChangeRelation import *
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/autoware_map_msgs/msg/_LaneChangeRelation.py", line 33
    None = 0
SyntaxError: cannot assign to None
QObject::~QObject: Timers cannot be stopped from another thread
Segmentation failuere (core image stored)
marcus@marcus-Aspire-VX5-591G:~$ 

Thanks

Asked by Vini71 on 2020-01-27 09:12:26 UTC

Comments

This is unrelated to Autoware so please remove that tag.

Asked by Josh Whitley on 2020-01-27 16:15:58 UTC

Please see the answer below why the current problem is in the autoware package.

Asked by Dirk Thomas on 2020-01-27 16:29:18 UTC

Aaaaaah, gotcha. Thanks for the clarification.

Asked by Josh Whitley on 2020-01-27 16:40:13 UTC

Answers

The problem is in the last file of the stacktrace (_LaneChangeRelation.py:33) which contains the following line:

None = 0

Since None can't be assigned to in Python this code fails with a SyntaxError.

The reason is that the message definition uses None as the name of a constant which doesn't work in Python: https://gitlab.com/autowarefoundation/autoware.ai/messages/blob/2cb6f9f6bdcfa52b512c53169da696737935a17c/autoware_map_msgs/msg/LaneChangeRelation.msg#L5

Since there is no automatic mangling to avoid the collision with language specific keywords I would suggest to file a ticket in the repo defining the message.

Asked by Dirk Thomas on 2020-01-27 14:53:25 UTC

Comments

Thanks @Dirk Thomas I did not know where to find the file you talked above in order to change the code... what I have done was removing all files which were installed regarding AUTOWARE. I did not remember that I have installed some plugins from Autoware...because my idea is working with it in the future, not now...but then...if I reinstall Autoware, am I going to have this issue again?

Asked by Vini71 on 2020-01-28 10:44:03 UTC

Yes, until it gets fixed. Therefore I recommended to create an issue about this in that repo. Otherwise it is unlikely to be addressed.

Asked by Dirk Thomas on 2020-01-28 11:03:05 UTC