diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 1b50d148b9..ecce8c23d3 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -342,13 +342,15 @@ async fn generate_trajectory( path_builder.set_bumpers(config.bumperLength, config.bumperWidth); - for o in circleObstacles { - path_builder.sgmt_circle_obstacle(0, wpt_cnt - 1, o.x, o.y, o.radius); - } + // Skip obstacles for now while we figure out whats wrong with them + // for o in circleObstacles { + // path_builder.sgmt_circle_obstacle(0, wpt_cnt - 1, o.x, o.y, o.radius); + // } - for o in polygonObstacles { - path_builder.sgmt_polygon_obstacle(0, wpt_cnt - 1, o.x, o.y, o.radius); - } + // Skip obstacles for now while we figure out whats wrong with them + // for o in polygonObstacles { + // path_builder.sgmt_polygon_obstacle(0, wpt_cnt - 1, o.x, o.y, o.radius); + // } path_builder.set_drivetrain(&drivetrain); path_builder.generate() } diff --git a/src/components/navbar/Navbar.tsx b/src/components/navbar/Navbar.tsx index 8a3ee9f468..cd0c077fd9 100644 --- a/src/components/navbar/Navbar.tsx +++ b/src/components/navbar/Navbar.tsx @@ -8,6 +8,7 @@ import { NavbarItemData, NavbarItemSectionLengths, NavbarItemSplitPoints, + ObstaclesEnabled, } from "../../document/UIStateStore"; type Props = {}; @@ -25,7 +26,11 @@ class Navbar extends Component { this.context.model.uiState; return (
- {NavbarItemSectionLengths.map((endSplit, sectionIdx) => ( + {NavbarItemSectionLengths.filter( + (endSplit, sectionIdx) => + sectionIdx != NavbarItemSectionLengths.length - 1 || + ObstaclesEnabled + ).map((endSplit, sectionIdx) => ( {
)} - - OBSTACLES - -
- {this.context.model.document.pathlist.activePath.obstacles.map( - (obstacle: ICircularObstacleStore, index: number) => { - return ( - - ); - } - )} -
- {this.context.model.document.pathlist.activePath.obstacles.length == - 0 && ( -
- - - No Obstacles - -
+ {ObstaclesEnabled && ( + <> + + OBSTACLES + +
+ {this.context.model.document.pathlist.activePath.obstacles.map( + (obstacle: ICircularObstacleStore, index: number) => { + return ( + + ); + } + )} +
+ {this.context.model.document.pathlist.activePath.obstacles + .length == 0 && ( +
+ + + No Obstacles + +
+ )} + + )} - ); diff --git a/src/document/UIStateStore.tsx b/src/document/UIStateStore.tsx index c13c0210ed..21e84e66b0 100644 --- a/src/document/UIStateStore.tsx +++ b/src/document/UIStateStore.tsx @@ -48,6 +48,8 @@ export const SelectableItem = types.union( ...Object.values(ConstraintStores) ); +export const ObstaclesEnabled = false; + /* Navbar stuff */ export let WaypointData: { [key: string]: {