ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rqt_plot does not display topic

asked 2021-09-21 01:57:55 -0600

jessievd gravatar image

updated 2021-09-28 01:38:47 -0600

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.

edit retag flag offensive close merge delete

Comments

1

So you solved #q385758?

gvdhoorn gravatar image gvdhoorn  ( 2021-09-21 02:15:38 -0600 )edit

sorry yes!

jessievd gravatar image jessievd  ( 2021-09-21 02:19:33 -0600 )edit

Then please post an answer there to explain what you did to solve it.

gvdhoorn gravatar image gvdhoorn  ( 2021-09-21 02:23:35 -0600 )edit

yes, done!

jessievd gravatar image jessievd  ( 2021-09-21 03:47:59 -0600 )edit

You have to write the answer and its explanation in below answer box.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-09-21 05:15:41 -0600 )edit

That is what I did right, I don't understand?

jessievd gravatar image jessievd  ( 2021-09-21 05:17:03 -0600 )edit

You are writing your answer in the question section.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-09-21 05:29:35 -0600 )edit

changed it

jessievd gravatar image jessievd  ( 2021-09-21 06:38:16 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-09-22 06:00:10 -0600

Mike Scheutzow gravatar image

Both of the links in your description are 13 months old. You need to upgrade your ros-noetic-rqt-plot apt package to version 0.4.13.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-09-21 01:57:55 -0600

Seen: 542 times

Last updated: Sep 28 '21