Commit 08d6c4ce authored by xiaoqiang_user's avatar xiaoqiang_user

change navstatus to visual status

parent db88ab25
......@@ -6,6 +6,6 @@
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>
</node>
<node pkg="tf" type="static_transform_publisher" name="laserlink_broadcaster" args="0.0 0 0.3 3.1415926 0 0 base_link laser 100"/>
<node pkg="tf" type="static_transform_publisher" name="laserlink_broadcaster" args="0.0 0 0.12 3.1415926 0 0 base_link laser 100"/>
<include file="$(find laser_filters)/examples/shadow_filter_a2.launch"/>
</launch>
......@@ -11,7 +11,7 @@ import time
from galileo_serial_server.msg import GalileoStatus
LAST_UPDATE_TIME = 0
NAV_FLAG = False
VISUAL_FLAG = False
def get_scan(scan):
......@@ -20,11 +20,11 @@ def get_scan(scan):
def get_galileo_status(status):
global NAV_FLAG
if status.navStatus == 0:
NAV_FLAG = False
global VISUAL_FLAG
if status.visualStatus == -1:
VISUAL_FLAG = False
else:
NAV_FLAG = True
VISUAL_FLAG = True
if __name__ == "__main__":
......@@ -40,7 +40,7 @@ if __name__ == "__main__":
while not rospy.is_shutdown():
time.sleep(5)
# 处于导航状态下且无法收到雷达数据
if int(time.time()) - LAST_UPDATE_TIME > 5 and NAV_FLAG:
if int(time.time()) - LAST_UPDATE_TIME > 5 and VISUAL_FLAG:
rospy.logerr("restart rplidar node")
rplidar_launch.shutdown()
roslaunch.configure_logging(uuid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment