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

bag_player.py Problem #252

Open
gurselturkeri opened this issue Jan 28, 2023 · 1 comment
Open

bag_player.py Problem #252

gurselturkeri opened this issue Jan 28, 2023 · 1 comment

Comments

@gurselturkeri
Copy link

When I run rosrun hdl_graph_slam bag_player.py sample.bag I get an error:

done
Traceback (most recent call last):
  File "/home/gursel/catkin_ws/src/hdl_graph_slam/src/hdl_graph_slam/bag_player.py", line 223, in <module>
    main()
  File "/home/gursel/catkin_ws/src/hdl_graph_slam/src/hdl_graph_slam/bag_player.py", line 220, in main
    BagPlayer(args.input_bag, args.start, args.duration)
  File "/home/gursel/catkin_ws/src/hdl_graph_slam/src/hdl_graph_slam/bag_player.py", line 41, in __init__
    self.publishers[con.topic] = rospy.Publisher(con.topic, msg_class, queue_size=256)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 842, in __init__
    super(Publisher, self).__init__(name, data_class, Registration.PUB)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 140, in __init__
    raise ValueError("topic parameter 'data_class' is not initialized")
ValueError: topic parameter 'data_class' is not initialized```
@981213
Copy link

981213 commented Feb 23, 2023

It seems that bag_player.py is a Python3 script and you need ROS noetic to use that.

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