29 ROS_ERROR(
"Unable to find obstacle layer parameter.");
35 ROS_ERROR(
"Unable to find ground layer parameter.");
98 _mapOut.
getIndex(vehPosition, vehIndex);
100 int numRows = _mapOut.
getSize()(0);
103 int topRow = startIdx(0);
104 int bottomRow = (startIdx(0) + (numRows - 1)) % numRows;
105 int leftCol = startIdx(1);
106 int rightCol = (startIdx(1) + (numRows - 1)) % numRows;
108 for(
int i = 0; i < numRows; i++)
124 bool obstacleFound =
false;
131 if (nonground(lineIndex(0), lineIndex(1)) == 100)
133 obstacleFound =
true;
135 else if (obstacleFound && ground(lineIndex(0), lineIndex(1)) > 0)
139 obstacleFound =
false;
140 nonground(lineIndex(0), lineIndex(1)) = 0;
143 else if (obstacleFound)
146 nonground(lineIndex(0), lineIndex(1)) = 20;
150 nonground(lineIndex(0), lineIndex(1)) = 0;
PLUGINLIB_EXPORT_CLASS(mitre_fast_layered_map::RayTrace2d, filters::FilterBase< grid_map::GridMap >)
const Index & getStartIndex() const
bool getPosition(const Index &index, Position &position) const
std::string groundLayer_
Layer for setting ground plane points.
bool getParam(const std::string &name, std::string &value)
bool exists(const std::string &layer) const
bool trace(grid_map::GridMap &_map, const grid_map::Index &start, const grid_map::Index &end)
std::string mode_
Production or testing. If testing mode will throw errors if calculations break bounds.
Filters that operate on a grid map instance.
virtual bool update(const grid_map::GridMap &_mapIn, grid_map::GridMap &_mapOut)
bool getIndex(const Position &position, Index &index) const
std::string nongroundLayer_
blocking rays
const Size & getSize() const