Added default for frame_id parameter

This commit is contained in:
Patrick Goebel 2015-12-18 07:34:38 -08:00
parent c2614fc25e
commit 6a8f9413b9

View File

@ -119,6 +119,12 @@ class ArduinoROS():
params['direction']
except:
params['direction'] = 'input'
# Set the frame_id to the base frame if not set
try:
params['frame_id']
except:
params['frame_id'] = self.base_frame
if params['type'].lower() == 'Ping'.lower():
sensor = Ping(self.device, name, params['pin'], params['rate'], params['frame_id'])