Skip to content
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
f3ba828
draft structure for the mid level planner.
MultyXu Sep 23, 2025
4509da3
Add high level structure for using MidLevelPlanner in spto_executor
MultyXu Sep 24, 2025
40eab01
add more info about the map into MidLevelPlanner
MultyXu Sep 25, 2025
f970725
add todos after meeting with Aaron and Nathan
MultyXu Sep 26, 2025
b317dca
test
Aryan-Naveen Sep 26, 2025
a49b371
Figure out the tf for robot pose, map origin, and planed path. [maybe…
MultyXu Sep 28, 2025
a015bfc
clean code, proper transformation between grid index and global pose
MultyXu Sep 30, 2025
aba7143
wip
Aryan-Naveen Sep 30, 2025
60107f2
projection heuristic
Aryan-Naveen Oct 1, 2025
0cef18b
pre-merge commit
MultyXu Oct 1, 2025
478fba6
First draft of mid-level-planner put into test.
MultyXu Oct 1, 2025
0210ae1
after fist test
y-veys Oct 1, 2025
bcfe296
ugly update but path is correctly passed. Visualization not working, …
MultyXu Oct 2, 2025
900d90a
Path plan is in <robot>/odom frame. Everything plan respect to this f…
MultyXu Oct 7, 2025
3f23a61
debugging global point projection
MultyXu Oct 7, 2025
8f05462
working path plan
MultyXu Oct 7, 2025
a705ac9
Now outputing plan iteratively untill reached goal. If A* fail to fin…
MultyXu Oct 7, 2025
3b2aea1
Adding flag for fake occupancy and fake path.
MultyXu Oct 8, 2025
8848a73
cleaned & added projection viz
Aryan-Naveen Oct 8, 2025
d18db04
Visualization working
Aryan-Naveen Oct 8, 2025
461d2f6
further clean up and add back informative log messages.
MultyXu Oct 9, 2025
d33ea7e
independent fake occupancy and path publisher. Naive map inflation.
MultyXu Oct 14, 2025
c7a316e
Visualizes test path now
Aryan-Naveen Oct 14, 2025
d9171ea
Fixed lookahead bug
Aryan-Naveen Oct 14, 2025
64225fe
Heurestic for projection
Aryan-Naveen Oct 14, 2025
523944a
Code clean up: move occupancy grid outside of mid-level planner
MultyXu Oct 15, 2025
4ecaf26
further clean up
MultyXu Oct 15, 2025
c342875
Improved heurestic for projection
Aryan-Naveen Oct 15, 2025
d87b1e5
Documentation
Aryan-Naveen Oct 15, 2025
6c609e3
Documentation and better testing
Aryan-Naveen Oct 15, 2025
a07ae46
major refactor
MultyXu Oct 15, 2025
0f0069e
merge MLP/main
MultyXu Oct 15, 2025
63560b5
furhter bug fix after merge
MultyXu Oct 15, 2025
650e011
add parameters to launch file.
MultyXu Oct 15, 2025
3178a06
After robot test fixes
y-veys Oct 16, 2025
41a1af5
minor fix
y-veys Oct 16, 2025
b25a5ef
rebase main
MultyXu Oct 20, 2025
fa3240c
cleanup
Aryan-Naveen Oct 20, 2025
5e9e54d
Address some of Aaron's comments
MultyXu Oct 20, 2025
6493bbb
Merge branch 'feature/mid_level_planner/apn-cleanup' into feature/mid…
MultyXu Oct 20, 2025
33fe777
viz cleanup
Aryan-Naveen Oct 20, 2025
8f363f2
More comments on code.
MultyXu Oct 20, 2025
af06d6b
Merge branch 'feature/mid_level_planner/apn-cleanup' into feature/mid…
MultyXu Oct 20, 2025
386c76f
Bug fix after addressing comments
MultyXu Oct 20, 2025
5de3298
pre-commit fixed
Aryan-Naveen Oct 21, 2025
b2d19f7
modifying OccupancyMap lock.
MultyXu Oct 21, 2025
420db91
precommit fix
MultyXu Oct 21, 2025
9385a5a
timeout for failing
Aryan-Naveen Oct 22, 2025
60cb8e9
broken viz
Aryan-Naveen Oct 22, 2025
1fb95a8
viz update
Aryan-Naveen Oct 22, 2025
384cb1d
viz and pre-commit
Aryan-Naveen Oct 22, 2025
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
84 changes: 84 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,87 @@ a little plot of the agent moving along a path. Run it with `python -i` so
that the plot stays at the end. If it crashes with an inscrutable error,
you may need to `pip install opencv-python-headless` because of a conflict
between opencv's QT version and matplotlib's QT version.


# Testing Mid-Level Planner in Simulation

You can find the implemented mid-level planner in `robot_executor_interface/src/robot_executor_interface/mid_level_planner.py`.

## Setup and Testing Instructions

The mid-level planner can be tested using the DCIST launch system with fake publishers to simulate robot behavior and occupancy data.

### 1. Launch the DCIST System

First, launch the complete DCIST system in simulation mode:

```bash
ADT4_SIM_TIME=false tmuxp load dcist_launch_system/tmux/autogenerated/spot_prior_dsg-spot_prior_dsg.yaml
```

This will start all the necessary nodes including the spot executor and planning systems.

### 2. Start the Fake Occupancy Publisher

In a separate terminal, launch the fake occupancy publisher to provide simulated occupancy grid data:

```bash
ros2 run spot_tools_ros fake_occupancy_publisher
```

This publishes a test occupancy grid that the mid-level planner uses for obstacle avoidance and path planning.

#### Occupancy Publisher Parameters

You can customize the occupancy grid simulation using the following parameters:

- `--num_obstacles <N>`: Number of simulated obstacles in the occupancy grid (default: 5)
- `--crop_distance <D>`: How far the robot can "see" in meters - areas beyond this distance are marked as unknown (default: 5.0, set to -1 to disable cropping)
- `--resolution <R>`: Map resolution in meters per cell (default: 0.12)
- `--robot_name <NAME>`: Robot name for topic namespacing (default: 'hamilton')
- `--publish_rate <RATE>`: Publishing frequency in Hz (default: 10.0)

**Example with custom parameters:**
```bash
ros2 run spot_tools_ros fake_occupancy_publisher --num_obstacles 10 --crop_distance 8.0
```

This creates a more challenging environment with 10 obstacles and allows the robot to "see" up to 8 meters away.

### 3. Send Path Commands

In another terminal, use the fake path publisher to send waypoint commands to the planner:

```bash
ros2 run spot_tools_ros fake_path_publisher <x> <y>
```

Where `<x>` and `<y>` are the desired target coordinates. For example:
```bash
ros2 run spot_tools_ros fake_path_publisher -6 1
```

### 4. Visualization in RViz

Launch RViz to visualize the planning behavior and monitor the following key topics:

1. **High-level Path**: `/hamilton/omniplanner_node/compiled_plan_viz_out`
- Shows the simulated high-level path from the omniplanner

2. **Mid-Level Planner Output**: `/hamilton/spot_executor_node/mlp_path_publisher`
- Displays the locally planned path from the mid-level planner
- This path incorporates obstacle avoidance and local optimization

3. **Occupancy Grid**: `/hamilton/hydra/tsdf/occupancy`
- Shows the TSDF occupancy map used for planning
- Visualizes obstacles and free space

### Expected Behavior

The mid-level planner should:
- Receive high-level waypoints from the fake path publisher
- Process the occupancy grid from the fake occupancy publisher
- Generate locally optimal paths that avoid obstacles
- Publish the resulting path for execution by the robot controller

This testing setup allows you to validate the mid-level planner's obstacle avoidance, path smoothing, and local optimization capabilities in a controlled simulation environment.
Loading