View Single Post
  #2   Spotlight this post!  
Unread 09-10-2014, 16:18
Jared's Avatar
Jared Jared is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Connecticut
Posts: 602
Jared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond repute
Re: Smooth Path Generator for RoboRio 2015

This looks really cool. I've worked on a very similar project (https://github.com/dicarlo236/AutonomousPlanner) that has a similar end result to yours- you draw in some points and headings, and it generates a path for the left and right wheels.

I have a few questions/comments about the paths that this generates.

How exactly are you generating the curves? I see from the examples that you don't need to have headings at individual waypoints, and that the path needs to only come close to the waypoints, rather than cross. I'd like to figure out how to do this for my code, as picking headings for each waypoint can be frustrating.

If you take the inverse tangent of the derivative of y position with respect to x, you get the heading of the robot. If you take the derivative of this function with respect to time, you get how fast the robot is rotating. One of my biggest challenges was keeping this function continuous, so that the path doesn't change from a sharp left turn to a sharp right instantly (think of an "S" where the top and bottom sections are half-circles). From looking at your paths, it seems that your curves do not have these issues. How did you solve this?


I don't follow your code for generating the velocity profile very well, but I don't know how it would deal with sharp turns. From my tests, I needed to create a "maximum velocity" function for my path which told me what the fastest possible speed the robot could go at any point. I took into account the centripetal acceleration required to turn a 150 lb robot, the actual maximum speed of the robot, and the maximum speed of the wheel on the outside of the turn. Then, I generated a smooth velocity function that was always less than the maximum velocity function. It seems like you do have ways to correct your smooth velocity to be within limits, but I don't see how it works.