Giter Club home page Giter Club logo

carnd-extended-kalman-filter-project's Introduction

Extended Kalman Filter Project Starter Code

Self-Driving Car Engineer Nanodegree Program

In this project you will utilize a kalman filter to estimate the state of a moving object of interest with noisy lidar and radar measurements. Passing the project requires obtaining RMSE values that are lower than the tolerance outlined in the project rubric.

This project involves the Term 2 Simulator which can be downloaded here.

This repository includes two files that can be used to set up and install uWebSocketIO for either Linux or Mac systems. For windows you can use either Docker, VMware, or even Windows 10 Bash on Ubuntu to install uWebSocketIO. Please see the uWebSocketIO Starter Guide page in the classroom within the EKF Project lesson for the required version and installation scripts.

Once the install for uWebSocketIO is complete, the main program can be built and run by doing the following from the project top directory.

  1. mkdir build
  2. cd build
  3. cmake ..
  4. make
  5. ./ExtendedKF

Tips for setting up your environment can be found in the classroom lesson for this project.

Note that the programs that need to be written to accomplish the project are src/FusionEKF.cpp, src/FusionEKF.h, kalman_filter.cpp, kalman_filter.h, tools.cpp, and tools.h

The program main.cpp has already been filled out, but feel free to modify it.

Here is the main protocol that main.cpp uses for uWebSocketIO in communicating with the simulator.

INPUT: values provided by the simulator to the c++ program

["sensor_measurement"] => the measurement that the simulator observed (either lidar or radar)

OUTPUT: values provided by the c++ program to the simulator

["estimate_x"] <= kalman filter estimated position x

["estimate_y"] <= kalman filter estimated position y

["rmse_x"]

["rmse_y"]

["rmse_vx"]

["rmse_vy"]


Other Important Dependencies

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory: mkdir build && cd build
  3. Compile: cmake .. && make
    • On windows, you may need to run: cmake .. -G "Unix Makefiles" && make
  4. Run it: ./ExtendedKF

Editor Settings

We've purposefully kept editor configuration files out of this repo in order to keep it as simple and environment agnostic as possible. However, we recommend using the following settings:

  • indent using spaces
  • set tab width to 2 spaces (keeps the matrices in source code aligned)

Code Style

Please (do your best to) stick to Google's C++ style guide.

Generating Additional Data

This is optional!

If you'd like to generate your own radar and lidar data, see the utilities repo for Matlab scripts that can generate additional data.

Project Instructions and Rubric

Note: regardless of the changes you make, your project must be buildable using cmake and make!

More information is only accessible by people who are already enrolled in Term 2 (three-term version) or Term 1 (two-term version) of CarND. If you are enrolled, see the Project Resources page in the classroom for instructions and the project rubric.

Hints and Tips!

  • You don't have to follow this directory structure, but if you do, your work will span all of the .cpp files here. Keep an eye out for TODOs.

  • Students have reported rapid expansion of log files when using the term 2 simulator. This appears to be associated with not being connected to uWebSockets. If this does occur, please make sure you are conneted to uWebSockets. The following workaround may also be effective at preventing large log files.

    • create an empty log file
    • remove write permissions so that the simulator can't write to log
  • Please note that the Eigen library does not initialize VectorXd or MatrixXd objects with zeros upon creation.

Call for IDE Profiles Pull Requests

Help your fellow students!

We decided to create Makefiles with cmake to keep this project as platform agnostic as possible. Similarly, we omitted IDE profiles in order to ensure that students don't feel pressured to use one IDE or another.

However! We'd love to help people get up and running with their IDEs of choice. If you've created a profile for an IDE that you think other students would appreciate, we'd love to have you add the requisite profile files and instructions to ide_profiles/. For example if you wanted to add a VS Code profile, you'd add:

  • /ide_profiles/vscode/.vscode
  • /ide_profiles/vscode/README.md

The README should explain what the profile does, how to take advantage of it, and how to install it.

Regardless of the IDE used, every submitted project must still be compilable with cmake and make.

How to write a README

A well written README file can enhance your project and portfolio. Develop your abilities to create professional README files by completing this free course.

carnd-extended-kalman-filter-project's People

Contributors

alexxucui avatar amintahmasbi avatar andrewpaster avatar awbrown90 avatar baumanab avatar brandonhe avatar cameronwp avatar citlaligm avatar danziger avatar deniskrut avatar domluna avatar dwillmer avatar ianboyanzhang avatar kerrickstaley avatar kylesf avatar mleonardallen avatar mvirgo avatar nateous avatar sudkul avatar swwelch avatar tsekityam avatar vatavua avatar wolfgangsteiner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

carnd-extended-kalman-filter-project's Issues

wrong comment

Not that important but the last line of "ground_truth_package.h" should be:

#endif /* GROUND_TRUTH_PACKAGE_H_ */

instead of

#endif /* MEASUREMENT_PACKAGE_H_ */

Data does not follow convention

Based on the "Docs/Input_Output File Format.txt" document, the input file line should have 8 members for Lidar and 9 members for Radar.

However, in "obj_pose-laser-radar-synthetic-input.txt", there are two extra members in each line.

extra_data

What am I missing here?

The project has no license

Hi @deniskrut, @andrewpaster, @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

Problem with gcc versions, make and cmake.

Hi all, my computer is running on MacOS Sierra 10.12.5. I had two questions regarding to the compilation of the code and using cmake and make.

  1. I just finish the code in /src and wanted to compile the code. I followed the instructions, creating a "build" folder, and ran cmake .., it gave me this:
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Work/Documents/udacity/CarND-Extended-Kalman-Filter-Project

Then I ran make, it gave me this:

make: *** No targets specified and no makefile found. Stop.

It seems like cmake was not able to find the Makefile in the upper directory of folder "build". What would possibly be the cause of the problem?

  1. Because of the above error message I got, I tried to run make directly under the project root directory, it throughs me an error too:
[ 20%] Building CXX object CMakeFiles/ExtendedKF.dir/src/main.cpp.o
In file included from /Users/Work/Documents/udacity/CarND-Extended-Kalman-Filter-Project/src/main.cpp:3:0:
/Users/Work/Documents/udacity/CarND-Extended-Kalman-Filter-Project/src/json.hpp:67:10: error: #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
         #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
          ^
make[2]: *** [CMakeFiles/ExtendedKF.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/ExtendedKF.dir/all] Error 2
make: *** [all] Error 2

It seems like I am not having the right gcc version. I checked my gcc version by typing in gcc --version, and I got

gcc (GCC) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I also installed gcc5, gcc6 and gcc7 but I don't know how to specify which version to use. Do I need to do so? I assume the make file contain the instructions to compile the C++ code for this particular project.

Sorry I am new to C++ and compiler. Thank you for your time.

Data inconsistent

CarND-Extended-Kalman-Filter-Project/data/obj_pose-laser-radar-synthetic-input.txt is not consistent. The velocity describes an oval, the velocity magnitude in x- and y-direction differs by an order of magnitude. The position describes a circle segment and the way back to the origin.

cmake, make, and gcc/g++

Without any coverage in the course material leading to this project, we probably shouldn't assume every student knows what below means.

cmake >= v3.5
make >= v4.1
gcc/g++ >= v5.4

asertion failed : eigen_assert(aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols());

Dear, I have a query, I know that this is due to an error in the dimensions of the matrices, but when compiling it does not present any error, I attach the complete code and the instructions that generate the error.

          //IMPLEMENTACION DE UN ALGORITMO DE  APRENDIZAJE SOM-RNA KOHONEN EN C++

//El proceso de aprendizaje de SOM es estocástico, fuera de línea y no supervisado.
//clase VectorXd representa un vector de tamaño dinámico en Eigen.
//En este caso, el vector se inicializa con valores aleatorios usando la función Random.

//El código dentro de la macro eigen_assert(aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols())
//comprueba si el número de filas y columnas de ambas matrices es el mismo.
//Si estas dimensiones no son iguales, se generará un error en tiempo de compilación.
#include
#include <Eigen/Dense>//Eigen es una biblioteca de C++ para álgebra lineal que proporciona tipos de datos y operaciones eficientes para trabajar con matrices y vectores.
#include
#include
using namespace Eigen;
using namespace std;

class KohonenNetwork{
public:
MatrixXd weights;//MatrixXd: Este es un tipo de datos proporcionado por la biblioteca Eigen
//que representa una matriz de valores de tipo double.
int inputSize;
int outputSize;

KohonenNetwork(int inputSize, int outputSize)
    : inputSize(inputSize), outputSize(outputSize) {
    // Inicialización aleatoria de pesos
    std::srand(std::time(0));//srand(): Es una función en C que inicializa la semilla del generador de números aleatorios utilizado por la función rand().

    weights = MatrixXd::Random(outputSize, inputSize);//VARIABLE PESOS

    // ::Random(outputSize, inputSize) : Este es un método que se llama en el tipo de datos MatrixXd
    //para inicializar la matriz con valores aleatorios.outputSize y inputSize son los tamaños de la matriz resultante, donde outputSize es el número de filas y inputSize es el número de columnas.
}

int findWinner(const VectorXd& input) const {//FUNCION PARA DETERMINAR NEURONA GANADORA
    int winner = 0;
    double minDistance = (weights.row(0) - input).squaredNorm();

    for (int i = 1; i < outputSize; ++i) {
        double distance = (weights.row(i) - input).squaredNorm();
        if (distance < minDistance) {
            minDistance = distance;
            winner = i;//neurona ganadora
        }
    }

    return winner;    }

/* int encontrarGanadora(const VectorXd& entrada) const {
// Encontrar la neurona ganadora (neurona con el peso más cercano a la entrada)
double mejorDistancia = std::numeric_limits::max();
int neuronaGanadora = 0;

    for (int i = 0; i < numNeuronas; ++i) {
        double distancia = (pesos.row(i) - entrada).norm();

        if (distancia < mejorDistancia) {
            mejorDistancia = distancia;
            neuronaGanadora = i;//NEURONA GANADORA
        }
    }

    return neuronaGanadora;
}

*/

void updateWeights(int winner, const VectorXd& input, double learningRate) {
    weights.row(winner) += learningRate * (input - weights.row(winner));
}

MatrixXd getWeights() const {
    return weights;
}

};

int main() {
// Configuración de la red
const int inputSize = 2;
const int outputSize = 4;
const int numTrainingSamples = 1000;
const double learningRate = 0.1;
int winner;
const int numSensores = 4;
// VectorXd input;

// Inicialización de la semilla para números aleatorios
srand(static_cast<unsigned int>(time(nullptr)));



/*entrada << -1, 0,
           -1, 1,
           -1, -1,
            0, -1,
            0, 1,
            0, 0,
            1, 1,
            1, -1,
            1, 0;
std::cout <<entrada;*/

            
/* ([[-1, 0], // sin obstaculos
    [-1, 1], //sin obstaculos
    [-1, -1], // sin obstaculos
    [0, -1], // obstaculo detectado a derecha
    [0, 1], // obstaculo a izq
    [0, 0], //obstaculo centro
    [1, 1],// demasiado cerca a derecha
    [1, -1], //demasiado cerca a izq
    [1, 0]    // demasiado cerca centro
] ); */
// Crear datos de entrenamiento (simulados)
MatrixXf trainingData(inputSize, numTrainingSamples);
trainingData = MatrixXf::Random(inputSize, numTrainingSamples);

        // Crear y entrenar la red
     KohonenNetwork kohonen(inputSize, outputSize);

     // Entrada de ejemplo desde los sensores (valores digitales aleatorios)
   
     VectorXf entrada = VectorXf::Random(numSensores);//En este código, VectorXd es un tipo de datos proporcionado por la biblioteca Eigen
   
     
     //Eigen::MatrixXd m(2, 2);  // Entrada de ejemplo desde los sensores (valores digitales aleatorios)
  //   m(0, 0) = 3;
  //   m(1, 0) = 2.5;
  //   m(0, 1) = -1;
   //  m(1, 1) = 2;
     //para representar vectores dinámicos de tamaño variable. 
     //La función Random genera valores aleatorios en el rango [-1, 1] y los asigna al vector entrada. Este vector ahora contiene numEntradas valores digitales aleatorios.
    
for (int epoch = 0; epoch < 1000; ++epoch) {
    // Realizar un pase hacia adelante y hacia atrás por cada ejemplo de entrenamiento
    for (int i = 0; i < numTrainingSamples; ++i) {
        VectorXf input = trainingData.col(i);

        // Pase hacia adelante y hacia atrás
     winner = kohonen.findWinner(input);//genera error
      int neuronaGanadora =kohonen.findWinner(entrada);//GENERARA ERROR
     kohonen.updateWeights(winner, input, learningRate);//genera error
    }
}
// Obtener los pesos finales
MatrixXd finalWeights = kohonen.getWeights();
// Mostrar resultados

// std::cout << "datos de entrenamiento: \n" << trainingData.transpose() << "\n";
std::cout << "Pesos finales de la red de Kohonen:\n" << finalWeights << "\n";
std::cout << "datos de entrada de la red de Kohonen:\n" << entrada << "\n";
std::cout << "datos de entrenamiento:\n " <<trainingData << "\n";
std::cout << "neurona de salida:\n" << outputSize << "\n";
std::cout << "neurona de salida:\n" << inputSize << "\n";
// std::cout << "mostramos el vector de entrada m:\n" << m << std::endl;

}

The institutions that generate this error are the following:

// Pase hacia adelante y hacia atrás
winner = kohonen.findWinner(input);//genera error
int neuronaGanadora =kohonen.findWinner(entrada);//GENERARA ERROR
kohonen.updateWeights(winner, input, learningRate);//genera error

Thank you for any suggestions to solve the problem during the compilation of the code developed in C++

Eigen members within structures need to be aligned

I had been using Eigen with another application and noticed a recurring seg fault when trying to end the application. valgrind pointed me to a memory alignment issue within Eigen, which led me to this:

https://eigen.tuxfamily.org/dox/group__TopicStructHavingEigenMembers.html

I believe that your code for all term 2 projects that use Eigen needs to include EIGEN_MAKE_ALIGNED_OPERATOR_NEW in the public members area wherever an Eigen container is declared within a struct/class.

Issue when the phi values are in 3rd quadrant(180 to 270 degree)

Hello,

I am using this code for experiments for other synthetic data where data is generated by matlab , I see that estimations are totally wrong when the (x, y) both are negative which means the when phi is 180 to 270. Can you please let me know if you have any idea ?

Regards
Bheeshma

readme need to update for "Run it" instruction after merge project_v2

Basic Build Instructions

Clone this repo.
Make a build directory: mkdir build && cd build
Compile: cmake .. && make
On windows, you may need to run: cmake .. -G "Unix Makefiles" && make
Run it: ./ExtendedKF path/to/input.txt path/to/output.txt. You can find some sample inputs in 'data/'.
eg. ./ExtendedKF ../data/obj_pose-laser-radar-synthetic-input.txt

install-mac.sh installs OpenSSL with homebrew, but does not find it automatically

The install-mac.sh fails and produces the following error:

CMake Error at /usr/local/Cellar/cmake/3.8.2/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.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE) /usr/local/Cellar/cmake/3.8.2/share/cmake/Modules/FindOpenSSL.cmake:387 (find_package_handle_standard_args) CMakeLists.txt:8 (find_package)

I had to change cmake .. with cmake -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2l -DOPENSSL_LIBRARIES=/usr/local/Cellar/openssl/1.0.2l/lib .. to make the script work as mentioned in #32 .

Can you adjust the script that it automatically detects the openssl root dir?

install-mac.sh does not work from Mac OS 10.11 upwards

I've just tried to install uWebSocket on Mac OS Sierra using install-mac.sh and got the following error:

CMake Error at cmake_install.cmake:39 (file):
   file cannot create directory: /usr/lib64.  Maybe need administrative
   privileges.

make: *** [install] Error 1

Apparently the System Integrity Protection introduced in Mac OS 10.11 prohibits even super users from making changes to /usr.

I tried to change the cmake .. line to

cmake .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib,

but I am still getting the same error.

Kalman Filter object not re-initialized upon environment 'restart event'

Whenever restarting or switching datasets (which includes a restart) in the simulator environment,
the kalman filter object retains its object state (state matrix, process covariance matrix, etc), although the object should be re-initialized.

  • Not reinitializing them actually makes the performance worse on a second run as compared to a first run
  • Not reinitializing upon switching environments can actually make the kalman filter code crash

I printed out the full messages being received from the websocket connection, but there doesnt seem to be one including a flag for either 'restart' or for 'switched datasets'.

Currently seemingly only solution is upon restart, also quit the Kalman filter code and restart the code, but this is cumbersome. Is there a way to make the kalman filter code more robust by receiving some event when the code has to be re-initialized?

Segmentation fault: 11 when testing

When I cloned the repo and did a test run, I got a "Segmentation fault: 11" seemingly near the end of the program. Is this is expected?

Terminal output:
Jamess-iMac:build Jimmy$ cmake .. && make
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Jimmy/Documents/Udacity/CarND-Extended-Kalman-Filter-Project/build
Scanning dependencies of target ExtendedKF
[ 20%] Building CXX object CMakeFiles/ExtendedKF.dir/src/tools.cpp.o
[ 40%] Linking CXX executable ExtendedKF
[100%] Built target ExtendedKF
Jamess-iMac:build Jimmy$ ./ExtendedKF ../data/sample-laser-radar-measurement-data-1.txt output.txt
EKF:
x_ = 1
1
1
1
P_ =
...
x_ = 1
1
1
1
P_ =
Accuracy - RMSE:
Segmentation fault: 11
Jamess-iMac:build Jimmy$

issue running make command

Hi after running cmake .. I have issue running make command:

D:\Git_repo\CarND-Extended-Kalman-Filter-Project\build>cmake ..
-- Building for: Visual Studio 14 2015
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Git_repo/CarND-Extended-Kalman-Filter-Project/build

D:\Git_repo\CarND-Extended-Kalman-Filter-Project\build>make
make: *** No targets specified and no makefile found.  Stop.

output

hello, i make successed and run ./ExtendedKF in build folder,
and the output is: Listening to port 4567, don't see any output.

variable timestamp_ bits

I noticed timestamp_ in GroundTruthPackage class uses long (32bits) but in MeasurementPackage it uses long long (64 bits). Shouldn't we use same number of bits in both places? And it seems 32 bits cannot hold all widths of time stamps.

It probably won't report out error as we care only about delta in time stamps, but it will incur truncation by long(32bits) I believe.

Error compiling the code on MacOS 10.10.5 and cmake version 3.8.1

Here is the error that i got:

cala-am02024907:build lauc136$ make
Scanning dependencies of target ExtendedKF
[ 20%] Building CXX object CMakeFiles/ExtendedKF.dir/src/main.cpp.o
/Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:41:5: error:
no matching member function for call to 'onMessage'
h.onMessage([&fusionEKF,&tools,&estimations,&ground_truth](uWS::WebSoc...
~~^~~~~~~~~
/usr/local/include/uWS/Group.h:69:10: note: candidate function not viable: no
known conversion from '(lambda at
/Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:41:15)'
to 'std::function<void (WebSocket *, char *, size_t, OpCode)>' for
1st argument
void onMessage(std::function<void(WebSocket *, char *, siz...
^
/usr/local/include/uWS/Group.h:69:10: note: candidate function not viable: no
known conversion from '(lambda at
/Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:41:15)'
to 'std::function<void (WebSocket *, char *, size_t, OpCode)>' for
1st argument
void onMessage(std::function<void(WebSocket *, char *, siz...
^
/Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:165:5: error:
no matching member function for call to 'onConnection'
h.onConnection([&h](uWS::WebSocketuWS::SERVER ws, uWS::HttpRequest req) {
~~^~~~~~~~~~~~
/usr/local/include/uWS/Group.h:67:10: note: candidate function not viable: no
known conversion from '(lambda at
/Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:165:18)'
to 'std::function<void (WebSocket *, HttpRequest)>' for 1st argument
void onConnection(std::function<void(WebSocket *, HttpRequ...
^
/usr/local/include/uWS/Group.h:67:10: note: candidate function not viable: no
known conversion from '(lambda at
/Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:165:18)'
to 'std::function<void (WebSocket *, HttpRequest)>' for 1st
argument
void onConnection(std::function<void(WebSocket *, HttpRequ...
^
/Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:169:5: error:
no matching member function for call to 'onDisconnection'
h.onDisconnection([&h](uWS::WebSocketuWS::SERVER ws, int code, char ...
~~^~~~~~~~~~~~~~~
/usr/local/include/uWS/Group.h:70:10: note: candidate function not viable: no
known conversion from '(lambda at
/Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:169:21)'
to 'std::function<void (WebSocket *, int, char *, size_t)>' for 1st
argument
void onDisconnection(std::function<void(WebSocket *, int c...
^
/usr/local/include/uWS/Group.h:70:10: note: candidate function not viable: no
known conversion from '(lambda at
/Users/lauc136/Downloads/CarND-Extended-Kalman-Filter-Project-project_v2/src/main.cpp:169:21)'
to 'std::function<void (WebSocket *, int, char *, size_t)>' for 1st
argument
void onDisconnection(std::function<void(WebSocket *, int c...
^
3 errors generated.
make[2]: *** [CMakeFiles/ExtendedKF.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/ExtendedKF.dir/all] Error 2
make: *** [all] Error 2
cala-am02024907:build lauc136$

Assertion `aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols()' failed.

I try to run this project in Qt Creator,then run term2_sim.x86_64,there is a error lead to unexpectedly finished of the program.
Error show:
Starting /home/xiefeng/Udacity/CarND-Extended-Kalman-Filter-Project-master/build/ExtendedKF...
Listening to port 4567
Connected!!!
EKF:
ExtendedKF: /home/xiefeng/Udacity/CarND-Extended-Kalman-Filter-Project-master/src/Eigen/src/Core/CwiseBinaryOp.h:132: Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::CwiseBinaryOp(const Lhs&, const Rhs&, const BinaryOp&) [with BinaryOp = Eigen::internal::scalar_difference_op; Lhs = const Eigen::Matrix<double, -1, 1>; Rhs = const Eigen::GeneralProduct<Eigen::Matrix<double, -1, -1>, Eigen::Matrix<double, -1, 1>, 4>]: Assertion `aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols()' failed.
The program has unexpectedly finished.

Segmentation fault on OS X

Running the project using

./ExtendedKF ../data/sample-laser-radar-measurement-data-1.txt output.txt > error.txt

Gives me the following error

[1] 27390 segmentation fault ./ExtendedKF ../data/sample-laser-radar-measurement-data-1.txt output.txt >

(This error appears without piping to a file as well, but I piped to a file so I could attach the output to this post)

OS X version 10.12.3
CMake 3.7.2
Make 3.81 (I couldn't find a way to update OS X to Make 4.1)

And attached are the relevant files
output.txt
error.txt
sample-laser-radar-measurement-data-1.txt

Segmentation fault (core dumped) with Term 2 Simulator in Ubuntu Bash on Windows 10

I was setting up the environment for the EKF project. I installed the Ubuntu bash on Windows 10, and I was trying to run the simulator.

First I extracted the simulator to a folder, changed the permission to execute the file
chmod ug+x ./term2_sim.x86_64

Then I found that in order to run the exe there are some dependencies, so I installed all the dependencies it complained for
sudo apt-get install libglu1
sudo apt-get install libxcursor1
sudo apt-get install libxrandr2

But now wen I run this command to run the simulator.
sudo ./term2_sim.x86_64

I get this error

"Segmentation fault (core dumped)"

I am not sure if I am doing something wrong, could you please help ?

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.