From: Erik Andresen Date: Fri, 2 Mar 2018 22:20:50 +0000 (+0100) Subject: Add sensor_board to wild_thumper.launch X-Git-Url: https://defiant.homedns.org/gitweb/?a=commitdiff_plain;h=3e393a12f0aea0302fefa4616dcd93c1b3bf6299;p=ros_wild_thumper.git Add sensor_board to wild_thumper.launch --- diff --git a/.screen-startup b/.screen-startup index 0884e2b..64314b7 100644 --- a/.screen-startup +++ b/.screen-startup @@ -6,6 +6,5 @@ source $HOME/.screenrc screen 0 zsh -is eval 'roscore' screen 1 zsh -is eval 'roslaunch --wait wild_thumper wild_thumper.launch' screen 2 zsh -is eval 'roslaunch --wait wild_thumper teleop.launch' -#screen 3 zsh -is eval 'rosrun wild_thumper sensor_board.py' #screen 3 zsh -is eval 'roslaunch --wait wild_thumper move_base.launch nomap:=true' select 2 diff --git a/launch/wild_thumper.launch b/launch/wild_thumper.launch index 927f41e..88b6658 100644 --- a/launch/wild_thumper.launch +++ b/launch/wild_thumper.launch @@ -54,4 +54,6 @@ + + diff --git a/scripts/sensor_board.py b/scripts/sensor_board.py index e431b57..c688ff9 100755 --- a/scripts/sensor_board.py +++ b/scripts/sensor_board.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # -*- coding: iso-8859-15 -*- +import sys import rospy import struct import prctl @@ -11,7 +12,7 @@ from pyshared.humidity import * from wild_thumper.msg import Sensor # Board warming offset -TEMP_ERROR = 0 # -5 # degree celsius +TEMP_ERROR = 0 # -2.5 # -5 # degree celsius PRESSURE_ERROR = -2.5 """ @@ -57,6 +58,11 @@ class SensorBoard: def __init__(self): rospy.init_node('sensor_board') prctl.set_name("sensor_board") + try: + get() + except: + print >>sys.stderr, "No sensor board, shutting down" + exit(1) self.pub = rospy.Publisher("sensors", Sensor, queue_size=16) self.run()