Can't plot some messages types on rqt_plot
Hi,
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/plugin_handler_direct.py", 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/plot.py", 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/plot.py", line 162, in _switch_data_plot_widget
self._widget.switch_data_plot_widget(selected_plot['widget_class'](self._widget))
File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_plot/plot_widget.py", line 98, in switch_data_plot_widget
self.add_topic(topic_name)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rqt_plot/plot_widget.py", 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/rosplot.py", 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/topics.py", line 502, in __init__
super(Subscriber, self).__init__(name, data_class, Registration.SUB)
File "/opt/ros/hydro/lib/python2.7/dist-packages/rospy/topics.py", 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
What happens if you do the following? 1) run `$ rqt --clear-config` 2) choose Plot from `Plugins` tab 3) Type in the topic name ?
See answer