osm_planner implements global path planning based on geographic vectors. Given a start and end point, it can automatically plan a path.
OpenStreetMap (OSM) is a free, open online map project aiming to create a freely editable world map. This project is driven by a volunteer community, and anyone can participate and contribute data. Here's a detailed introduction to OpenStreetMap:
- Open Data: OSM data is free to use for any purpose, including commercial use. It is licensed under the open-source Open Database License (ODbL).
- Global Coverage:OSM covers map data globally, including roads, buildings, natural landscapes, etc.
- Community-Driven: Maintained and edited by volunteers worldwide. Anyone can register an account and start contributing data.
- Diverse Data Layers: OSM includes not only roads and buildings but also trails, rivers, parks, railways, public transport routes, and more.
- Flexible Usage
- Data can be downloaded in various formats, including XML, PBF, Shapefiles, etc.
- Provides multiple API interfaces to facilitate application development.
- Nodes
- Basic geographic data units representing a specific point on the map, usually using latitude and longitude coordinates.
- Ways
- Composed of multiple nodes forming a line segment, which can represent roads, rivers, boundaries, etc.
- Relations
- Complex structures composed of multiple nodes and ways, representing bus routes, boundaries, and more complex relationships.
- Tags
- Add information to nodes, ways, and relations. Tags are key-value pairs; for example, a road tag might be
highway=residential
.
- Add information to nodes, ways, and relations. Tags are key-value pairs; for example, a road tag might be
- Navigation and Positioning
- Used in GPS devices, navigation systems, and map applications like OsmAnd, Maps.me, etc.
- Geographic Information Systems (GIS)
- OSM data can be integrated into various GIS platforms for analysis and visualization.
- Urban Planning and Research
- Urban planners and researchers can use OSM data for urban development, traffic flow analysis, and more.
- Game Development
- Used to create game environments with real-world geographic information.
- Disaster Response
- Volunteers can quickly update OSM data after natural disasters like earthquakes or floods, providing up-to-date map information to aid rescue efforts.
Use JOSM (Java OpenStreetMap Editor), a powerful desktop editor.
Refer to the specific process at https://py1995.blog.csdn.net/article/details/138162392.
Configure parameters in ./config/ros_param.yaml
.
interpolation_max_distance: 1.5 # Maximum interpolation distance between two points
filter_of_ways: ["footway"] # Filter for parser. Parse only routes that have values on the list; if the value is "all", then parse all routes
footway_width: 3 # Width of the road
In a multi-sensor fusion SLAM program with a GPS sensor, add the following code:
ros::param::set("origin_latitude", gpsMsg->latitude);
ros::param::set("origin_longitude", gpsMsg->longitude);
This coordinate is used to convert latitude and longitude to a local Cartesian coordinate system.
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://yunshitu.coding.net/p/navigation_and_planning/d/osm_planner/git
cd ..
catkin_make -DCATKIN_WHITELIST_PACKAGES="osm_planner"
source ./devel/setup.bash
roslaunch osm_planner parser_node.launch
Set the starting point: Click the "Publish Point" button in RViz.
Set the endpoint: Click the "2D Nav Goal" button in RViz.