-
Notifications
You must be signed in to change notification settings - Fork 113
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
RSDK-1899 rearchitect backend of constraint system in anticipation of new constraints being added #2108
Conversation
@tessavitabile Follow-up from 1:1, the Important section at the bottom of Peter's PR description is the preparatory content for 2D Motion Planning (and eventually can lead to GeoPoint goals, other spatial goal encodings, etc.) |
motionplan/plannerOptions.go
Outdated
opt.AddConstraint(defaultJointConstraint, NewJointConstraint(math.Inf(1))) | ||
opt.metric = NewSquaredNormMetric() | ||
opt.pathDist = NewZeroMetric() // By default, the distance to the valid manifold is zero, unless constraints say otherwise | ||
opt.GoalArcScore = JointMetric |
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.
[q, nit] Was this meant to stay as GoalArcScore
?
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.
Some small nits, just some minor cleanup.
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 is a massive change, nice! I'm only halfway through but will come back later today to review the rest of it but wanted to get some initial comments in now
…nstraint-system-in-anticipation-of-new-constraints-being-added
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.
Ok I think I'm done with my first pass. Overall super excited about this. This is an awesome change!
At a high level the things that I am mainly concerned with surround the new ____Input
types. I think we should figure out a good naming scheme for what we call Input
StateInput
SegmentInput
because the word input is getting a little overloaded and now is a good time to establish how we want to talk about these going forward. Also, I don't see the need to add frames to these new structures. The frame can be a member on the constraintHandler, which should simplify things a bit.
} | ||
|
||
collisions := cg.collisions() | ||
if len(collisions) > 0 { |
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.
We need to add this back now right?
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.
No, since we're no longer reporting distances here
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.
what is reportDistances
doing as an argument if we are not doing this anymore?
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.
Once the PenetrationDepthMetric
that I mentioned in my TODO is written, that will use true
|
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.
LGTM
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.
Just a few more things but really close!
motionplan/metrics.go
Outdated
return referenceframe.InputsL2Distance(segment.StartConfiguration, segment.EndConfiguration) | ||
} | ||
|
||
// TODO(pl): Writing a PenetrationDepthMetric will allow cbirrt to path along the sides of obstacles rather than terminating |
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.
Remove these
} | ||
|
||
collisions := cg.collisions() | ||
if len(collisions) > 0 { |
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.
what is reportDistances
doing as an argument if we are not doing this anymore?
Availability
Quality
Performance
The above data was generated by running scenes defined in the
|
This PR does the following:
spatialmath.Pose
as a primary data structure for the internal specification of Goals in motion planning. Goals are now stored/passed internally mostly as StateMetrics, where e.g. a passed in Pose is used to create a distance function which will converge on that pose. This is already what was happening implicitly, but this change opens the door to planning in terms of robot configurations where a single spatialmath.Pose is not necessarily the appropriate way to specify a Goal (e.g. 2d planning)