-
Notifications
You must be signed in to change notification settings - Fork 63
Circular Obstacles #205
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
Circular Obstacles #205
Conversation
shueja
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

obstacles are on a z-index between trajectories/initial guess lines and constraint targets/waypoints. Intended?
Dragging an obstacle snaps the center of the obstacle to the mouse. This was acceptable with waypoints, since the drag targets were small. Not so here, especially with large obstacles that only need to move a small amount.
The amount of code duplication here is partially inevitable, but could show need for some helper functions that would work on both the obstacles array and the waypoints array.
The small drag handle for radius is annoying to work with. Could the entire outer border of the circle be a resize handle? The existing handler for the drag event already supports this, the target for clicking just needs to be bigger.
The bright green for selected obstacles is visually jarring. Consider using var(--select-yellow) on the border and leaving the internals red (perhaps a more transparent red).
Should document schema 0.1.2 use the circleObstacles key instead of obstacles to avoid an annoying rename in the auto-upgrader later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert these changes before merge
src-tauri/src/main.rs
Outdated
| path_builder.set_bumpers(config.bumperLength, config.bumperWidth); | ||
|
|
||
| for o in circleObstacles { | ||
| println!("{:?}", o); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To Remove (the println)
| this.context.model.uiState.setSelectedNavbarItem(9); | ||
| }} | ||
| > | ||
| {React.cloneElement(<Circle></Circle>, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The icon here is a circle, but is a circular (/) sign in the navbar. Use the latter here. Replace <Circle></Circle> with ObstacleData["CircleObstacle"].
| ", y: " + | ||
| this.props.obstacle.y.toFixed(2)} | ||
| </span> | ||
| <Tooltip disableInteractive title="Delete Waypoint"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tooltip here needs changing.
| className={styles.SidebarLabel} | ||
| style={{ display: "grid", gridTemplateColumns: "1fr auto auto" }} | ||
| > | ||
| {"Obstacle x: " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could there be a better way to distinguish obstacles? The coordinates in the title feels kind of clunky.
| pointerPos.x = event.x; | ||
| pointerPos.y = event.y; | ||
|
|
||
| this.props.obstacle.setX(pointerPos.x); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This snaps the obstacle center to the pointer, which does not work well on drag targets the size of the obstacle.
| /> | ||
|
|
||
| <Input | ||
| title="radius" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider leaving the title just r for visual lineup.
| WaypointScope, | ||
| } from "./ConstraintStore"; | ||
| import { SavedWaypointId } from "./previousSpecs/v0_1"; | ||
| import { SavedWaypointId } from "./previousSpecs/v0_1_2"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should actually be forward-exported from DocumentSpecTypes, but that's outside the scope of this PR
src/document/HolonomicPathStore.ts
Outdated
| }, | ||
| asSavedPath(): SavedPath { | ||
| let trajectory: Array<SavedTrajectorySample> = self.generated; | ||
| console.log( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To Remove
src/document/PathListStore.ts
Outdated
| import { HolonomicPathStore } from "./HolonomicPathStore"; | ||
| import { v4 as uuidv4 } from "uuid"; | ||
| import { ConstraintStores } from "./ConstraintStore"; | ||
| import { CircularObstacleStore } from "./CircularObstacleStore"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary import?
|
Approval is conditional on adjusting the dependency location of trajoptlib back to sleipnir's main now that SleipnirGroup/TrajoptLib#69 merged. Everything else looks good. |
No description provided.