MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / getVectorToFirstCell

Function getVectorToFirstCell

grid_map_core/src/GridMapMath.cpp:44–53  ·  view source on GitHub ↗

! * Gets the vector from the center of the map to the center * of the first cell of the map data. * @param[out] vectorToFirstCell the vector from the center of the cell to the center of the map. * @param[in] mapLength the lengths in x and y direction. * @param[in] resolution the resolution of the map. * @return true if successful. */

Source from the content-addressed store, hash-verified

42 * @return true if successful.
43 */
44inline bool getVectorToFirstCell(Vector& vectorToFirstCell,
45 const Length& mapLength, const double& resolution)
46{
47 Vector vectorToOrigin;
48 getVectorToOrigin(vectorToOrigin, mapLength);
49
50 // Vector to center of cell.
51 vectorToFirstCell = (vectorToOrigin.array() - 0.5 * resolution).matrix();
52 return true;
53}
54
55inline Eigen::Matrix2i getBufferOrderToMapFrameTransformation()
56{

Callers 1

getPositionFromIndexFunction · 0.85

Calls 1

getVectorToOriginFunction · 0.85

Tested by

no test coverage detected