NikolasEnt / Model-Predictive-Control

Udacity Self-Driving Car Engineer Nanodegree. Project: Model Predictive Control
51 stars 41 forks source link

" fatal error: uWS/uWS.h: No such file or directory" when I try to run make command after cmake compilation? #1

Closed chalsha closed 6 years ago

chalsha commented 6 years ago

I have cloned the uWebSockets repository into the PID controller folder but still the make command fails yet cmake compilation is successful. How can I figure this out? THE WHOLE ERROR IS: In main.cpp:fatal error: uWS/uWS.h: No such file or directory compilation terminated. CMakeFiles/pid.dir/build.make:86: recipe for target 'CMakeFiles/pid.dir/src/main.cpp.o' failed make[2]: [CMakeFiles/pid.dir/src/main.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pid.dir/all' failed make[1]: [CMakeFiles/pid.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

NikolasEnt commented 6 years ago

Hello! Did you complete the full installation path described in the install-ubuntu.sh file. It is very important to See "Dependencies" section of the readme.md file as well. I've comleted the project quite while ago, so, some libraries may be updated and not compatible with the project.

chalsha commented 6 years ago

Hey thanks for the help, it generated an executable pid file after running ./pid command and says Listening to port 4567 HELLO How do I link that to the udacity simulator?

NikolasEnt commented 6 years ago

As far as I can remember the project, you just have to start your script and the simulator in correct order. Of course, if you run them locally.

chalsha commented 6 years ago

Okay! I hope I am not bothering you and actually I downloaded two files for the simulator one is term2_sim_linux and the other is beta_simulator_linux. ./pid(CLIENT) is listening to the first simulator.

MY OBJECTIVE is somehow attack the car when it is going at 20mph to suddenly increase or decrease by 10mph. Do you think this is possible by manipulating your PID.cpp or main.cpp codes and how can I show that in the simulator? THANKS IN ADVANCE!!

chalsha commented 6 years ago

Hi! Now I got to simulate your code, when I run in autonomous mode using "term2_sim_linux" simulator(server), it doesn't run properly for longer time , i mean the car is crashing towards one side. DO I need to change the PID parameters of your code?

NikolasEnt commented 6 years ago

Well, I is quite possible. I observed that quality and performance of the controller depends on your computer. I faced the same issue when I tried to run my code on a laptop, after it was fine-tuned for the best performance on a PC. So, you may need to optimize the parameters on your own to meet your computer capabilities.

chalsha commented 6 years ago

Thanks by the way!

NikolasEnt commented 6 years ago

Great, parameters tuning with patience is all what you need. Good luck with it! Well, after the nanodegree I started working as a computer vision scientist. My main focus is real time video processing with artificial neural network. So, the program was quite helpful for career start.

bobo7727 commented 4 years ago

Install uWebSockets

See Detail: https://github.com/udacity/CarND-Path-Planning-Project/blob/master/install-ubuntu.sh

sudo apt-get install libuv1-dev libssl-dev libz-dev git clone https://github.com/uWebSockets/uWebSockets cd uWebSockets git checkout e94b6e1 #Important,CMakeList.txt in this commit. mkdir build cd build cmake .. make sudo make install sudo ln -s /usr/lib64/libuWS.so /usr/lib/libuWS.so #Important, link libuWS.so sudo rm -r uWebSockets