Giter VIP home page Giter VIP logo

Comments (7)

stela avatar stela commented on June 23, 2024

Happened again when driving a lap, did see it driving with the green waypoint dots ahead of it for a while after it started logging light_wb=-1, and then the green waypoint-dots disappeared and the simulator says: Brake: 700, so it appears it thinks it should brake

from carnd-capstone.

stela avatar stela commented on June 23, 2024

Seems it drove "off the world" and without waypoints braked. I switched to manual driving and just had to drive tens of meters to get a positive light_wp, and then I could switch to automatic driving and it would drive by itself. Think we need to treat the waypoints as a circular list or something, this is probably the problematic non-circular code:

closest_idx = self.get_closest_waypoint_idx()
farthest_idx = closest_idx + LOOKAHEAD_WPS
base_waypoints = self.base_lane.waypoints[closest_idx: farthest_idx]
if self.stopline_wp_idx == -1 or (self.stopline_wp_idx >= farthest_idx):
# No buffer overrun, end is auto-truncated at end in Python
lane.waypoints = base_waypoints
else:
lane.waypoints = self.decelerate_waypoints(base_waypoints, closest_idx)

Should append waypoints from 0 and onwards to always return LOOKAHEAD_WPS number of points.

Second, in that code self.stopline_wp_idx == -1 which shouldn't happen, right? The code "guilty" of that must be the subscriber callback, it's never assigned anywhere else after initialization:

def traffic_cb(self, msg):
self.stopline_wp_idx = msg.data

Or is it by design that the car stops after one lap? It kind of seems like that since the -1 checking code was from the walkthrough. It kicks in both after initialization before the first traffic_cb invocation happened as well as at the end of the track.

from carnd-capstone.

StefanGerlach avatar StefanGerlach commented on June 23, 2024

No its not by design, that the car stops there. We have to treat the course as a circular (like it is).

from carnd-capstone.

stela avatar stela commented on June 23, 2024

Working on a fix for this on the multiple_laps branch. Ended up installing PyCharm in the Linux ROS VM in order to be able to create and run a unit test for this. Mounting a folder from my Mac host didn't work through virtualbox, as it messes up the permissions of files (e.g. the execute-flag must not be set on unit test .py files)

from carnd-capstone.

stela avatar stela commented on June 23, 2024

Here is a discussion on slack regarding what do do at the end of the track, with varying opinions about how to handle it.
https://carnd.slack.com/archives/C6NVDVAQ3/p1505320782000298
It says speed is set to 0 at the last waypoint provided, and that causes the car to stop, even when wraparound is handled correctly. By overriding the speed one can make the car continue driving. Also noticed that just 20 waypoints lookahead seemed to be too little to brake safely sometimes in the simulator, so made it 40 instead.

It works for me now in the simulator, will create a pull request for this now.

from carnd-capstone.

stela avatar stela commented on June 23, 2024

Resolved by #9, closing it.

from carnd-capstone.

stela avatar stela commented on June 23, 2024

We should probably reverse this change if we need to re-submit, apparently the car is supposed to respect the 0 waypoint speeds, see https://carnd.slack.com/archives/C6NVDVAQ3/p1522261806000786

Stephen Welch
Hi All! The vehicle should follow the speed set for each waypoint (in this case coming to a stop at the end of the waypoints). We don't expect the vehicle to be able to continuously drive in a loop. However, we may try to restart the dbw in the middle of the waypoint set after driving the loop once, if needed. (e.g. if we want to get another shot at the traffic light.)

From a thread in #s-t3-p-system-integra, Mar 28th at 20:30

from carnd-capstone.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.