Skip to content

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
Contributor Author

Choose a reason for hiding this comment

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

The way I have it, it's up to the user how much is printed. If they have contact check set to FIRST then they'll only get one. If it is set to ALL then they'll potentially get a long novel printed out, which is maybe useful for them.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it may be better to compile the vector of maps into a single map and then print the summary to avoid a large message.

Copy link
Contributor

Choose a reason for hiding this comment

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

@marrts What are your thoughts on the proposal above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That sounds reasonable to me

@codecov
Copy link

codecov bot commented Dec 22, 2024

Codecov Report

❌ Patch coverage is 9.09091% with 70 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.77%. Comparing base (d115e4f) to head (ffacfed).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
tesseract_motion_planners/core/src/utils.cpp 0.00% 70 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #543      +/-   ##
==========================================
+ Coverage   79.46%   79.77%   +0.30%     
==========================================
  Files         268      268              
  Lines       18990    18919      -71     
==========================================
+ Hits        15091    15092       +1     
+ Misses       3899     3827      -72     
Files with missing lines Coverage Δ
...anning/src/nodes/continuous_contact_check_task.cpp 85.71% <100.00%> (ø)
...planning/src/nodes/discrete_contact_check_task.cpp 87.50% <100.00%> (+0.17%) ⬆️
tesseract_motion_planners/core/src/utils.cpp 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Levi-Armstrong
Copy link
Contributor

@marrts I think this just needs a few changes and then this can be merged in.

@marrts
Copy link
Contributor Author

marrts commented Aug 26, 2025

@marrts I think this just needs a few changes and then this can be merged in.

If we're able to get tesseract-robotics/tesseract#1200 merged then we could potentially have better information in the printout with the new return object. Maybe we wait for that. (I understand that would also require a bigger update to this for contactCheckProgram similar to checkTrajectory in tesseract_environment)

@marrts
Copy link
Contributor Author

marrts commented Aug 27, 2025

@marrts I think this just needs a few changes and then this can be merged in.

If we're able to get tesseract-robotics/tesseract#1200 merged then we could potentially have better information in the printout with the new return object. Maybe we wait for that. (I understand that would also require a bigger update to this for contactCheckProgram similar to checkTrajectory in tesseract_environment)

Just playing around with some stuff and we can make a printout that looks something like this:
image

image

Obviously, this can be changed based on feedback, but this makes it really easy to quickly see where and what happened.

@Levi-Armstrong
Copy link
Contributor

@marrts Do you have time to update this based on your changes in the tesseract repository?

@marrts
Copy link
Contributor Author

marrts commented Sep 4, 2025

@marrts Do you have time to update this based on your changes in the tesseract repository?

I should be able to do it later today or tomorrow.

@marrts marrts force-pushed the contact_map_coll_summary branch from a90d2c3 to 67a90d9 Compare September 5, 2025 00:34
@marrts
Copy link
Contributor Author

marrts commented Sep 5, 2025

@marrts Do you have time to update this based on your changes in the tesseract repository?

I should be able to do it later today or tomorrow.

Pushed, but it does require this other tesseract PR to print out a condensed trajectory summary message. tesseract-robotics/tesseract#1205

@Levi-Armstrong Levi-Armstrong merged commit 4dcae88 into tesseract-robotics:master Sep 6, 2025
8 of 14 checks passed
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