Ask Your Question

Can't plot some messages types on rqt_plot

asked 2013-08-13 18:09:33 -0500


I'm trying to plot some messages but this warning appears at executing rqt_plot:

TopicCompleter.update_topics(): could not get message class for topic type "atlas_msgs/ForceTorqueSensors" on topic "/atlas/force_torque_sensors"

and in general:

TopicCompleter.update_topics(): could not get message class for topic type "foo_msg" on topic "foo_topic"

If I execute rqt_plot with the data I want to plot (rqt_plot /atlas/force_torque_sensors/l_foot/force/x:y:z) this error shows up:

PluginHandlerDirect._restore_settings() plugin "rqt_plot/Plot#0" raised an exception:
Traceback (most recent call last):
  File "/opt/ros/hydro/lib/python2.7/dist-packages/qt_gui/", line 116, in _restore_settings
    self._plugin.restore_settings(plugin_settings_plugin, instance_settings_plugin)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_plot/", line 172, in restore_settings
    self._switch_data_plot_widget(int(instance_settings.value('plot_type', 0)))
  File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_plot/", line 162, in _switch_data_plot_widget
  File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_plot/", line 98, in switch_data_plot_widget
  File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_plot/", line 193, in add_topic
    self._rosdata[topic_name] = ROSData(topic_name, self._start_time)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_plot/", line 114, in __init__
    self.sub = rospy.Subscriber(real_topic, data_class, self._ros_cb)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/", line 502, in __init__
    super(Subscriber, self).__init__(name, data_class, Registration.SUB)
  File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/", line 135, in __init__
    raise ValueError("topic parameter 'data_class' is not initialized")
ValueError: topic parameter 'data_class' is not initialized

Someone can help me with this? I can plot data over some topics, so, Is there something that I have to do before?

I'm using Hydro and Ubuntu 12.04

edit retag flag offensive close merge delete


What happens if you do the following? 1) run `$ rqt --clear-config` 2) choose Plot from `Plugins` tab 3) Type in the topic name ?

130s gravatar image 130s  ( 2013-08-14 06:25:01 -0500 )edit

See answer

gustavo.velascoh gravatar image gustavo.velascoh  ( 2013-08-14 07:24:29 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2013-08-14 07:25:12 -0500

Hi, Today I turned on the computer and without try to run rqt_plot again, I installed ros-hydro-rqt-msg, then run rqt and choose Plot and it works.

After this I run rqt_plot /atlas/force_torque_sensors/l_foot/force/x:y:z and also works... so I'm not sure what fix the issue, if rebooting or installing rqt-msg.

edit flag offensive delete link more


That's strange. `rqt_plot` doesn't depend on `_msg` at all. If you like, can you try uninstall ros-hydro-rqt-msg and try?

130s gravatar image 130s  ( 2013-08-14 08:21:35 -0500 )edit

Ok.. i will try it later. I have to install all the stuff in another machine in the next few days, then I will tell you how this will going.

gustavo.velascoh gravatar image gustavo.velascoh  ( 2013-08-14 10:23:46 -0500 )edit

This does not work for me :( I tried to do

rqt_plot /apriltag2_tag_detections/detections/pose/pose/position/x:y:z

But it does not plot anything.

fabbro gravatar image fabbro  ( 2016-12-11 15:56:13 -0500 )edit

answered 2013-10-15 12:02:08 -0500

Chief_534 gravatar image

Hey Gustavo,

The same thing happened to me, and I believe I figured out what causes it. If you run rqt_plot, create a new message, and then run a program that uses the new message without restarting rqt_plot, then rqt_plot will have no knowledge of the new message that you created.

From what I can tell, when you first run rqt_plot it checks what the available, valid messages are. That list only gets refreshed on startup. So to the fix is to simply restart rqt_plot.

Hope that helps!

  • Chief
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-08-13 18:09:33 -0500

Seen: 3,360 times

Last updated: Oct 15 '13