Skip to content

Commit 984cfd9

Browse files
committed
Initial public release
0 parents  commit 984cfd9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+822628
-0
lines changed

CMakeLists.txt

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
3+
# set the project name
4+
project(stitcher_planner)
5+
6+
add_compile_options(-std=c++17)
7+
set(CMAKE_BUILD_TYPE "Release")
8+
9+
#including eigen dir
10+
find_package(Eigen3 3.3 REQUIRED)
11+
include_directories(${EIGEN3_INCLUDE_DIR})
12+
13+
find_package(PCL REQUIRED)
14+
include_directories(${PCL_INCLUDE_DIRS})
15+
add_definitions(${PCL_DEFINITIONS})
16+
link_directories(${PCL_LIBRARY_DIRS})
17+
18+
find_package(PkgConfig)
19+
pkg_check_modules(YAMLCPP REQUIRED yaml-cpp>=0.5)
20+
include_directories(${YAMLCPP_INCLUDE_DIRS})
21+
22+
find_package(catkin REQUIRED COMPONENTS
23+
roscpp
24+
std_msgs
25+
geometry_msgs
26+
nav_msgs
27+
sensor_msgs
28+
pcl_ros
29+
visualization_msgs
30+
)
31+
32+
catkin_package(
33+
CATKIN_DEPENDS
34+
std_msgs
35+
nav_msgs
36+
sensor_msgs
37+
LIBRARIES trajGenerator
38+
)
39+
40+
include_directories(
41+
${PROJECT_SOURCE_DIR}
42+
${catkin_INCLUDE_DIRS}
43+
)
44+
45+
add_library(trajGenerator src/primitives/lqmt/LQMTPrimitive.cpp
46+
src/primitives/min_time/MinTimePrimitive.cpp
47+
src/collision_checker/CollisionChecker.cc src/collision_checker/CollisionChecker.tpp
48+
src/feasibility_checker/FeasibilityChecker.cpp src/feasibility_checker/FeasibilityChecker.tpp
49+
src/geometric_planner/astar/Astar.cpp src/geometric_planner/jps/Jps3d.cpp src/geometric_planner/GeometricPlanner.cpp
50+
src/reference_path_utils/ReferencePath.cpp
51+
src/planners/heuristic_generator/HeuristicDP.cpp
52+
src/planners/stitcher/STITCHER.tpp
53+
src/planners/stitcher/LqmtSTITCHER.cpp)
54+
55+
target_include_directories(trajGenerator PUBLIC src src/primitives/lqmt
56+
src/primitives/min_time
57+
src/collision_checker
58+
src/geometric_planner/astar
59+
src/geometric_planner/jps
60+
src/geometric_planner
61+
src/reference_path_utils
62+
src/feasibility_checker
63+
src/planners/heuristic_generator
64+
src/planners/stitcher)
65+
66+
################# EXECUTABLES FOR PATH PLOTTING NODES ##########################
67+
# planning with goal click for start and goal
68+
add_executable(goal_click_node src/node/ROS_Goal_Click_Planning_Main.cc src/node/ROS_Goal_Click_Planning.cc)
69+
add_dependencies(goal_click_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
70+
target_link_libraries(goal_click_node trajGenerator ${catkin_LIBRARIES})
71+
############################

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Helene J. Levy and Brett T. Lopez
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# STITCHER: Constrained Trajectory Planning in Complex Environments with Real-Time Motion Primitive Search
2+
3+
#### [[ArXiv](https://arxiv.org/pdf/2510.14893)] [[Code](https://github.com/vectr-ucla/stitcher.git)]
4+
<!-- #### [[ArXiv]()] [[Video]()] [[Code]()] -->
5+
6+
STITCHER is an optimization-free trajectory planning framework that stitches together motion primitives (i.e. short trajectory segments) to compute long-range, expressive, and near-optimal trajectories in real time. STITCHER has provable performance with guaranteed hard constraint satisfaction and a priori time/memory bounds. The framework has been extensively tested in both simulation and hardware on a custom quadrotor.
7+
8+
9+
<br>
10+
<p align='center'>
11+
<img src="./doc/STITCHER.png" alt="drawing" width="720"/>
12+
</p>
13+
14+
### Dependencies
15+
- Ubuntu 20.04
16+
- [ROS Noetic](http://wiki.ros.org/noetic/Installation)
17+
- C++ 17
18+
- [catkin tools](https://catkin-tools.readthedocs.io/en/latest/installing.html)
19+
- CMake >= `3.16.3`
20+
- Point Cloud Library >= `1.10.0`
21+
- Eigen >= `3.3.7`
22+
- LibYAML >= `0.6.2`
23+
24+
```sh
25+
sudo apt install python3-catkin-tools cmake libpcl-dev libeigen3-dev libyaml-cpp-dev
26+
```
27+
28+
### Compiling
29+
Create a catkin workspace, clone the `stitcher` repository into the `src` folder, and compile via the [`catkin_tools`](https://catkin-tools.readthedocs.io/en/latest/) package:
30+
```sh
31+
mkdir ws && cd ws && mkdir src && catkin init && cd src
32+
git clone https://github.com/vectr-ucla/stitcher.git
33+
catkin build
34+
```
35+
36+
### Execution
37+
After sourcing the catkin workspace, launch the STITCHER planner ros node.
38+
39+
```sh
40+
cd ws
41+
source devel/setup.bash
42+
roslaunch stitcher_planner goal_click.launch
43+
```
44+
45+
If successful, RViz will open with the loaded environment. To generate a path, use the 2D Nav Goal tool in RViz to click a start and goal point.
46+
47+
<p align='center'>
48+
<img src="./doc/stitcher_rviz.gif" alt="drawing" width="720"/>
49+
</p>
50+
51+
### Test Environments
52+
53+
<p align='center'>
54+
<img src="./doc/env_types_labeled.png" alt="drawing" width="720"/>
55+
</p>
56+
57+
58+
We include two test environments in `data`: `perlin_map.pcd`, and `office.pcd` (referred to as Willow Garage in the manuscript). Edit `goal_click.launch` with the environment you would like to test in.
59+
60+
Note that the office environment requires a smaller resolution for the geometric path planner (e.g. A*, JPS) in order to move through doorways, while the perlin map may use a larger resolution for faster computation of the geometric path. The resolution can be changed in `cfg/params.yaml`.
61+
62+
The following are values that work well.
63+
- Perlin Noise: `resolution = 0.5`
64+
- Office: `resolution = 0.15`
65+
66+
## Quadrotor Flight
67+
Our framework was tested on hardware and shown to generate dynamically feasible paths. Below, is one experiment of our quadrotor flying a path generated by STITCHER.
68+
69+
<br>
70+
<p align='center'>
71+
<img src="./doc/stitcher_flight.gif" alt="drawing" width="720"/>
72+
</p>
73+
74+
## Citation
75+
If you found this work useful, please cite our manuscript:
76+
77+
```bibtex
78+
@article{Levy25:STITCHER,
79+
author={Levy, Helene J. and Lopez, Brett T. },
80+
journal={ArXiv},
81+
title={STITCHER: Constrained trajectory planning in complex environments with real-time motion primitive search},
82+
year={2025}
83+
}
84+
```

cfg/params.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Robot:
2+
thrust_max: 15. #N max total thrust (4*motor thrust max) equiv to fmax 18.75 m/s^2 mass normalized by 0.8kg
3+
thrust_min: 0.65 #N min total thrust (4*motor thrust min) equiv to 0.85 m/s^2 mass normalized by 0.8kg
4+
omega_max: 6 # rad/s max angular velocity
5+
theta_max: 1. # rad max tilt acos(mg/Tmax), this will influence your fxy_max
6+
mass: 0.8 #kg
7+
grav: 9.8 #m/s^2
8+
arm_length: 0.125 #m distance between center of quadrotor and rotor blade
9+
drag: 0.2 #propeller drag coefficient for quadrotor
10+
motor_thrust_max: 3.75 #N per motor
11+
motor_thrust_min: 0.163 #N per motor
12+
Jxx: 0.01 #moment of inertia of quadrotor
13+
Jyy: 0.01
14+
Jzz: 0.01
15+
16+
Primitives:
17+
vf_zenith: [90.] # sampled zenith angles in degrees
18+
vf_azimuth: [-10., 0., 10.] # sampled azimuth angles in degrees
19+
vf_magnitude: [0.25, 0.5, 0.75, 1.] # sampled magnitudes as fraction of v_max, increase number of magnitudes for denser sampling
20+
v_max: 10.
21+
# for admissible heuristic need to ensure that MinTimePrims have accel bounds that maximally bound thrust limits
22+
a_max: 15.8 # calculated by mass norm thrust in xy minus grav: fxy_max - g
23+
az_max: 9. # calculated by mass norm thrust in xy minus grav: fz_max - g
24+
j_max: 60.
25+
rho: 1000. # weighting on time in cost function for primitive generation
26+
27+
Planner:
28+
map_collision_buffer: 0.15
29+
collision_check: true # turn on if you want to collision check
30+
verbose: false
31+
32+
GeometricPlanner:
33+
geometric_planner_type: "jps" # astar or jps (default jps)
34+
resolution: 0.15 #for office environment need smaller resolution like 0.1 or 0.15 to fit through doorways
35+
map_ub: [29, 29, 30] # these will update after running A* based on the map
36+
map_lb: [-29, -29, 0]
37+
max_dist_btwn_wps: 12.5 # max distance between waypoints
38+
39+
40+

0 commit comments

Comments
 (0)