Skip to content

Some of the dependencies are not compatible with python3 #34

Open

Description

@jhseeingthings

Like "import StringIO" in File "~/smach_viewer/smach_viewer.py", line 44, in import StringIO

I would deeply appreciate that if you can update this lib to the noetic version.

Activity

  1. k-okada commented on Sep 23, 2020

    @k-okada
    Contributor

    Thanks for report, interestingly "StringIO" is not used anyware in this script, so can we remote that line? @jhseeingthings

  2. jhseeingthings commented on Sep 23, 2020

    @jhseeingthings
    Author

    Thank you a lot!
    I have tried your advice. but it still doesn't work.
    Traceback (most recent call last):
    File "/opt/ros/noetic/lib/smach_viewer/smach_viewer.py", line 48, in
    import wxversion
    ModuleNotFoundError: No module named 'wxversion'
    But i couldn't find the appropriate version(2.8) for wxversion, then i installed the python-wxgtk3.0.
    However, it doesn't work out.
    How could i solve this? thank you.

  3. hcostelha commented on Oct 17, 2020

    @hcostelha

    I have the same problem. Although it has been released into the noetic repository, it seems not to be compatible with with Ubuntu 20.04 with ROS noetic and Python 3.

  4. FilipHesse commented on Oct 22, 2020

    @FilipHesse

    Same problem here, porting to python 3 would be appreciated a lot.

  5. changed the title [-]Some of the dependencies are not comaptible with python3[/-] [+]Some of the dependencies are not compatible with python3[/+] on Nov 17, 2020
  6. cosmicog commented on Dec 13, 2020

    @cosmicog

    I think updating the code according to the newer versions of the xdot and wxpython won't be possible. I downloaded the code and tried for myself but since the owner of this repository kinda wrote his own version of the dependencies, Making it work with Noetic is looking almost impossible to me. Maybe we should write a new visualization tool.

    Or we would just switch to behaviour trees since it's released even for ROS2.
    https://index.ros.org/p/behaviortree_cpp_v3/#noetic
    Or there's a py_trees, which is also as awesome as above:
    https://index.ros.org/p/py_trees_ros/github-splintered-reality-py_trees_ros/#noetic

  7. karl-exwzd commented on Jun 29, 2021

    @karl-exwzd

    For reference: I'm using ROS Noetic and SMACH visualization is something I wanted to have to display the current state of my FSM for easy introspection and bling.

    I could not update it to work in Noetic for the same reasons @cosmicog mentionned, however I was able to get it working by using ROS Melodic Docker container, even though the rest of the ROS framework was run in Noetic. I don't foresee anybody updating this repo anytime soon, at least this gives a way to use the visualization in the last iteration of ROS1 without too much effort.

    Some modifications were needed, this was run in a Ubuntu 20.04 machine:

    docker run -it --rm --network host -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw ros:melodic bash
    apt-get update
    apt-get install -y python-pyqt5 ros-melodic-executive-smach-visualization
    

    Edit file /opt/ros/melodic/lib/python2.7/dist-packages/smach_viewer/xdot/xdot_qt.py line 44:

    from python_qt_binding.QtWidgets import QWidget, QMainWindow
    

    Change to

    from PyQt5.QtWidgets import QWidget, QMainWindow
    

    Comment out line 185 in /opt/ros/melodic/lib/smach_viewer/smach_viewer.py:

    # self._local_data._data = pickle.loads(msg.local_data)
    

    Or the terminal will be full of errors and the viewer will not update the current state (but will display it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions