The object keeps track of three reference frames: world, local, and, grid. 世界坐标系的原点由GridLocationInWorld决定, which defines the bottom-left corner of the map relative to the world frame. LocalOriginInWorld property specifies the location of the origin of the local frame relative to the world frame. The first grid location with index (1,1) begins in the top-left corner of the grid.
map = binaryOccupancyMap creates a 2-D binary occupancy grid with a width and height of 10m. The default grid resolution is one cell per meter.
occupancyMap对象support local coordinates, world coordinates, and grid indices. The first grid location with index (1,1) begins in the top-left corner of the grid.
Use the occupancyMap class to create 2-D maps of an environment with probability values representing different obstacles in your world. You can specify exact probability values of cells or include observations from sensors such as laser scanners.
Probability values are stored using a binary Bayes filter to estimate the occupancy of each grid cell. A log-odds representation is used, with values stored as int16 to reduce the map storage size and allow for real-time applications.
// ranges and angles inputs are vectors of the same length scan = lidarScan(ranges,angles) scan = lidarScan(cart) scan = lidarScan(scanMsg) # 从ROS message中创建
plot(scan)可以显示雷达扫描的曲线
1 2 3 4 5
minRange = 0.1; maxRange = 7; scan2 = removeInvalidData(scan,'RangeLimits',[minRange maxRange]); hold on plot(scan2)
<librarypath="lib/libglobal_planner"> <classname="global_planner/GlobalPlanner"type="global_planner::GlobalPlanner"base_class_type="nav_core::BaseGlobalPlanner"> <description> A implementation of a grid based planner using Dijkstras or A* </description> </class> </library>
A*比Dijkstra少计算很多,但可能不会产生相同路径。另外,在global_planner的A*里,the potentials are computed using 4-connected grid squares, while the path found by tracing the potential gradient from the goal back to the start uses the same grid in an 8-connected fashion. Thus, the actual path found may not be fully optimal in an 8-connected sense. (Also, no visited-state set is tracked while computing potentials, as in a more typical A* implementation, because such is unnecessary for 4-connected grids).
The value of the ROS_MASTER_URI environment variable, http://192.168.1.7:11311, will be used to connect to the ROS master. Initializing global node /matlab_global_node_37037 with NodeURI http://192.168.1.8:20811/
laser_scan_matcher: an incremental laser scan matcher, using Andrea Censi’s Canonical Scan Matcher implementation. It downloads and installs Andrea Censi’s Canonical Scan Matcher [1] locally.
scan_to_cloud_converter: converts LaserScan to PointCloud messages.