stonier / qt_ros

Qt resources for use with ros.
71 stars 44 forks source link

ROS Noetic support? #31

Open JaehyunShim opened 4 years ago

JaehyunShim commented 4 years ago

Are you planning to update this package to support the ROS Noetic version? There might need slight modifications to python files as Noetic uses python3.

JaehyunShim commented 4 years ago

It seems there is no libqt4-dev in Ubuntu 20.04..

stonier commented 3 years ago

Can do. If you can send a PR for whatever fixes it might need, it would expedite that.

AndyHuska commented 3 years ago

The libqt4-* libraries are available via third parties, two ppa options are found here: https://ubuntuhandbook.org/index.php/2020/07/install-qt4-ubuntu-20-04/ sudo add-apt-repository ppa:rock-core/qt4 sudo add-apt-repository ppa:gezakovacs/ppa

AndyHuska commented 3 years ago

These libraries work in Noetic with no modifications, so they could be released as is just with a new package name for ros-noetic-qt-build For those of you that need this to work right now all you have to do is clone this repo and move the qt_build, qt_create, and qt_ros folders into your catkin_ws/src folder then run catkin_make as usual. That is literally all I did to make my qt projects from melodic work in noetic.

stonier commented 3 years ago

^Thanks for the info @AndyHuska. I can't release that to the build farm given that it's dependent on PPA's, but useful as a workaround.

AndyHuska commented 3 years ago

Ah good to know. I'll see what I can learn about updating to Qt5 in effort to keep this project a top tier ROS tool.

ZuoAnZoom commented 3 years ago

you have to do is clone this repo and move the qt_build, qt_create, and qt_ros folders into your catkin_ws/src folder then run catkin_make as usual. That is literally all I did to make my qt projects from melodic work in noetic.

thanks, i just did as what you said. But I still have a problem when try to use catkin_create_qt_pkg script. Error shows SyntaxError: Missing parentheses in call to 'print'. Did you mean print("\nPlease edit %s/package.xml and mainpage.dox to finish creating your package"%package)? . I tried to modified this script in noetic, but more issues occured. Do you have this problem? BTW, I can move my qt projects from melodic to noetic with no build problems, but I just can't create qt packages in noetic, can you create qt packages in noetic?

AndyHuska commented 3 years ago

I don't use that script, but after a quick look at catkin_create_qt_pkg I see that print statement on line 19 and it is python2 syntax. For Noetic it needs to be updated to python3 syntax, which requires print statements to have enclosing parentheses.

So print "\nPlease edit %s/package.xml and mainpage.dox to finish creating your package"%package Needs to be changed to print ("\nPlease edit %s/package.xml and mainpage.dox to finish creating your package"%package) or something like that.

ZuoAnZoom commented 3 years ago

I don't use that script, but after a quick look at catkin_create_qt_pkg I see that print statement on line 19 and it is python2 syntax. For Noetic it needs to be updated to python3 syntax, which requires print statements to have enclosing parentheses.

So print "\nPlease edit %s/package.xml and mainpage.dox to finish creating your package"%package Needs to be changed to print ("\nPlease edit %s/package.xml and mainpage.dox to finish creating your package"%package) or something like that.

I do changed the print to python3 like. But when I try to use catkin_create_qt_pkg, it still gives me error message below:

 ~# catkin_create_qt_pkg testpkg roscpp rospy
Traceback (most recent call last):
  File "/home/csy/workspace_csy/catkin_qt/devel/bin/catkin_create_qt_pkg", line 15, in <module>
    exec(compile(fh.read(), python_script, 'exec'), context)
  File "/home/csy/workspace_csy/catkin_qt/src/qt_ros/qt_create/scripts/catkin_create_qt_pkg", line 4, in <module>
    from qt_create import create_qt_ros_catkin_package
  File "/home/csy/workspace_csy/catkin_qt/devel/lib/python3/dist-packages/qt_create/__init__.py", line 34, in <module>
    exec(__fh.read())
  File "<string>", line 2, in <module>
ModuleNotFoundError: No module named 'create'

I try to fix this, but everything i tried did not appear to work

mjlee111 commented 1 year ago

I don't use that script, but after a quick look at catkin_create_qt_pkg I see that print statement on line 19 and it is python2 syntax. For Noetic it needs to be updated to python3 syntax, which requires print statements to have enclosing parentheses. So print "\nPlease edit %s/package.xml and mainpage.dox to finish creating your package"%package Needs to be changed to print ("\nPlease edit %s/package.xml and mainpage.dox to finish creating your package"%package) or something like that.

I do changed the print to python3 like. But when I try to use catkin_create_qt_pkg, it still gives me error message below:

 ~# catkin_create_qt_pkg testpkg roscpp rospy
Traceback (most recent call last):
  File "/home/csy/workspace_csy/catkin_qt/devel/bin/catkin_create_qt_pkg", line 15, in <module>
    exec(compile(fh.read(), python_script, 'exec'), context)
  File "/home/csy/workspace_csy/catkin_qt/src/qt_ros/qt_create/scripts/catkin_create_qt_pkg", line 4, in <module>
    from qt_create import create_qt_ros_catkin_package
  File "/home/csy/workspace_csy/catkin_qt/devel/lib/python3/dist-packages/qt_create/__init__.py", line 34, in <module>
    exec(__fh.read())
  File "<string>", line 2, in <module>
ModuleNotFoundError: No module named 'create'

I try to fix this, but everything i tried did not appear to work

https://github.com/mjlee111/catkin_create_qt_pkg.git

This is one I made might help?