For Robotics teaching kit TK1 - Localization Lab

For this lab, we have the great difficulty to get this package compiled. This lab package is provided by the link sent from Joe.

Will that be possible for someone to send me your compiled package: lab8_localization?

Any suggestions and help will be greatly appreciated.

Thanks
Jimmy

*********************ERROR message
/usr/include/boost/optional/optional.hpp:1210:1: note: ‘boost::get’
get ( optional
opt )
^
/home/nvidia/catkin_ws/src/lab8_localization/src/localization.cpp:84:24: error: ‘stats’ was not declared in this scope
double mean = get<0>(stats);

*********************localization.cpp ****************************

  • jqin debug the get() based on /usr/include/boost/optional/optional.hpp:1210
    template
    inline
    BOOST_DEDUCED_TYPENAME optional::pointer_type
    get ( optional* opt )
    {
    return opt->get_ptr() ;
    }
    */

bool Localization::analyzeState() {
tuple<double, double> stats = getCircularStats(particles, MAP_SIZE);
double mean = get<0>(stats);
double stddev = get<1>(stats);

pose_msg.pose.position.x = mean;
pose_msg.covariance[0] = stddev;
pose_pub.publish(pose_msg);

Moving this thread to the Teaching and Curriculum Support forum.

Without compiling to be sure, we’d guess that there’s a syntax error in your code above line 84 (and you may be reading the compiler output from the bottom up instead of from the top down?)

Can you post the entire compiler output?