BCLab-UNM / SC2

Swarmathon Team Code for the NASA Space Challenge 2 Competition
MIT License
2 stars 0 forks source link

Investigate Obstacle race condition lidar #56

Closed Carter90 closed 4 years ago

Carter90 commented 4 years ago

investigate possible race condition if no lidar data has published

Carter90 commented 4 years ago

Not sure how this might be a problem if it is then we could do something like

while not topic in get_published_topics():
  pass
Carter90 commented 4 years ago

[ERROR] [1596365816.011462]: bad callback: <bound method Obstacle.laser_scan_callback of <main.Obstacle instance at 0x7fc2f8256960>> Traceback (most recent call last): File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback cb(msg) File "/home/carter/SC2/src/obstacle/src/Obstacle.py", line 62, in laser_scan_callback Obstacles.IS_LIDAR, 0)) File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 878, in publish raise ROSException("ROS node has not been initialized yet. Please call init_node() first") ROSException: ROS node has not been initialized yet. Please call init_node() first