Modified from https://github.com/jihoonl/waypoint/tree/master/waypoint_generator with "orientation" added.
$ rosrun waypoint_generator waypoint_generator.py
or
$ cd waypoint_generator/scripts
$ chmod +x waypoint_generator.py
$ ./waypoint_generator.py
Tested with Ubuntu 16.04 LTS + ROS Kinetic