Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tharp/adding_global_planning_functionality #100

Closed
wants to merge 47 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
765ebd7
changing global planning docs and cleaning up random walk planner
tharp789 Sep 17, 2024
8c680be
adding testing docs
tharp789 Sep 18, 2024
717b641
changing global planning docs and cleaning up random walk planner
tharp789 Sep 17, 2024
98f81d0
adding testing docs
tharp789 Sep 18, 2024
c3de1aa
Merge branch 'tharp/rand_walk_cleanup' of https://github.com/castacks…
tharp789 Sep 18, 2024
1f72df9
refactoring code for new interface
tharp789 Sep 18, 2024
7e3b32b
adding conversions for new message types
tharp789 Sep 18, 2024
2c63df8
fixing build issues for new interfaces
tharp789 Sep 18, 2024
91e4b8d
chaning logic to take the max voxzel size instead of assuming uniform
tharp789 Sep 18, 2024
8b84e5a
cleaning up distance calculations
tharp789 Sep 18, 2024
3947fdb
making build changes for curr_location
tharp789 Sep 18, 2024
31512b4
more build fixes
tharp789 Sep 18, 2024
85a36ce
more and more build fixes
tharp789 Sep 18, 2024
a52f822
more and more build fixes
tharp789 Sep 18, 2024
d2f5d97
asdf
tharp789 Sep 18, 2024
b9ac384
a;alala
tharp789 Sep 18, 2024
01bd1c0
asdfallsdlfkn
tharp789 Sep 18, 2024
57eaa10
fixed build
tharp789 Sep 18, 2024
aba33a5
Do proper docker containers now with variable number of robots (#40)
andrewjong Sep 18, 2024
458e7b1
Aj/update docs (#45)
andrewjong Sep 19, 2024
ace15f7
Add footer (#46)
andrewjong Sep 19, 2024
e1293c9
Add more docs
andrewjong Sep 19, 2024
0afc4df
welcome page, boilerplate (#47)
andrewjong Sep 19, 2024
0cadc73
changing global planning docs and cleaning up random walk planner
tharp789 Sep 17, 2024
543e761
adding some more documentation
tharp789 Sep 22, 2024
de82155
adding service call
tharp789 Sep 22, 2024
67ecb47
finishing clean up of old map callback
tharp789 Sep 23, 2024
e69a946
deleting irrelevant testing doc
tharp789 Sep 23, 2024
e8a3044
Merge remote-tracking branch 'origin/main' into tharp/rand_walk_cleanup
tharp789 Sep 23, 2024
b6d532f
Merge remote-tracking branch 'origin/main' into tharp/rand_walk_cleanup
tharp789 Sep 25, 2024
6f58a9a
Merge remote-tracking branch 'origin/main' into tharp/rand_walk_cleanup
tharp789 Oct 1, 2024
528dbad
removing trivial_planner package for random walk and add xml launch file
tharp789 Oct 1, 2024
4219588
Merge remote-tracking branch 'origin/main' into tharp/rand_walk_cleanup
tharp789 Oct 2, 2024
019d228
Merge remote-tracking branch 'origin/main' into tharp/rand_walk_cleanup
tharp789 Oct 2, 2024
44a8b1f
removing airstack_msgs dependency
tharp789 Oct 2, 2024
0790c38
adding plan reception mode to behaviro tree
tharp789 Oct 3, 2024
1bbb5ef
buildable chanes
tharp789 Oct 8, 2024
1b68714
merging from main
tharp789 Oct 8, 2024
83cbd17
working action based random walk
tharp789 Oct 8, 2024
58c2b9c
working global plan toggle
tharp789 Oct 9, 2024
5e05a7d
fixing read_parameter formatting
tharp789 Oct 9, 2024
81ba81b
adding ensemble planner
tharp789 Oct 9, 2024
0fac73e
first test of the new global planner format with random walk publishi…
tharp789 Oct 10, 2024
0720d8c
adding rad2deg and logging in random walk logic
tharp789 Oct 10, 2024
8d8dda0
Merge remote-tracking branch 'origin/main' into tharp/rand_walk_cleanup
tharp789 Oct 10, 2024
4167a2a
working random walk
tharp789 Oct 10, 2024
d718425
cleaning up junk
tharp789 Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
changing global planning docs and cleaning up random walk planner
tharp789 committed Sep 22, 2024
commit 0cadc736fea846cab6e36c5cdf67a753561c4e8e
74 changes: 74 additions & 0 deletions docs/developer_guide/autonomy/global_planning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@


Global planners output a high level, coarse trajectory for the robot to follow.

A trajectory is a spatial path plus a schedule.
This means each waypoint in the trajectory has a time associated with it, indicating when the robot should reach that waypoint.
These timestamps are fed to the local planner to determine speed and acceleration.

If a waypoint's header timestamp is empty, the local planner should assume there's no time constraint and follow the trajectory at its own pace.

The global planner should make a trajectory that is collision-free according to the global map.
However, avoiding fine obstacles is delegated to the local planner that operates at a faster rate.

For the structure of the package, the global planner node should not include any logic to generate the path. This should be located in a seperate logic class and be seperated from ROS. This will allow more modularity in the future for testing and easy interface changes.

## ROS Interfaces

### Actions Interface
The global planner should provide an action server for the topic `$(arg robot_name)/global_planner/plan` of message type `nav_msgs/GetPlan`. This should be triggered from the base station and should trigger a path generation based off a fed goal position and optionally a tolerance to the final goal, otherwise a default tolerance will be used. This will then trigger the global planner to generate a path and publish it to the gloabal trajectory topic.

```
# The final pose of the goal position
geometry_msgs/PoseStamped goal

# How many meters the drone can be from the goal
float32 tolerance
---
# Response from the generated gloabl trajectory
nav_msgs/Path plan
```

### Subscribers
In general, the global planner needs access to components of the world model.

There are two main requirments for the global planner to operate. The first essential Subscriber is the Occupancy Grids, which are published by the `map_server` node. This gives the global planner a global map to reference for planning, and should be agnostic to the robot.

The second essential subscriber should be the odometry or pose of the specific robot it is planning for in relation to the gloabl map. This would be found on the topic `$(arg robot_name)/controls/robot_interface/odometry`. The global planning node should not start to plan without first recieving messages from these two topics, and should trigger a boolean to enable gloabl planning.

### Publishers

The global planner must publish a trajectory to the topic `$(arg robot_name)/global_planner/trajectory` of message type `nav_msgs/Path`.

The header of the `nav_msgs/Path` message should contain the coordinate frame of the trajectory, and the timestamp should indicate when the trajectory was generated.
Each waypoint's header should contain the coordinate frame of the waypoint, and the timestamp should indicate when the waypoint should be reached.

```
nav_msgs/Path.msg
- std_msgs/Header header
- time stamp: when the trajectory was generated
- frame_id: the coordinate frame of the trajectory
- geometry_msgs/PoseStamped[] poses: the trajectory
- geometry_msgs/PoseStamped pose
- std_msgs/Header header
- time stamp: when the waypoint should be reached
- string frame_id: the coordinate frame of the waypoint
- geometry_msgs/Pose pose: the position and orientation of the waypoint
```

## Global Planners
### Random Walk Planner

The random walk planner is a naive global planning method as a stand in for a more intelligent global planner with set objectives. Currently, the planner randomly selects a goal point, constrained by the proximity to the start point and must not be located within a grid from the global map. Once a goal point is selected, intermediate points are checked for collision to ensure the path is free. This is done until a straight collision free path is created. The following parameters are taken in to specify the behavior of the random walk:

```
publish_visualizations: true # should trajectory visualizations be published

# Constants
max_start_to_goal_dist_m: 3.5 # how max distance the goal can be from the current robot position
checking_point_cnt: 1000 # how many points to collision check between the start and goal points
max_z_m: 0.1 # max height that the goal can deviate from the current height
collision_padding_m: 0.1 # how much space should the path have to any obstacles
path_end_threshold_m: 0.1 # how close to the goal will the path be considered complete
```