Replies: 4 comments 13 replies
-
Some thoughts from the FRC Discord discussion:
|
Beta Was this translation helpful? Give feedback.
-
A bit of terminology clarification, now that there's a distinction that needs to be made. This editor (which I've working-named Waymaker) does not generate trajectories. It does generate paths, in the sense that a path is a continuous vector-handle-defined curve with a direction along the curve. In other words, by setting the waypoints (position, rotation, tangent length) the user defines mathematically the course of the path. I intend to access the same functionality that is used in robot code to generate and display that path based on the given waypoints. The "waypoints export" simply expresses that path in terms of its handles. However, velocity along that path and/or feasibility for a given robot to actually accomplish that accurately are issues for trajectory constraints and/or physics. Neither of those is something I want to bring in to Waymaker. My goal is to allow drawing the shape of the path on a field image, and to allow that drawing to serve as the description of the path in robot code, up until the point it gets generated into a trajectory with velocity. If I am going completely off the rails with this understanding, please stop and correct me before I start coding it. |
Beta Was this translation helpful? Give feedback.
-
For spline editting UI, we should avoid the way PathWeaver does it: requiring clicking and dragging the center of an existing spline to insert new waypoints. One alternative would be left-click on the spline for waypoint creation and right-click for waypoint removal. Depends on whether we'll need right-click for a context menu. The Glass Field2D widget might already have this in a context menu, but in case it doesn't, it would make sense to display the waypoint coordinates in a tooltip on hover and drag. PathWeaver displays that information in a separate window pane, but it's too out-of-context, in my opinion. |
Beta Was this translation helpful? Give feedback.
-
Thought. If this is a feasible feature, it would be an add over PathWeaver, which I assume did not implement it because it was made before there was standard controllers for trajectory and swerve. |
Beta Was this translation helpful? Give feedback.
-
Pinging @calcmogul because of previous Discord discussion on this.
Is your feature request related to a problem? Please describe.
Not exactly a problem. This is a discussion / draft/RFC about a hypothetical waypoint editor, similar to PathWeaver but built for WPILib Trajectories and delegating generation of the trajectory from the given waypoints to a component of the robot code.
Describe the solution you'd like
Scope: At the time of posting, my stance is that the editor should not need to know anything about a particular robot’s characteristics. A Trajectory has the same waypoints independent of a robot, and the robot code can generate its own trajectory out of a given set of waypoints and robot-specific constraints. One of the eventually-discovered shortfalls of PathWeaver was that it required constraints and generated frame-by-frame points for the robot to follow.
My proposed alternative would instead export the “curve handle “ waypoint sets for later robot use.
Further thoughts:
For the record, I have already started on an ImGUI app that uses the Field2d without its Network Tables backend. I’d like to develop this project and contribute back to WPILIB if this would be welcome, but I want to hear use cases and/or problem statements with current PathWeaver, as well as feature requests.
Beta Was this translation helpful? Give feedback.
All reactions