-
Notifications
You must be signed in to change notification settings - Fork 122
Fsm debug window #3489
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
base: master
Are you sure you want to change the base?
Fsm debug window #3489
Conversation
| * Creates a tactic given a tactic proto | ||
| * | ||
| * @param tactic_proto the tactic proto | ||
| * @param ai_config The AI config |
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.
| * @param ai_config_ptr The AI config |
| /** | ||
| * Update the AiConfig proto | ||
| * | ||
| * @param ai_config The new AiConfig proto |
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.
delete param string
| FSMLogger() : robot_id(std::nullopt){}; | ||
|
|
||
| /** | ||
| * Set the associated robot ID | ||
| * | ||
| * @param robot_id the id of the robot that the associated tactic is running on | ||
| */ | ||
| void setRobotId(std::optional<unsigned int> robot_id) { | ||
| this->robot_id = robot_id; | ||
| } |
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.
Move implementation to sml_fsm.cpp
| * @param result true if the guard passed, false if the guard failed | ||
| */ | ||
| template <class SM, class TGuard, class TEvent> | ||
| void log_guard(const TGuard&, const TEvent&, bool result) |
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.
is TGuard and TEvent parameters from the SML library? What information do they contain?
| */ | ||
| explicit FSMLogger(std::optional<unsigned int> robot_id) : robot_id(robot_id) {} | ||
|
|
||
| FSMLogger() : robot_id(std::nullopt){}; |
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.
needs docs
| tactic_transitions.append(playinfo.robot_tactic_assignment[robot_id].last_transition) | ||
| tactic_names.append(playinfo.robot_tactic_assignment[robot_id].tactic_name) | ||
|
|
||
| set_table_data( |
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 works great! Is there a way to try to make the column lengths fixed? They are hard to track when using AI vs AI
itsarune
left a comment
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.
Looks like a great debug tool!
It's a bit annoying that the column widths are constantly changing on Thunderscope, so it makes it a bit hard to figure out what's going on.
|
Yeah I've got some plans to make a better UI but I just have not found the time to think about it further |
…tic-and-Play-Refactor
…/Software into Tactic-and-Play-Refactor
…/Software into FSMDebugWindow
Remove experimental disk cache size and age settings.
Co-authored-by: itsarune <[email protected]>
src/.bazelrc
Outdated
| build --experimental_disk_cache_gc_max_size=32G | ||
| build --experimental_disk_cache_gc_max_age=28d | ||
|
|
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.
looks unintentional
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.
Very much so :(
I will remove later
Co-authored-by: itsarune <[email protected]>
…tic-and-Play-Refactor
…/Software into Tactic-and-Play-Refactor
…/Software into FSMDebugWindow
itsarune
left a comment
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.
Left a few comments
Description
This is built off of PR #3481
I use Boost::SML logging capabilities to expose the guard calls and state transitions that our AI undergoes as it is moving through each state machine
Testing Done
Thunderscope runs with similar performance as before, messages seem to line up with robot id
Resolved Issues
I have no idea if this resolves any issues :/ but it will probably make debugging easier
#3532
Length Justification and Key Files to Review
Look at sml_fsm.h especially I think
Review Checklist
It is the reviewers responsibility to also make sure every item here has been covered
.hfile) should have a javadoc style comment at the start of them. For examples, see the functions defined inthunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.TODO(or similar) statements should either be completed or associated with a github issue