-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Unable to get lidar data in ROS2 #670
Comments
Ok, I did manage to get the data with this code, but the documentation could be a bit better. 1 from rclpy.qos import qos_profile_sensor_data, QoSProfile
2 from sensor_msgs.msg import LaserScan
3 import rclpy
4
5 def chatter_callback(msg):
6 print(msg)
7
8 def main():
9
10 rclpy.init()
11 qos = QoSProfile(depth=10)
12 node = rclpy.create_node('scan_listener')
13 sub = node.create_subscription(LaserScan,
14 'scan',
15 chatter_callback,
16 qos_profile=qos_profile_sensor_data)
17 try:
18 while True:
19 rclpy.spin_once(node)
20
21 except KeyboardInterrupt:
22 pass
23
24 if __name__ == "__main__":
25 print('Starting scan listener')
26 main()
27 print('done.') |
Hi @sjev, Thank you for reporting the issue :) I would like to transfer this issue to the TurtleBot3 issue section. One of our team member will address your issue as soons as possible. Thank you, |
Closing this issue as there isn't recent activity. Please feel free to reopen when necessary. |
"One of our team member will address your issue as soons as possible." Please deliver on your promise instead of waiting for more than 2 months and then closing this thread due to your own inactivity. |
Hi @sjev The updated rviz setting was available in the latest TurtleBot3 package. |
After reading the documentation and hours of googling through issues (like this one), I'm still not able to read the lidar data published on
/scan
topic.How to reproduce:
rqt
on remote pc. -> there are no updates from the scan sensor (below is a screenshot from the emanual, showing unknown update frequency for the data. Nothing is coming in)ros2 topic echo /scan
-> messages are being receivedsub = node.create_subscription( String, 'scan', chatter_callback, qos_profile=qos_profile_sensor_data)
-> no messagesI'm at a loss here...
The text was updated successfully, but these errors were encountered: