Skip to content
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

Print a collision summary to status of failed contact check #543

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

marrts
Copy link
Contributor

@marrts marrts commented Dec 10, 2024

Better debugging at a glance for dot graphs. Depends on tesseract-robotics/tesseract#1079
Screenshot from 2024-12-10 11-30-00

@Levi-Armstrong
Copy link
Contributor

Levi-Armstrong commented Dec 10, 2024

Not that I am against adding this, just wanted mention here. There is now a log file that can be generated and tesseract_qt has a viewer that allows you to inspect a lot of this type of information.

https://github.com/tesseract-robotics/tesseract_planning/blob/master/tesseract_task_composer/core/include/tesseract_task_composer/core/task_composer_log.h

@marrts
Copy link
Contributor Author

marrts commented Dec 11, 2024

There is now a log file that can be generated and tesseract_qt has a viewer that allows you to inspect a lot of this type of information.

I was unaware of this, I can't seem to get it to work in RVIZ with tesseract_ros2. I was able to save and then load a log file (although it was 6.6 GB), and I see things about viewing trajectories and toolpaths in the widget, but nothing actually displays.

In general my proposed change just helps for seeing things at a glance. I am saving all my programs at each step with unique names and publishing them all to the trajectory viewer, so I can debug things nicely, but it can be hard to dig through them all to find the collision and there are so many terminal logs that I can't easily find the collision report.

@marrts
Copy link
Contributor Author

marrts commented Dec 11, 2024

and there are so many terminal logs that I can't easily find the collision report

I think something that would be really cool is to have a tesseract logger object that optionally prints stuff to the terminal, but also stores all the logs to a map based on UUIDs of tasks/graphs. Then all the terminal logs could be exported into unique files, making it easy to debug an individual task even when multiple threads are running at the same time

@Levi-Armstrong
Copy link
Contributor

I was unaware of this, I can't seem to get it to work in RVIZ with tesseract_ros2. I was able to save and then load a log file (although it was 6.6 GB), and I see things about viewing trajectories and toolpaths in the widget, but nothing actually displays.

In general my proposed change just helps for seeing things at a glance. I am saving all my programs at each step with unique names and publishing them all to the trajectory viewer, so I can debug things nicely, but it can be hard to dig through them all to find the collision and there are so many terminal logs that I can't easily find the collision report.

The widget has a context menu that allows you to right click on composite instruction and send as a tool path or joint trajectory. I need to add more like sending the collision results, etc.

Comment on lines +168 to +173
const auto& contact_map = contacts[i];
if (!contact_map.empty())
{
ss << contact_map.getSummary() << "\n";
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could see this blowing up. Should we just print the first contact summary?

Copy link

codecov bot commented Dec 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.43%. Comparing base (e00ae6f) to head (a90d2c3).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #543      +/-   ##
==========================================
+ Coverage   78.41%   78.43%   +0.01%     
==========================================
  Files         252      252              
  Lines       13734    13746      +12     
==========================================
+ Hits        10770    10782      +12     
  Misses       2964     2964              

see 2 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants