Plot acceleration and jerk#14
Conversation
|
Looks good to me @davidpilop , but I'm unable to run it from my local machine. I've got next stacktrace: Seems like you have something similar to this: https://stackoverflow.com/a/38445459/1274904 Did you try to run it on your laptop? My setup:
|
|
@davidpilop The plot works for me. It pops up right from the beginning and keeps updating as the velocity changes. But there's an issue. The system is slowed down and the car moves with an extremely slow velocity (<2 mph). When I comment out Though a live plot looks very cool, a simpler solution would be just to accumulate 2000-3000 sample velocities, acc etc and just popping them up as one plot |
Send out circular waypoints
| self.acceleration_plot.append((self.velocity_plot[i] - self.velocity_plot[i-1])/diff_time) | ||
| self.jerk_plot.append((self.acceleration_plot[i] - self.acceleration_plot[i-1])/diff_time) | ||
|
|
||
| if i % 2000 == 0: |
There was a problem hiding this comment.
@davidpilop Yep looks good to me, but If I am correct when @subhash suggested
Though a live plot looks very cool, a simpler solution would be just to accumulate 2000-3000 sample velocities, acc etc and just popping them up as one plot
he meant that once you handled 2000-3000 calls (up to you, in your case you decided to go with 2000 seems like) you should just execute the logic within this if condition statement and exit. So in here instead of checking for every 2000 calls with if i % 2000 == 0:, you should probably check for the first 2000 calls only, so you should replace if i % 2000 == 0: to if i == 2000: and also after you show statistics in line 160 (https://github.com/subhash/CarND-Capstone/pull/14/files#diff-7fdad75c966f68bdd51946534578bb1fR160) with plt.show() call you should exit by executing next instructionexit(0).
@subhash could you have a look?
There was a problem hiding this comment.
@volkodava @davidpilop The condition is fine for now, we can always quit ROS altogether once we get the plot.
Good job on getting the plot, but something is not right about the values.

We cannot be introducing acc or jerk at this level! Can you investigate. Otherwise, I can look at it tomorrow
There was a problem hiding this comment.
I think something of this sort is required:
if i>0:
self.acceleration_plot.append((self.velocity_plot[i] - self.velocity_plot[i-1])/diff_time)
if i>1:
self.jerk_plot.append((self.acceleration_plot[i-1] - self.acceleration_plot[i-2])/diff_time)
Still, we are not great on the jerk front ..
There was a problem hiding this comment.
Still, we are not great on the jerk front ..
@subhash could you try to run the test with uncommented https://github.com/subhash/CarND-Capstone/blob/master/ros/src/waypoint_updater/waypoint_updater.py#L78 and commented out https://github.com/subhash/CarND-Capstone/blob/master/ros/src/waypoint_updater/waypoint_updater.py#L79 to verify if it helps with jerk?
|
@davidpilop I think this looks good. The problem is that this PR includes other unrelated commits already in the repo. Could you rebase on top of current master (or start from the current master and just apply your change) and resubmit the PR with only the plot code? |

No description provided.