[BUG] [PLEASE HELP] Multi drone simulation, melodic

Hello,

I am creating this post as a VERY IMPORTANT ISSUE, need to be resolved .

I work on multi vehicle simulation, which use: gazebo, PX4, ROS

Everything worked fine until the version of kinetics of ROS,

Once I have done an upgrade and moved to melodic nothing is working anymore.

Apparently, several issues arise considering the problem of moving from Python 2 to 3 in melodic
I tried to move part of the scripts from python 2 to 3. However, once I resolve a bug a new bug is generated.

After several weeks of working on this issue, I am posting on this forum trying to have a contact with the maintainers of multi vehicle simulation that are around and ready to help to resolve this issue.

I have even created a post in the past with no solution so far:
[BUG] IRIS multi vehicle simulation with gazebo

So please, if you have any idea, or you are ready to help to resolve the issue, please give an answer in this post

Best regards,

All my thanks to the maintainers and developers that are working on this subject.

2 Likes

I don’t work with ROS myself, so I can’t really help, sorry.

However, I suggest to use the versions supported by PX4, usually that’s based on Ubuntu, and whatever ROS comes with it, and mostly still on Python2 I believe. Sorry I don’t have a better answer.

Thanks for your answer,

If you have any contact with anyone working on Multi vehicle simulation it will be appreciated.

Also the actual problem is more related to parameters of Spawn_model passed by launch files in the Firmware.

I will also try to resolve the problem, I will announce the solution once I found it.

In fact, I believe that software should be maintained and validated for every new version of dependency. After 2020, Python 2 is going to die, and every body will be obliged to move to Python 3 which mean ROS melodic.

I think it is from our interest to move to new version as soon as possible, A lot of tests should be done before being sure the the software is valid for the new version of ROS.

I do not know if this issue should be listed on the Todo list for PX4 team. I prefer to report it here to reach the entire community of users and developers.

Best regards,

I agree! Let’s try to fix it. Pull requests with fixes are always welcome :slight_smile:

“”“SOME UPDATE “””

I had to use 2to3.7 tool to move the some ros libraries from python 2 to 3.
I started by updating gazebo_ros then rospy then rosgraph

The last un debugged error is the following:

[rospy.core][INFO] 2018-11-09 15:29:52,260: signal_shutdown [atexit]
[rospy.impl.masterslave][INFO] 2018-11-09 15:29:52,262: atexit
[rospy.client][INFO] 2018-11-09 15:34:01,336: init_node, name[/iris_1_spawn], pid[19349]
[xmlrpc][INFO] 2018-11-09 15:34:01,336: XML-RPC server binding to 0.0.0.0:0
[xmlrpc][INFO] 2018-11-09 15:34:01,337: Started XML-RPC server [http://linux-4-102:34327/]
[rospy.init][INFO] 2018-11-09 15:34:01,337: ROS Slave URI: [http://linux-4-102:34327/]
[rospy.impl.masterslave][INFO] 2018-11-09 15:34:01,337: _ready: http://linux-4-102:34327/
[rospy.registration][INFO] 2018-11-09 15:34:01,338: Registering with master node http://localhost:11311
[xmlrpc][INFO] 2018-11-09 15:34:01,339: xml rpc node: starting XML-RPC server
[rospy.init][INFO] 2018-11-09 15:34:01,438: registered with master
[rospy.rosout][INFO] 2018-11-09 15:34:01,438: initializing /rosout core topic
[rospy.rosout][ERROR] 2018-11-09 15:34:01,439: Unable to initialize /rosout: cannot use a string pattern on a bytes-like object
Traceback (most recent call last):
File “/opt/ros/melodic/lib/python3.7/site-packages/rospy/impl/rosout.py”, line 70, in init_rosout
_rosout_pub = Publisher(_ROSOUT, Log, latch=True, queue_size=100)
File “/opt/ros/melodic/lib/python3.7/site-packages/rospy/topics.py”, line 842, in init
super(Publisher, self).init(name, data_class, Registration.PUB)
File “/opt/ros/melodic/lib/python3.7/site-packages/rospy/topics.py”, line 146, in init
if not rosgraph.names.is_legal_name(name):
File “/opt/ros/melodic/lib/python3.7/site-packages/rosgraph/names.py”, line 233, in is_legal_name
m = NAME_LEGAL_CHARS_P.match(name)
TypeError: cannot use a string pattern on a bytes-like object

This error is very confusing because if we had a look at the code, it will be the following:
_clock_sub = rospy.topics.Subscriber(_ROSCLOCK, Clock, _set_rostime_clock_wrapper, queue_size=1)