udacity / carnd-kidnapped-vehicle-project Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
The error occurs as soon as the Simulator starts communicating with the program
It complains that setAssociations()
as a non-void function doesn't have a return
.
What I found in the forum is the following code from a forum mentor, posted on Dec. 17. I think it can be one way to resolve the warning. Another way is to change Particle
to void
in the function declaration. After all, particle is passed by reference.
Particle ParticleFilter::SetAssociations(Particle &particle, std::vector<int> associations, std::vector<double> sense_x, std::vector<double> sense_y)
{
//particle: the particle to assign each listed association, and association's (x,y) world coordinates mapping to
// associations: The landmark id that goes along with each listed association
// sense_x: the associations x mapping already converted to world coordinates
// sense_y: the associations y mapping already converted to world coordinates
//Clear the previous associations
particle.associations.clear();
particle.sense_x.clear();
particle.sense_y.clear();
particle.associations= associations;
particle.sense_x = sense_x;
particle.sense_y = sense_y;
return particle;
}
In particle_filter.h
, the parameter std_landmark
of ParticleFilter::updateWeights
is described as the std dev of range and bearing. However, in main.cpp
, we pass the array sigma_landmark
, which is used in main.cpp
to add noise to x and y, rather than range and bearing.
The Readme has the following line:
"Tips for setting up your environment can be found here"
And the word "here" is a link to the website https://classroom.udacity.com/nanodegrees/nd013/parts/40f38239-66b6-46ec-ae68-03afd8a601c8/modules/0949fca6-b379-42af-a919-ee50aa304e6a/lessons/f758c44c-5e40-4e01-93b5-1a82aa4e044f/concepts/23d376c7-0195-4276-bdf0-e02f1f3c665d
But that page no longer exists.
There problem in reading map file.
IDE: CLion 2017
OS: Windows 10
In README it is not entirely clear which files should a student modify.
Here it implies you should only touch particle_filter.cpp
:
All you will submit is your completed version of particle_filter.cpp, which is located in the src directory.
Here it says you can actually change main.cpp
:
The program main.cpp has already been filled out, but feel free to modify it.
Over here it says you can modify both .cpp
and .h
files for the filter:
Note that the programs that need to be written to accomplish the project are src/particle_filter.cpp, and particle_filter.h
In addition, project rubric does not specify that you can only change the .cpp
file.
I am at this project now, and some methods require too much processing and I think it would be much better design to introduce additional methods in the header file to make functionality more modular, but I am afraid the project would not pass if I do so. Please clarify.
in the updateWeights
function it says:
// Note that you'll need to switch the minus sign in that equation to a plus to account
// for the fact that the map's y-axis actually points downwards.
It is agreed that
That comment is incorrect, you shouldn’t change the sign. they still haven’t fixed it.
Discussion from: https://carnd.slack.com/archives/C4TSP7BFU/p1494255995984903
Hi, I was at the head of visualizer branch (10acff6) and tried to install uWebSockets using install-mac.sh
script on my mac. The script starts failing from line 5 complaining no ../cmakepatch.txt
to patch and there is no such file in the repository. Am I missing anything here?
thanks in advanced
Full log:
./install-mac.sh
Warning: openssl is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: libuv-1.11.0 already installed
Warning: cmake-3.8.1 already installed
Cloning into 'uWebSockets'...
remote: Counting objects: 4342, done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 4342 (delta 5), reused 0 (delta 0), pack-reused 4323
Receiving objects: 100% (4342/4342), 2.36 MiB | 445.00 KiB/s, done.
Resolving deltas: 100% (2801/2801), done.
Note: checking out 'e94b6e1'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at e94b6e1... Node.js: add getResponsePrototype, getRequestPrototype again
./install-mac.sh: line 5: ../cmakepatch.txt: No such file or directory
-- The C compiler identification is AppleClang 8.0.0.8000042
-- The CXX compiler identification is AppleClang 8.0.0.8000042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/local/Cellar/cmake/3.8.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.8.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.8.1/share/cmake/Modules/FindOpenSSL.cmake:387 (find_package_handle_standard_args)
CMakeLists.txt:8 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/hsin-cheng/Udacity/CarND/SDC_P8/uWebSockets/build/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
main.cpp
...
36 double sigma_pos [3] = {0.3, 0.3, 0.01}; // GPS measurement uncertainty [x [m], y [m], theta [rad]]
...
82 pf.prediction(delta_t, sigma_pos, previous_velocity, previous_yawrate);
Although it will work as is, using GPS uncertainty on prediction step is confusing and bad for understanding of whole process. For prediction step, velocity and yaw rate uncertainties should be used.
When I intall uWebSocketIO in ubuntu by execute install-ubuntu.sh, I encouter a error:
CarND-Kidnapped-Vehicle-Project-master/CarND-Kidnapped-Vehicle-Project-master/src/main.cpp:1:21: fatal error: uWS/uWS.h: No such file or directory
where is this file or directory?
Suggest considering adding #define _USE_MATH_DEFINES
to helper_functions.h
,
VS17 build Engine version 15.1.1012.6693
succeeds with this and fails without.
The method description says:
* @param std_landmark[] Array of dimension 2 [standard deviation of range [m],
* standard deviation of bearing [rad]]
...
void updateWeights(double sensor_range, double std_landmark[], std::vector<LandmarkObs> observations,
Map map_landmarks);
However in main.cpp
, the 2nd argument's nature is different:
double sigma_landmark [2] = {0.3, 0.3}; // Landmark measurement uncertainty [x [m], y [m]]
...
pf.updateWeights(sensor_range, sigma_landmark, noisy_observations, map);
It's better define a structure for passing this kind of data into the method.
In windows the math.h does not define the constant M_PI. So we get an error as M_PI was not declared in the scope in windows.
To fix this add
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
helper_functions.h file
Hi, I was trying to start work on the project from my Mac but I am having issues with the install-mac.sh file. It had issues from line 5 which I resolved due to someones comment on an earlier issue. Now however, Im having issues with it not being able to find openssl/opensslv.h any guidance would be appreciated
Thanks in advance
Full log:
Updating Homebrew...
Warning: [email protected] 1.1.1g is already installed and up-to-date
To reinstall 1.1.1g, run brew reinstall [email protected]
Warning: libuv 1.38.1 is already installed and up-to-date
To reinstall 1.38.1, run brew reinstall libuv
Warning: cmake 3.18.0 is already installed and up-to-date
To reinstall 3.18.0, run brew reinstall cmake
Cloning into 'uWebSockets'...
remote: Enumerating objects: 106, done.
remote: Counting objects: 100% (106/106), done.
remote: Compressing objects: 100% (80/80), done.
remote: Total 7289 (delta 58), reused 54 (delta 26), pack-reused 7183
Receiving objects: 100% (7289/7289), 3.29 MiB | 147.00 KiB/s, done.
Resolving deltas: 100% (4848/4848), done.
Note: switching to 'e94b6e1'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e94b6e1 Node.js: add getResponsePrototype, getRequestPrototype again
patching file CMakeLists.txt
-- The C compiler identification is AppleClang 11.0.3.11030032
-- The CXX compiler identification is AppleClang 11.0.3.11030032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenSSL: /usr/local/Cellar/[email protected]/1.1.1d/lib/libcrypto.dylib
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libz.tbd (found version "1.2.11")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/giffinosborne/CLionProjects/CarND-Kidnapped-Vehicle-Project/uWebSockets/build
Scanning dependencies of target uWS
[ 6%] Building CXX object CMakeFiles/uWS.dir/src/Extensions.cpp.o
[ 13%] Building CXX object CMakeFiles/uWS.dir/src/Group.cpp.o
In file included from /Users/giffinosborne/CLionProjects/CarND-Kidnapped-Vehicle-Project/uWebSockets/src/Group.cpp:1:
In file included from /Users/giffinosborne/CLionProjects/CarND-Kidnapped-Vehicle-Project/uWebSockets/src/Group.h:4:
In file included from /Users/giffinosborne/CLionProjects/CarND-Kidnapped-Vehicle-Project/uWebSockets/src/WebSocket.h:4:
In file included from /Users/giffinosborne/CLionProjects/CarND-Kidnapped-Vehicle-Project/uWebSockets/src/WebSocketProtocol.h:5:
/Users/giffinosborne/CLionProjects/CarND-Kidnapped-Vehicle-Project/uWebSockets/src/Networking.h:4:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/uWS.dir/src/Group.cpp.o] Error 1
make[1]: *** [CMakeFiles/uWS.dir/all] Error 2
make: *** [all] Error 2
[ 6%] Building CXX object CMakeFiles/uWS.dir/src/Group.cpp.o
In file included from /Users/giffinosborne/CLionProjects/CarND-Kidnapped-Vehicle-Project/uWebSockets/src/Group.cpp:1:
In file included from /Users/giffinosborne/CLionProjects/CarND-Kidnapped-Vehicle-Project/uWebSockets/src/Group.h:4:
In file included from /Users/giffinosborne/CLionProjects/CarND-Kidnapped-Vehicle-Project/uWebSockets/src/WebSocket.h:4:
In file included from /Users/giffinosborne/CLionProjects/CarND-Kidnapped-Vehicle-Project/uWebSockets/src/WebSocketProtocol.h:5:
/Users/giffinosborne/CLionProjects/CarND-Kidnapped-Vehicle-Project/uWebSockets/src/Networking.h:4:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
The reason I file this issue is because when I running my code in my local 1.8Ghz dual-core laptop, it becomes so hard to achieve the goal (24430 timestep in 100 seconds). Finally, I switched to the workspace provided by Udacity, and made it. I think someone would try using slow laptop to run the code at local like me, and that very drives me crazy.
Hi @AndyAtUdacity, @awbrown90, @baumanab,
Notice that our project doesn't have license, that's a little unprofessional for a open source project, especially there has much extends adoption and development in an online education project. "No license terms" means users don't know it can be used freely. Another reference is Can I call my program "Open Source" even if I don't use an approved license?.
So here I suggest the project add license, recommend we choose one of the below license, firstly because they're all Permissive Licenses, but they have different redistribution disclaimer:
Regards,
Brandon
In particle_filter.cpp line 37:
`void ParticleFilter::prediction(double delta_t, double std_pos[],
double velocity, double yaw_rate) {
/**
}`
Could "Add measurements" be "Add movement"?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.