Git Product home page Git Product logo

ethz-asl / terrain-navigation Goto Github PK

View Code? Open in Web Editor NEW
98.0 11.0 10.0 32.05 MB

Repository for Safe Low Altitude Navigation in steep terrain for fixed-wing Aerial Vehicles

Home Page: https://ieeexplore.ieee.org/abstract/document/10443502

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.16% Shell 0.71% Python 13.77% CMake 2.30% C++ 82.77% Dockerfile 0.28%
drones fixedwing planning robotics

terrain-navigation's Introduction

terrain-navigation

Build Test

This package includes an implementation of the RA-L submission of "Safe Low-Altitude Navigation in Steep Terrain with Fixed-Wing Aerial Vehicles". The implementation includes a global planner based on a RRT* in the Dubins Airplane space enabling low altitude navigation for fixed wing vehicles in steep terrain.

ROS 2 support of the package can be found in the ros2 branch. The implementation supports ROS 2 Humble.

overview

Paper and Video

If you find this package useful in an academic context, please consider citing the paper

  • Lim, Jaeyoung, Florian Achermann, Rik Girod, Nicholas Lawrance, and Roland Siegwart. "Safe Low-Altitude Navigation in Steep Terrain with Fixed-Wing Aerial Vehicles." arXiv preprint arXiv:2401.04831 (2024). [paper] [video]
@article{lim2024safe,
  title={Safe Low-Altitude Navigation in Steep Terrain with Fixed-Wing Aerial Vehicles},
  author={Lim, Jaeyoung and Achermann, Florian and Girod, Rik and Lawrance, Nicholas and Siegwart, Roland},
  journal={IEEE Robotics and Automation Letters},
  year={2024},
  publisher={IEEE}
}

Setup

Setting up the Build Environment using Docker

If your operating system doesn't support ROS 1 noetic, docker is a great alternative.

First, create the image, with the build context at the root of this repo

docker build --file docker/Dockerfile --tag terrain-navigation-ros1 .

You can see the image exists:

docker images
>>> REPOSITORY                TAG       IMAGE ID       CREATED        SIZE
>>> terrain-navigation-ros1   latest    5565f845ab4f   2 weeks ago    774MB

Next, run the image, mounting in the source into a workspace. All the dependencies are now installed.

docker run --network=host -it -v $(pwd):/root/catkin_ws/src/terrain-navigation -w /root/catkin_ws terrain-navigation-ros1 bash

Running the Build

Configure the catkin workspace

catkin config --extend "/opt/ros/noetic"
catkin config --merge-devel

For dependencies that do not have binaries available, pull them in using rosinstall.

wstool init src src/terrain-navigation/dependencies.rosinstall
wstool update -t src -j4

For dependencies available through binaries, use rosdep. This package depends on GDAL to read georeferenced images and GeoTIFF files.

apt update
rosdep update
source /opt/ros/noetic/setup.bash
rosdep install --from-paths src --ignore-src -y

Build the package

catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -DCATKIN_ENABLE_TESTING=False
catkin build -j$(nproc) -l$(nproc) terrain_navigation_ros

Running an example of the planner

In order to run the examples, build the terrain_planner_benchmark package.

catkin build terrain_planner_benchmark

Run a simple planning example:

roslaunch terrain_planner_benchmark test_ompl_rrt_circle.launch 

example

Running with PX4 SITL(Software-In-The-Loop)

To setup PX4, clone the ETHZ ASL PX4 autopilot project The setup instructions can be found in the documentation for the latest dependencies.

For Ubuntu 20.04+ROS noetic with Gazebo classic:

git clone https://github.com/ethz-asl/ethzasl_fw_px4.git --branch pr-hinwil-testing --recursive
cd ..
cd ethzasl_fw_px4
bash ./Tools/setup/ubuntu.sh

make px4_sitl gazebo

Do source the relevant environment variables before launching terrain navigation. For instance, for Ubuntu 20.04 + ROS Noetic + Gazebo classic:

px4_dir=~/ethzasl_fw_px4
source $px4_dir/Tools/simulation/gazebo/setup_gazebo.bash $px4_dir $px4_dir/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$px4_dir
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$px4_dir/Tools/simulation/gazebo/sitl_gazebo
export GAZEBO_PLUGIN_PATH=$GAZEBO_PLUGIN_PATH:/usr/lib/x86_64-linux-gnu/gazebo-11/plugins

Note: The path for gazebo may vary for a different version of Gazebo, update GAZEBO_PLUGIN_PATH as well as ROS_PACKAGE_PATH accordingly.

The default launch file can be run as the following command.

roslaunch terrain_navigation_ros test_terrain_planner.launch

You can use QGroundcontrol to configure and fly the vehicle. Get the vehicle flying, and plan a mission to fly!

Once the vehicle is flying in a loiter, plan a mission, engage the planner and fly through the rviz UI (Video: https://youtu.be/EJWyGSqaKb4)

terrain-navigation's People

Contributors

acfloria avatar botmayank avatar duandaxia avatar helenol avatar jaeyoung-lim avatar ryanf55 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terrain-navigation's Issues

terrain_navigation_ros has include error for planner_msgs

When building main ROS1 branch in docker on hash 4b1ef8e518cc04efb8528147d5a161784c2044cd, I get the following error:

Errors     << terrain_navigation_ros:make /root/catkin_ws/logs/terrain_navigation_ros/build.make.000.log                                                                                                                            
In file included from /root/catkin_ws/src/terrain-navigation/terrain_navigation_ros/src/terrain_planner.cpp:41:
/root/catkin_ws/src/terrain-navigation/terrain_navigation_ros/include/terrain_navigation_ros/terrain_planner.h:67:10: fatal error: planner_msgs/SetPlannerState.h: No such file or directory
   67 | #include <planner_msgs/SetPlannerState.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/terrain_navigation_ros.dir/build.make:63: CMakeFiles/terrain_navigation_ros.dir/src/terrain_planner.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:389: CMakeFiles/terrain_navigation_ros.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
cd /root/catkin_ws/build/terrain_navigation_ros; catkin build --get-env terrain_navigation_ros | catkin env -si  /usr/bin/make --jobserver-auth=3,4; cd -

terrain_navigation_ros/src/terrain_planner.h is including planner_msgs/NavigationStatus.h, but that package isn't linked to.

I can issue a PR to fix this.

ompl missing dependency

After installing the dependencies with rosdep and wstool, seems like a missing dependency. These issues are found when trying to build in an isolated (docker) environment.

Errors     << terrain_planner:cmake /root/catkin_ws/logs/terrain_planner/build.cmake.000.log                                                                                                                                              
CMake Error at /root/catkin_ws/src/terrain-navigation/terrain_planner/CMakeLists.txt:10 (find_package):
  By not providing "Findompl.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "ompl", but
  CMake did not find one.

  Could not find a package configuration file provided by "ompl" with any of
  the following names:

    omplConfig.cmake
    ompl-config.cmake

  Add the installation prefix of "ompl" to CMAKE_PREFIX_PATH or set
  "ompl_DIR" to a directory containing one of the above files.  If "ompl"
  provides a separate development package or SDK, be sure it has been
  installed.

https://github.com/ros-gbp/ompl-release

Please assign this to me, I'll issue a fix. If you have a custom fork of ompl rather than binaries, let me know.

[ROS2] Start and Goal Radius not mapped properly

Problem Description
When running the planner in ROS2, the start and goal radius seems to be not be set properly, when set for the planning problem.

Screenshot from 2024-02-18 17-25-57
(The segment marker and the green goal marker does not match).

Testing
This was observed when running the code as part of #38

Error: RRTstar: There are no valid initial states!

Hello, when I run roslaunch terrain_navigation_ros test_terrain_planner.launch, the following error occurred. I would like to ask about the reason for this issue.Thank you very much.

INFO [commander] Armed by external command
INFO [tone_alarm] arming warning
INFO [navigator] Executing Mission
INFO [navigator] Takeoff to 60.0 meters above home
[ INFO] [1715931050.319347357, 17.008000000]: GF: mission received
[ INFO] [1715931050.319455910, 17.008000000]: RP: mission received
[ INFO] [1715931050.319669263, 17.008000000]: WP: item #0* F:6 C: 84 p: 0 0 0 nan x: 468150028 y: 98472149 z: 60
[ INFO] [1715931050.319790467, 17.008000000]: WP: mission received
INFO [commander] Takeoff detected
[TerrainPlanner] - Successfully loaded map: /home/xyr/shared_dir/terrain-navigation0514/terrain-navigation-main/src/terrain-navigation/terrain_navigation_ros/../resources/davosdorf.tif
[TerrainOmplRrt] Upper bounds: 2795 2475 2963.08
[TerrainOmplRrt] Lower bounds: -2795 -2475 1585.99
Warning: RRTstar requires a state space with symmetric distance and symmetric interpolation.
at line 101 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/geometric/planners/rrt/src/RRTstar.cpp
[ INFO] [1715931081.372966790, 48.040000000]: WP: reached #0
[ INFO] [1715931081.413467934, 48.080000000]: WP: reached #0
[ INFO] [1715931081.513892406, 48.180000000]: WP: reached #0
[ INFO] [1715931081.613735453, 48.280000000]: WP: reached #0
[ INFO] [1715931081.713372006, 48.380000000]: WP: reached #0
[ INFO] [1715931081.813405059, 48.480000000]: WP: reached #0
[ INFO] [1715931081.913596673, 48.580000000]: WP: reached #0
[ INFO] [1715931082.013496794, 48.680000000]: WP: reached #0
[ INFO] [1715931082.113588892, 48.780000000]: WP: reached #0
[ INFO] [1715931082.214034258, 48.880000000]: WP: reached #0
[ INFO] [1715931082.314487366, 48.980000000]: WP: reached #0
[ERROR] [1715931084.752645503, 51.416000000]: TM : Time jump detected. Resetting time synchroniser.
INFO [navigator] Mission finished, loitering
[ERROR] [1715931135.353320173, 101.972000000]: TM : Time jump detected. Resetting time synchroniser.
[ERROR] [1715931185.952667442, 152.524000000]: TM : Time jump detected. Resetting time synchroniser.
[TerrainPlanner] Current Loiter start: 0 0 0
[TerrainPlanner] Candidate goal: 0 0 -1
[PlanningPanel] Set Planning Budget: 4
[TerrainPlanner] Planning budget: 4
Warning: RRTstar requires a state space with symmetric distance and symmetric interpolation.
at line 101 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/geometric/planners/rrt/src/RRTstar.cpp
Warning: RRTstar: Skipping invalid start state (invalid bounds)
at line 248 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/base/src/Planner.cpp
Debug: RRTstar: Discarded start state Compound state [
RealVectorState [-66.67 -8.16472e-15 0]
SO2State [1.5708]
]

Warning: RRTstar: Skipping invalid start state (invalid bounds)
at line 248 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/base/src/Planner.cpp
Debug: RRTstar: Discarded start state Compound state [
RealVectorState [-53.9372 -39.1876 0]
SO2State [2.19911]
]

Warning: RRTstar: Skipping invalid start state (invalid bounds)
at line 248 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/base/src/Planner.cpp
Debug: RRTstar: Discarded start state Compound state [
RealVectorState [-20.6022 -63.4069 0]
SO2State [2.82743]
]

Warning: RRTstar: Skipping invalid start state (invalid bounds)
at line 248 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/base/src/Planner.cpp
Debug: RRTstar: Discarded start state Compound state [
RealVectorState [20.6022 -63.4069 0]
SO2State [-2.82743]
]

Warning: RRTstar: Skipping invalid start state (invalid bounds)
at line 248 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/base/src/Planner.cpp
Debug: RRTstar: Discarded start state Compound state [
RealVectorState [53.9372 -39.1876 0]
SO2State [-2.19911]
]

Warning: RRTstar: Skipping invalid start state (invalid bounds)
at line 248 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/base/src/Planner.cpp
Debug: RRTstar: Discarded start state Compound state [
RealVectorState [66.67 0 0]
SO2State [-1.5708]
]

Warning: RRTstar: Skipping invalid start state (invalid bounds)
at line 248 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/base/src/Planner.cpp
Debug: RRTstar: Discarded start state Compound state [
RealVectorState [53.9372 39.1876 0]
SO2State [-0.942478]
]

Warning: RRTstar: Skipping invalid start state (invalid bounds)
at line 248 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/base/src/Planner.cpp
Debug: RRTstar: Discarded start state Compound state [
RealVectorState [20.6022 63.4069 0]
SO2State [-0.314159]
]

Warning: RRTstar: Skipping invalid start state (invalid bounds)
at line 248 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/base/src/Planner.cpp
Debug: RRTstar: Discarded start state Compound state [
RealVectorState [-20.6022 63.4069 0]
SO2State [0.314159]
]

Warning: RRTstar: Skipping invalid start state (invalid bounds)
at line 248 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/base/src/Planner.cpp
Debug: RRTstar: Discarded start state Compound state [
RealVectorState [-53.9372 39.1876 0]
SO2State [0.942478]
]

Error: RRTstar: There are no valid initial states!
at line 193 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/geometric/planners/rrt/src/RRTstar.cpp
Info: No solution found after 0.001614 seconds
Solution Not found
Error: RRTstar: There are no valid initial states!
at line 193 in /tmp/binarydeb/ros-noetic-ompl-1.6.0/src/ompl/geometric/planners/rrt/src/RRTstar.cpp
Info: No solution found after 0.002011 seconds

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.