Ask Your Question
1

Can't plot some messages types on rqt_plot

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

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

edit retag flag offensive close merge delete

Comments

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 image130s ( 2013-08-14 06:25:01 -0600 )edit

See answer

gustavo.velascoh gravatar imagegustavo.velascoh ( 2013-08-14 07:24:29 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

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

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

Comments

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 image130s ( 2013-08-14 08:21:35 -0600 )edit
1

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 imagegustavo.velascoh ( 2013-08-14 10:23:46 -0600 )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 imagefabbro ( 2016-12-11 15:56:13 -0600 )edit
0

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

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

Stats

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

Seen: 2,740 times

Last updated: Oct 15 '13