Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic parameter 'data_class' is not initialized #37

Open
ElonKou opened this issue Mar 28, 2019 · 1 comment
Open

Topic parameter 'data_class' is not initialized #37

ElonKou opened this issue Mar 28, 2019 · 1 comment

Comments

@ElonKou
Copy link

ElonKou commented Mar 28, 2019

Hi,
When I use rqt_bag to record a topic, some of the topics cannot be recorded and a warning is displayed, but when I use the command line tool rosbag, these topics can be recorded.
I am working under ubuntu16.04

[WARN] [1553769837.934367]: Error subscribing to /huace/nmea_sentence (ignoring): topic parameter 'data_class' is not initialized
[WARN] [1553769838.267172]: Error subscribing to /lslidar_sweep (ignoring): topic parameter 'data_class' is not initialized
[WARN] [1553769838.271660]: Error subscribing to /lslidar_packet0 (ignoring): topic parameter 'data_class' is not initialized
[WARN] [1553769838.277671]: Error subscribing to /tong/nmea_sentence (ignoring): topic parameter 'data_class' is not initialized
[WARN] [1553769838.285201]: Error subscribing to /lslidar_packet1 (ignoring): topic parameter 'data_class' is not initialized

I checked the corresponding code and found that the function could not get their correct type for the topic of the previous problem.
pytype = roslib.message.get_message_class(datatype)

Can you help me determine what is going on in the end, how to solve it, thank you very much.

@Guozhongyuan
Copy link

Because rospy cannot find the msg description.

You can copy msg file and import it,

import os
import sys
sys.path.append('./devel/lib/python3/dist-packages')
from your_msgs.msg import *

Or another method is to source devel/setup.bash before run python file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants