Giter VIP home page Giter VIP logo

far_planner's Introduction

FAR Planner uses a dynamically updated visibility graph for fast replanning. The planner models the environment with polygons and builds a global visibility graph along with the navigation. The planner is capable of handling both known and unknown environments. In a known environment, paths are planned based on a prior map. In an unknown environment, multiple paths are attempted to guide the vehicle to goal based on the environment observed during the navigation. When dynamic obstacles are present, FAR Planner disconnects visibility edges blocked by the dynamic obstacles and reconnects them after regaining visibility. The software implementation uses two CPU threads - one for dynamically updating the visibility graph using ~20% of the thread and the other for path search that can find a path within 3ms, as evaluated on an i7 computer.

FAR Planner was used by the CMU-OSU Team in attending DARPA Subterranean Challenge. In the final competition which took place in Louisville Mega Cavern, KY, the team's robots conducted the most complete traversing and mapping across the site (26 out of 28 sectors) among all teams, winning a "Most Sectors Explored Award".

A video showing functionalities of FAR Planner is available.

Method

Usage

The repository has been tested in Ubuntu 18.04 with ROS Melodic and Ubuntu 20.04 with ROS Noetic. Follow instructions in Autonomous Exploration Development Environment to setup the development environment. Make sure to checkout the branch that matches the computer setup, compile, and download the simulation environments.

To setup FAR Planner, clone the repository.

git clone https://github.com/MichaelFYang/far_planner

In a terminal, go to the folder, checkout the 'melodic-noetic' branch, and compile.

cd far_planner
git checkout melodic-noetic
catkin_make

To run the code, go to the development environment folder in a terminal, source the ROS workspace, and launch.

source devel/setup.sh
roslaunch vehicle_simulator system_indoor.launch

In another terminal, go to the FAR Planner folder, source the ROS workspace, and launch.

source devel/setup.sh
roslaunch far_planner far_planner.launch

Now, users can send a goal by pressing the 'Goalpoint' button in RVIZ and then clicking a point to set the goal. The vehicle will navigate to the goal and build a visibility graph (in cyan) along the way. Areas covered by the visibility graph become free space. When navigating in free space, the planner uses the built visibility graph, and when navigating in unknown space, the planner attempts to discover a way to the goal. By pressing the 'Reset Visibility Graph' button, the planner will reinitialize the visibility graph. By unchecking the 'Planning Attemptable' checkbox, the planner will first try to find a path through the free space. The path will show in green. If such a path does not exist, the planner will consider unknown space together. The path will show in blue. By unchecking the 'Update Visibility Graph' checkbox, the planner will stop updating the visibility graph. To read/save the visibility graph from/to a file, press the 'Read'/'Save' button. An example visibility graph file for indoor environment is available at 'src/far_planner/data/indoor.vgh'.

Indoor

Anytime during the navigation, users can use the control panel to navigate the vehicle by clicking the in the black box. The system will switch to smart joystick mode - the vehicle tries to follow the virtual joystick command and avoid collisions at the same time. To resume FAR Planner navigation, press the 'Resume Navigation to Goal' button or use the 'Goalpoint' button to set a new goal. Note that users can use a PS3/4 or Xbox controller instead of the virtual joystick. For more information, please refer to our development environment page.

ControlPanel     PS3 Controller

To launch with a different environment, use the command lines below and replace '<environment>' with one of the environment names in the development environment, i.e. 'campus', 'indoor', 'garage', 'tunnel', and 'forest'. Note that when running in campus environment, set checkTerrainConn to true in system_campus.launch in the 'src/vehicle_simulator/launch' folder of the development environment.

roslaunch vehicle_simulator system_<environment>.launch
roslaunch far_planner far_planner.launch

To run FAR Planner in a Matterport3D environment, follow instructions on the development environment page to setup the Matterport3D environment. Then, use the command lines below to launch the system and FAR Planner.

roslaunch vehicle_simulator system_matterport.launch
roslaunch far_planner far_planner.launch config:=matterport

Matterport

Users have the option to define custom navigation boundaries. To do this, users need to supply a boundary file and a trajectory file. Examples are provided as 'boundary.ply' and 'trajectory.txt' in the 'src/far_planner/data' folder. The files can be viewed by text editors. Specifically, the boundary file contains user-defined polygons where each polygon has an index. The trajectory file contains poses where each pose is a row with x (m), y (m), z (m), roll (rad), pitch (rad), yaw (rad), and time duration from start of the run (second). The trajectory file is in the same format as those saved by the development environment and needs to contain at least one pose to determine the traversable side of the navigation boundaries. Users can use the command line below to generate a visibility graph file in the same folder (provided as 'boundary_graph.vgh'), which can be loaded to FAR Planner using the 'Read' button.

roslaunch boundary_handler boundary_handler.launch

Configuration

FAR Planner settings are kept in default.yaml in the 'src/far_planner/config' folder. For Matterport3D environments, the settings are in matterport.yaml in the same folder.

  • is_static_env (default: true) - set to false if the environment contains dynamic obstacles.
  • is_attempt_autoswitch (default: true) - set to false to turn off auto switch from non-attemptable navigation (for known environment) to attemptable navigation (for unknown environment).
  • is_viewpoint_extend (default: true) - set to false to stop extending visibility graph vertices away from objects to gain better viewpoints.
  • is_pub_boundary (default: false) - set to true to send custom navigation boundaries to the local planner in the development environment.

Reference

  • F. Yang, C. Cao, H. Zhu, J. Oh, and J. Zhang. FAR Planner: Fast, Attemptable Route Planner using Dynamic Visibility Update. IEEE/RSJ Intl. Conf. on Intelligent Robots and Systems (IROS). Kyoto, Japan, Oct. 2022. Best Student Paper Award.

Author

Fan Yang ([email protected])

far_planner's People

Contributors

jizhang-cmu avatar michaelfyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

far_planner's Issues

Failure case of far planner in simulation dataset

A failure case in campus dataset.

As can be seen in the photo(sorry for the low resolution) The goal_point is in green, which should be un-achievable.

But ideally, the behavior of far-planner should navigate to the rest of the un-explored places, trying to find a way out. After it can't find any way out, it could finally stop.

And as we could see in the visibility graph, there're at least three region to be explored, but far planner no longer inject waypoint.

IMG_1780

Contour extraction

Hello, thank you very much for this wonderful project, I am new to this project and would like to ask you a few questions.
What does the TopoFilterContours function in contour_detector.cpp in Far Planner do (I understand that it is removing sub-contours, but if it is sub-contours, then why not set the contour retrieval mode to RETR_EXTERNAL directly in Extract Contours cv::findContours?). );
Or is it the PointInsideAPoly function in utility.h, I understand that this should be to determine whether the robot is within the contour, why in the function TopoFilterContours there is a judgment of the function PointInsideAPoly.
I look forward to hearing from you. Thank!!!

problem of saving Vsibility Graph

When I am using the function of reading or saving Visibility Graph There are only a part of Vsibility Graph can be saved. The main path of the vehicle can be saved but the other line is missing.

The picture of real path which I want to save
Screenshot from 2021-11-15 07-53-01

The picture of path when I am reading
Screenshot from 2021-11-15 07-54-40

Deploy with the real robot

Hello @MichaelFYang Thank you so much for sharing very much useful work.

By any chance is it possible suggest some tips on deploying this planner in the real robot with LiDAR sensor.

Appreciate any response.

Issue with Close-Range Loop Closure in Extracted 2D Grid Maps Using far-planner in Simulation

I am encountering a consistent issue while working with far-planner in a simulated environment. The problem arises with the extraction of 2D grid maps, where I frequently observe close-range loop closures that seem unintended and are affecting the planning performance. This will happen when the start point of simulated indoor system with a very high probability.
image
image
The above two picture is the vehicle can't move. This will both happen in Ubuntu18 and Ubuntu20.

Any insights or suggestions to resolve this problem would be greatly appreciated. Thank you for your support and for developing far-planner.

Best regards,
Zhang Liyu

How to use far_planner in a known map environment

Thank you very much for your contribution. I want to save the 3D map in PCD format after building the map. The next time I directly import the map, I can use far_planner for planning only by positioning. How should I achieve this? Is it necessary to use far_planner to run the map and save the visibility graph first?

Deployment of an Ackermann-Drive Car

Hello author,

I encountered a problem when deploying far-planner. Our car is an Ackermann-drive car with a maximum steering angle of 45 degrees. Therefore, when moving along the path planned according to the code, the planned turning angle may be greater than the steering angle of the car, causing the car to be unable to turn to the predetermined path and stop in place. I checked the config/default.yaml file in far-planner. How can I set the parameters? One solution I thought of is to let the car detect the intersection in advance and plan the turning path in advance. I look forward to your reply, thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.