Skip to content

ToshikiNakamura0412/a_star_ros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

a_star_ros

Build Status License: 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

Nodes

a_star_planner

Published Topics

  • ~<name>/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

  • ~<name>/hz (int, default: 2 [Hz]):
    The rate of main loop
  • ~<name>/weight_of_heuristic (float, default: 1.0):
    • The weight of heuristic
  • ~<name>/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.
      • ~<name>/current_node (geometry_msgs::PointStamped)
      • ~<name>/open_set (geometry_msgs::PoseArray)
      • ~<name>/close_set (geometry_msgs::PoseArray)
      • ~<name>/neighbor_nodes (geometry_msgs::PoseArray)
  • ~<name>/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

  • ~<name>/hz (int, default: 1 [Hz]):
    The rate of main loop
  • ~<name>/inflation_radius (float, default: 0.15 [m]):
    The robot radius

References