Added third argument to specify publishing frequency

Updated the default publishing rate to 1 Hz

Fixed "if" conditional equality sign

Added optional third argument to specify publishing rate