Idiomatic way to tell whether code is on simulator or real robot
The simulation (Gazebo) can differ from the actual robot (GoPiGo3) is particular ways, e.g the number of readings in a scan topic - in my case 360 in gazebo and 720 on Ydlidar X4. So I often have either a constant GAZEBO=True
or an inline if True:
both of which are kind of ugly. Is there a more typical way of making code behave a little differently depending on where it is running?