Robotics teaching kit TK1 - Localization Lab

Hi,

I am trying to complete the Localization problem(Module 08 - Robot Localization) with Jetson tk1 and a custom built robot based on the documentation. But the explanation about the lab setup is confusing . Does any one completed this part of the course ? . Can some one please post a photo of the arrangement of the robot , the circle and box arrangement. Does the solution code works ?

Thanks

Lab 8 builds upon the line following code (so students must get that working first), and there are a number of parameters that must be adjusted and tweaked.

Most of the important parameters are found in launch/lab8_localize.launch. The most important is course_length, calculated by having Jet do several laps around the circular track and measuring how many encoder ticks it requires.

Admittedly, the description for lab 8 is a bit vague, so we have created attached graphic that shows the correct setup. The numbers on the graphic correspond to the numbers in the obstacle_map parameter in launch/lab8_localize.launch. While Jet is moving around the circle, when it detects an obstacle on the outside, it will increase its confidence that it’s at one of the two regions on the “map” where there is an object (labeled with 1’s). After sufficient revolutions, Jet should know where it is on the map at all times since it keeps detecting the obstacles during each revolution.

In summary, here are some quick tips for getting the lab to work:

  1. Make sure Jet can follow a line on the ground well
  2. Carefully measure the length of the circle in encoder ticks and update the course length parameter launch/lab8_localize.launch
  3. Check to make sure Jet can reliably detect the objects surrounding the circle
  4. Debug by printing out the weights and probabilities of the particle filter

External Media

Hi Joe and Mehashcn,

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

To Mehashcn, will that be possible for you 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);

After I did a clean build of Ubuntu 16.04 + ros-kinetic-desk-full, now for this Lab8_localization package, I get the catkin_make compiled.

No longer a problem.

Thanks
Jimmy