Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/toshikinakamura0412/a_star_ros

ROS implementation of A* search algorithm
https://github.com/toshikinakamura0412/a_star_ros

astar astar-algorithm cpp robotics ros ros-noetic search-algorithm

Last synced: 9 days ago
JSON representation

ROS implementation of A* search algorithm

Awesome Lists containing this project

README

        

# a_star_ros

![Build Status](https://github.com/ToshikiNakamura0412/a_star_ros/workflows/build/badge.svg)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

ROS implementation of A* search algorithm



## Environment
- Ubuntu 20.04
- ROS Noetic

## Install and Build
```
# clone repository
cd /path/to/your/catkin_ws/src
git clone https://github.com/ToshikiNakamura0412/a_star_ros.git

# build
cd /path/to/your/catkin_ws
rosdep install -riy --from-paths src --rosdistro noetic # Install dependencies
catkin build a_star_ros -DCMAKE_BUILD_TYPE=Release # Release build is recommended
```

## How to use
```
roslaunch a_star_ros a_star.launch
```

## Running the demo
### Basic
```
roslaunch a_star_ros test.launch
```



### Basic with debug
```
roslaunch a_star_ros test.launch debug_mode:=true
```



### Planning for local map
```
# clone repository
cd /path/to/your/catkin_ws/src
git clone https://github.com/ToshikiNakamura0412/raycast_mapping_ros.git
git clone https://github.com/ToshikiNakamura0412/scan_to_pcl_ros.git
git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3.git
git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git

# build
cd /path/to/your/catkin_ws
rosdep install -riy --from-paths src --rosdistro noetic
catkin build -DCMAKE_BUILD_TYPE=Release

# run demo
export TURTLEBOT3_MODEL=burger
roslaunch a_star_ros test.launch use_local_map:=true
```



## Node I/O
![Node I/O](images/a_star_io.png)

## Nodes
### a_star_planner
#### Published Topics
- ~\/path (`nav_msgs/Path`)
- planned path

#### Subscribed Topics
- /initialpose (`geometry_msgs/PoseWithCovarianceStamped`)
- start pose
- /map (`nav_msgs/OccupancyGrid`)
- costmap
- the cells with an occupancy probability of 100 are considered as obstacles
- /move_base_simple/goal (`geometry_msgs/PoseStamped`)
- goal pose

#### Parameters
- ~\/hz (int, default: `2` [Hz]):

- The rate of main loop
- ~\/weight_of_heuristic (float, default: `1.0`):

- The weight of heuristic
- ~\/debug_mode (bool, default: `false`):

- If this mode is used, you should set this parameter to true.
- if this mode is used, following topics is published.
- ~\/current_node (`geometry_msgs::PointStamped`)
- ~\/open_set (`geometry_msgs::PoseArray`)
- ~\/close_set (`geometry_msgs::PoseArray`)
- ~\/neighbor_nodes (`geometry_msgs::PoseArray`)
- ~\/sleep_time (float, default: `0.01` [s]):

- The sleep time when debug mode

### obstacle_inflater
#### Published Topics
- /map/inflated (`nav_msgs/OccupancyGrid`)
- costmap
- the cells with an occupancy probability of 100 are considered as obstacles

#### Subscribed Topics
- /map (`nav_msgs/OccupancyGrid`)
- costmap
- the cells with an occupancy probability of 100 are considered as obstacles

#### Parameters
- ~\/hz (int, default: `1` [Hz]):

- The rate of main loop
- ~\/inflation_radius (float, default: `0.15` [m]):

- The robot radius

## References
- https://myenigma.hatenablog.com/entry/20140503/1399080847