Skip to content

Melodic/Noetic support #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 23, 2022
Merged

Conversation

k-okada
Copy link
Contributor

@k-okada k-okada commented Jul 20, 2022

rework of #39, as #39 mixes style change and noetic support, it also drop meldoic support.

@k-okada
Copy link
Contributor Author

k-okada commented Jul 20, 2022

@knorth55 can you check if this works on your complex smach example? on both Meldoic / Noetic.

except KeyError:
local_data = pickle.loads(base64.b64decode(msg.local_data.encode('utf-8')))
if isinstance(msg.local_data, str):
local_data = pickle.loads(base64.b64decode(msg.local_data))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this chage causes error in melodic.

[ERROR] [1658322156.379389]: bad callback: <bound method SmachViewerFrame._status_msg_update of <__main__.SmachViewerFrame; proxy of <Swig Object of type 'wxFrame *' at 0x55a2221c2ce0> >>
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/knorth55/ros/melodic/src/ros-visualization/executive_smach_visualization/smach_viewer/scripts/smach_viewer.py", line 879, in _status_msg_update
    if container.update_status(msg):
  File "/home/knorth55/ros/melodic/src/ros-visualization/executive_smach_visualization/smach_viewer/scripts/smach_viewer.py", line 217, in update_status
    self._local_data._data = self._load_local_data(msg)
  File "/home/knorth55/ros/melodic/src/ros-visualization/executive_smach_visualization/smach_viewer/scripts/smach_viewer.py", line 191, in _load_local_data
    local_data = pickle.loads(base64.b64decode(msg.local_data))
  File "/usr/lib/python2.7/base64.py", line 78, in b64decode
    raise TypeError(msg)
TypeError: Incorrect padding

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't checked yet, but this may be caused by multibyte language...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it is not related to multibyte language.
we have same error with roseus_smach/sample/state-machine-ros-sample.l

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is fixed now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thank you.

@knorth55
Copy link
Contributor

Noetic is not yet tested, but I tested in Melodic.

I tried with english (singlebyte language) and it works in Melodic.
But I merged #40 to test with multibyte japanese but I got the following error.
I don't get this error in #40, so this is a bit weird...

[ERROR] [1658325349.225043]: label width 40 causes error
[ERROR] [1658325349.226524]: maybe multibyte word is in your label.
[ERROR] [1658325349.227478]: 'ascii' codec can't decode byte 0xe4 in position 2299: ordinal not in range(128)
[ERROR] [1658325349.228376]: changing width label width to 41
Exception in thread Thread-6:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/knorth55/ros/melodic/src/ros-visualization/executive_smach_visualization/smach_viewer/scripts/smach_viewer.py", line 1090, in _update_graph
    self.widget.subgraph_shapes,
AttributeError: 'WxDotWindow' object has no attribute 'subgraph_shapes'

@k-okada
Copy link
Contributor Author

k-okada commented Jul 21, 2022

@knorth55 If you revert, you can show Japanese on melodic

-    parser = XDotParser(xdotcode)
+    parser = MyXDotParser(bytes(str(xdotcode).encode("utf-8")))

@knorth55
Copy link
Contributor

@k-okada

    parser = XDotParser(xdotcode)

works.

    parser = MyXDotParser(xdotcode)

does not works.

So, we should modify MyXDotParser to support multibyte language?

@knorth55
Copy link
Contributor

knorth55 commented Jul 22, 2022

@k-okada I make a PR for checking in melodic and noetic k-okada#1 . Noetic is WIP.

[WIP] fix for multibyte language
@k-okada k-okada merged commit f4ac706 into ros-visualization:melodic-devel Jul 23, 2022
@k-okada k-okada deleted the noetic branch July 23, 2022 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants