Coder Social home page Coder Social logo

correlation_scan_match's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

correlation_scan_match's Issues

memery leak

This package will abort, because of the load map coordinate is not match to laser scan coordinate. This will result in memory leak. You must confirm the map coordinate and laser scan coordinate is matched. I hope this is helpful for you!

How to convert the standard grid map in ros (OccupancyGrid) to the probability map (ProbabilityGrid) required for matching in cartographer, your code seems to be what is the definition of map in convertMap

How to convert the standard grid map in ros (OccupancyGrid) to the probability map (ProbabilityGrid) required for matching in cartographer, your code seems to be what is the definition of map in convertMap

ProbabilityGrid*
location_module::convertMap( const nav_msgs::OccupancyGrid& map_msg )
{

// ROS_ASSERT(map);

CellLimits cell_limits(map_msg.info.width, map_msg.info.height);

double resolution = map_msg.info.resolution;

double origin_x = map_msg.info.origin.position.x + (map->size_x) * map->scale;
double origin_y = map_msg.info.origin.position.y + (map->size_y) * map->scale;

Eigen::Vector2d max(origin_x, origin_y);

map_limits = new Maplimits(resolution, max, cell_limits);

grid = new ProbabilityGrid(*map_limits);

// Convert to player format

for(int i = 0; i < map->size_y; i++){
for(int j = 0; j < map->size_x; j++)
{
int map_index = i * map->size_x + j;
int grid_x = map->size_x - j;
int grid_y = map->size_y - i;
int grid_index = grid_y * map->size_x + grid_x;

if(map_msg.data[map_index] == 100)
  grid->*lookupTable_[grid_index] = 1;
else
  grid->*lookupTable_[grid_index] = 0;
}

}

return grid;

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.