Controlling a Turtlebot using Python

Create a ROS Python node named forward.py. Your node should move the Turtlebot directly forward at a fixed, constant rate of .2 meters per second. (This node will need a publisher object, but it won't need any subscribers.)

Use either the Gazebo simulator or a Turtlebot to test your finished node.

Getting Smarter...

Make a copy of the node you completed above named bumper.py. Modify this file so that it stops forward motion whenever the bumper is depressed. Forward motion should resume when the bumper is released.

Use either the Gazebo simulator or a Turtlebot to test your finished node.

Using the /scan Topic

Create a new node named wander.py that subscribes to the /scan topic. Instead of waiting until the Turtlebot actually bumps into something, this node should halt forward progress as soon as an object is observed less than one meter in front of the Turtlebot.

Note that the data stored in a LaserScan message will contain NaN readings if obstacles are too close to the sensor. You can check for NaN values using the math.isnan function.

If you have time, modify your wander node so that it rotates to avoid looming obstacles. Your finished node should be able to wander around while avoiding obstacles in the robot's path.

Submitting

Submit bumper.py and wander.py through Canvas. Make sure that your submission contains the names of all group members.