Lab #3: Introduction to Physical Turtlebots

       Introduction

The main objective of this lab is to familiarize you with basic control of the physical Turtlebot robot. In this lab, we will be using the "guess and check" method for estimating angles and distance. Future labs will use inverse-kinematics to improve on this work. Please work in small groups. You will turn in one set of code per group, but please make sure to include all names of group members!

Objectives

Upon successful completion of this lab, you will be able to:

  1. Run the turtlebot
  2. Control the turtlebot via ROS messages
Assignment
  1. Connect to the turtlebot and control it via keyboard. Faustino will help with this during our normal class time on Tuesday and Thursday.
  2. Create a new package
  3. Create a new C++ or Python node called lab3
  4. Set up your node to publish Twist messages to the cmd_vel_mux/input/teleop topic. Check out the turtlebot_teleop package for examples.
  5. Implement two functions:
    publishTwist(u,w) : takes in linear and angular velocity as inputs and publishes to robot
    Optional Step:spinWheels (u1, u2, time) : takes in velocities of left and right wheels and drives the robot for the specified period of time.
    Modify your node to subscribe to Odometry messages. Check out turtlebot/src/kobuki/kobuki_node for examples.
  6. Implement two functions:
    driveStraight(speed, distance) : should be in m/s and m
    rotate(angle) : can be degrees or radians
  7. Finally, write an executeTrajectory() function that will: Drive the turtlebot in a square pattern with 50cm sides
    Drive the turtlebot in a spiral patter where the robot tavels roughly 150 cm total
Turn in
  1. Submit your code via Angel as a zip file.
  2. Submit a video (or link to a video) showing your robot complete the specified patterns
  3. In less than one page, as a .txt or .pdf, list:
    Name of group member(s)
    What you What you could have done differently to make things easier on yourselves