-
Notifications
You must be signed in to change notification settings - Fork 41
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
Correct way to add optimization progress plotting callbacks #204
Comments
Unfortunately, I have not used these in a long time but I will see if I can find an examples of using them that works. |
Update, Now that a solver profile exist this can be implemented. I will have PR against TrajOpt and Tesseract planning to support this very soon. |
The trajopt PR |
The tesseract_planning PR |
Now you can add a solver profile where you add a callback for plotting TrajOptDefaultSolverProfile solver_profile;
solver_profile.callbacks.push_back(trajopt::PlotCallback(tesseract_ros::ROSPlotting(root_link, topic_namespace)); Then add this profile to the profile dictionary and make sure to use this profile in your composite instruction. |
Awesome! Thanks a lot. Interestingly, I observe the following behaviour: When setting the display mode to 'trail', the first callback call plots the entire environment (including collision geometries), but the pose of the links are all over the place. When switching from 'loop' to 'trail' mode during optimization, I do not encounter this phenomenon. |
Are you able to share a screen shot of what is happening? |
@cpetersmeier Can this be closed? |
I was able to reproduce the effect with the
Then I added the plot callback to the basic_cartesian_example.cpp file:
I removed the manual inputs for pausing the solver here:
When I plot the trajectory using the trail setting I get: Edit: |
Hello everyone,
I would like to use the plotting callbacks to visualize optimization progress. A few approaches I have tried are forwarding the callbacks through the solver profile (all member functions are
const
though), as well as constructing them manually in theTrajOptMotionPlanner
class (circular dependency when creating a plotter withtesseract_rosutils
).Is there a recommended way to approach this?
The text was updated successfully, but these errors were encountered: