rqt_plot does not display topic
When running my simulation on ros noetic, rqt_plot cannot display any topics anymore because of the following error:
Traceback (most recent call last): File "/opt/ros/noetic/lib/python3/dist-packages/rqt_plot/plot_widget.py", line 230, in on_subscribe_topic_button_clicked
self.add_topic(str(self.topic_edit.text())) File "/opt/ros/noetic/lib/python3/dist-packages/rqt_plot/plot_widget.py", line 290, in add_topic
self._rosdata[topic_name] = ROSData(topic_name, self._start_time) File "/opt/ros/noetic/lib/python3/dist-packages/rqt_plot/rosplot.py", line 108, in __init__
self.field_evals = generate_field_evals(fields) File "/opt/ros/noetic/lib/python3/dist-packages/rqt_plot/rosplot.py", line 207, in generate_field_evals
raise RosPlotException("cannot parse field reference [%s]: %s" % (fields, str(e))) rqt_plot.rosplot.RosPlotException: cannot parse field reference [['external_torques[0]']]: module 'string' has no attribute 'atoi' Traceback (most recent call last): File "/opt/ros/noetic/lib/python3/dist-packages/rqt_plot/rosplot.py", line 201, in generate_field_evals
slot_num = string.atoi(rest[:rest.find(']')]) AttributeError: module 'string' has no attribute 'atoi'
So it is mostly about the last line concerning rosplot.py. I have found the cause of this problem on this forum: https://github.com/ros-visualization/rqt_plot/pull/57 Which seems to be a bug in rqt_plot.
And a solution on this forum: https://answers.ros.org/question/362951/rqt_plot-noetic-does-not-display-arrays-fields/ Which is to replace string.atoi with int(). However, I cannot edit the file rosplot.py since it is read only and also, I read everywhere that you shouldn't just edit files in ros rqt. How can I fix this bug then? Or is there a way to edit this file safely?
Solution: updating from rqt_plot 0.4.12 to 0.4.13.
So you solved #q385758?
sorry yes!
Then please post an answer there to explain what you did to solve it.
yes, done!
You have to write the answer and its explanation in below answer box.
That is what I did right, I don't understand?
You are writing your answer in the question section.
changed it