udacity / sdc-issue-reports

29 stars 6 forks source link

Capstone project simulator ignores or doesn't receive commands #1217

Closed fantauzzi closed 6 years ago

fantauzzi commented 6 years ago

I am sending throttle commands over /vehicle/throttle_cmd at a rate of 50Hz, each of them directing the simulator to apply a throttle of 1.0. The simulator randomly ignores around 60% of those commands: it applies a throttle of 1.0 around 40% of the times, and a throttle of 0.0 the rest of the times, as reported over /vehicle/throttle_report.

As a result, the car doesn't accelerate at the rate it should, but much slower, and to maintain constant speed I have to send a throttle of 1.0 almost continuously. Even worse, it is practically impossible to properly tune a PID controller.

It might be that styx/bridge.py discards some of the messages and doesn't forward them to the simulator.

I am reproducing the issue in an almost systematic way on a "native" Ubuntu 16.04. During some runs the issue doesn't happen.

Two other students have reported what looks like the same issue in the Forums, see https://discussions.udacity.com/t/simulator-communication-bug-with-styx-bridge-py/397867

I have observed the same for different fixed throttle values (e.g. .1 and .5) and different updates frequency in the DBW node (30, 50 and 100 Hz).

I am providing a minimal amount of code that reproduces the issue, you can clone it from https://github.com/fantauzzi/CarND-Capstone-issue

From the starter code, I have added one line to dbw_node.py, and a little more to report the diagnostic, that goes into the dbw_node-?-stdout.log log file. Check the log file after running the program with the simulator for a couple of seconds.

macd commented 6 years ago

Hi. Unfortunately my setup was only ever between two Linux machines. I don't know anything about networking on Windows. Doesn't Udacity now give you access to cloud based resources so you can use that?

On Mon, Jul 2, 2018 at 11:36 AM, Samruddhi Joshi notifications@github.com wrote:

@macd https://github.com/macd I am trying to run simulator in Windows and Capstone Project in Linux laptop but though they are on same network the styx node is terminated due to no connectivity. What am I doing wrong? Any other network changes to be made ? Please guide on this. Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/udacity/sdc-issue-reports/issues/1217#issuecomment-401895547, or mute the thread https://github.com/notifications/unsubscribe-auth/AAahxjDO9FR2D2hadgUMewgeywuqY75uks5uCmhEgaJpZM4Qaw7y .