CSCI : Introduction to Robotics Lab 3: Inverse Kinematics Solution

$30.00 $24.00

The goals of this lab are to Understand how to calculate the wheel speed given a desired velocity Experience basic feedback control See the need for higher-level reasoning / path-planning You need: A functional Sparkiduino development environment A Sparki robot A working implementation of the Odometry Lab code The ArcBotics line following poster Overview A…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

The goals of this lab are to

  • Understand how to calculate the wheel speed given a desired velocity

  • Experience basic feedback control

  • See the need for higher-level reasoning / path-planning

You need:

  • A functional Sparkiduino development environment

  • A Sparki robot

  • A working implementation of the Odometry Lab code

  • The ArcBotics line following poster

Overview

A robot’s forward kinematics allow you to compute the final position of a robot given individual joint positions. If we wanted to be able to perform the opposite process – figuring out the joint positions required to move a robot to a desired position/configuration, we will need to utilize inverse kinematics. A robot’s inverse kinematics provide a joint configuration that will achieve a desired pose (in Sparki’s case: x, y, ). In this lab you will implement a feedback controller that navigates the robot from its current position to a provided goal position.

Instructions

Each group must develop their own software implementation and turn in individual lab reports. You are encouraged to engage with your lab partners for collaborative problem-solving, but are expected to turn in your own write-ups. If your group does not finish the implementation by the end of the class, you may continue this lab on your own time as a complete group.

Submit your code (.ino file) and a PDF write-up answering each question (please put the number of each question next to your answers, rather than turning in your answers as an essay).

Part 1: Compute the Inverse Kinematics of Sparki

  1. Use the forward kinematic relationship for a differential wheel platform from the book

( and as a function of left and right wheel angle change) to calculate its inverse, that is left and right wheel angle change given and .

Part 2: Position Controller

  1. (Position Error) Calculate the Euclidian distance between your current location and the goal position.

  1. (Bearing Error) Calculate the angle between the orientation of the robot and the direction of the goal position.

For example, if the line between the robot’s position and the goal position is oriented 90 degrees to the left of the robot, is 90 degrees. If the goal is directly in front of the robot, is 0 degrees (and so on). You should use the function atan2() for doing this.

  1. (Heading Error) Calculate the angle between the orientation of the robot and the goal orientation.

  1. Using sparki.moveLeft, sparki.moveRight, and sparki.moveForward, create a controller that orients the robot toward the goal position (reduce bearing error to zero), drives to the goal position (reduce position error to zero), then orients to the proper heading (reduce heading error to zero). The robot’s odometry can be updated all at once after these three actions are taken.

  1. Verify that your controller works by driving to known locations around the map!

Part 3: Feedback Controller

This portion of the lab is more challenging than previous labs. Be sure to e-mail Brad with questions as they come up so you have plenty of time to solve the challenges you encounter!

  1. Calculate a change in position that is proportional to , e.g. = 0.1 ∗

What happens if you don’t set/enforce a maximum value that can take in your IK code? Will your robot ever be able to rotate if ?

  1. Calculate a change in rotation that is proportional to and , e.g. = 0.1 ∗ + 0.01 ∗ (make sure the direction of is consistent with your coordinate system)

What should you do to as the robot reduces its position error near to 0? Should you weight it more heavily if is large?

  1. Create a proportional feedback controller that uses this signal to drive to a given goal. There are many valid ways to solve this problem. Describe your solution in your report.

You will likely have to update your odometry code to accommodate this new method of moving the robot! The function sparki.motorRotate(MOTOR, DIRECTION, SPEED) will be useful for this (http://arcbotics.com/lessons/moving-the-robot-home-lesson/).

Keep in mind that the robot can only rotate its wheel a small amount during the 100ms loop delay, which is usually going to be less than and . You may wish to scale the SPEED arguments for each motor’s motorRotate function call such that they are proportional to the ratio between and . (e.g.,: If = 1.0 and = 2.0, Right motor should run at 100% and left motor should run at 50%).

  1. Verify that your controller works by driving to known locations around the map!

Part 4: Lab Report

Create a report that answers each of these questions:

  1. Describe one condition where your controller from Part 2 might fail.

  1. What is the role of the position error?

  1. What is the role of the heading error?

  1. Why include bearing error?

  1. Describe how you implemented your feedback controller in Part 3.

  1. Does your implementation for part 3 work? If not, describe the problems it has.

  1. What are the equations for the final controller from your implementation? What are your equations for in your feedback controller?

  1. What happens if you alter your gain constants (the 0.1 and 0.01 values in Part 3.1, 3.2)?

  1. What happens if you increase these gain constants? What if they become too large?

  1. What would happen if an obstacle was between the robot and its goal?

  1. (Briefly) How would you implement simple obstacle avoidance using the ultrasonic sensor?

  1. Describe what would happen if the obstacle-avoiding robot encountered a U-shaped object like this:

Robot Goal

  1. What are the names of everyone in your lab group?

  1. Roughly how much time did you spend programming this lab?

  1. (Optional, confidential, not for credit) A brief description of any problems (either technical or collaborative) encountered while performing this lab (e.g., issues with the clarity of instructions, clarity of documentation, lab colleague’s behavior, etc.)

CSCI : Introduction to Robotics Lab 3: Inverse Kinematics Solution
$30.00 $24.00