When i copied and pasted the code in file and executed it identation error has been thrown at line 11 “self.cmd = Twist()”
You can delete what you pasted, and copy it carefully again.
Otherwise, please send a screenshot showing the code in the IDE, and indicate where the indent error is.