New publishRobotState function