ompl / ompl/ompl

Default OptimizationObjective in ProblemDefinition?

Open
#176 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

minor proposal
Dominant language
C++
Stars
2.2k
Forks
713
Avg merge
9d 12h
Merged PRs (30d)
2

Description

Original report by Luis G. Torres (Bitbucket: [Luis Torres](https://bitbucket.org/Luis Torres), ).


Currently, all optimizing motion planners have to implement boilerplate code like this:

https://bitbucket.org/ompl/ompl/src/01a095a5441b640f2ea7d7bdfaee5c168f505295/src/ompl/geometric/planners/rrt/src/RRTstar.cpp?at=default#cl-88

in order to default to PathLengthOptimizationObjective to account for the case when a user has not specified an optimization objective. PRMstar has an identical check, and any other optimizing planner will have to do the above as well under the current framework.

Since most optimizing planners end up defaulting to PathLengthOO, would it make sense to just make ProblemDefinition::optimizationObjective_ default to a PathLengthOptimizationObjective upon construction? This would reduce a lot of boilerplate code in any other optimizing planners.

Can we think of a reason not to do this?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading ProblemDefinition and the optimizationObjective_ initialization, then compare the fallback logic in RRTstar.cpp with the identical PRMstar behavior. Determine whether a default PathLengthOptimizationObjective preserves existing behavior for planners and callers. Done means the default policy is agreed, consistently applied, and the duplicated planner checks can be removed without changing explicit objectives.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
robotics
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.