-
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
[Citadel] Add Base and EntityManagement to tpeplugin #32
Conversation
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Signed-off-by: claireyywang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-physics2 #32 +/- ##
================================================
+ Coverage 82.16% 82.21% +0.05%
================================================
Files 92 90 -2
Lines 3095 3025 -70
================================================
- Hits 2543 2487 -56
+ Misses 552 538 -14
Continue to review full report at Codecov.
|
Signed-off-by: claireyywang <[email protected]>
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.
thanks for adding the extra tests!
I noticed in the dartsim implementation, it makes use of ReferenceInterface
function for fast retrieval of entities. I gave that a try in a couple of places and they seem to work fine. Should we update other functions?
{ | ||
modelName = it->second->model->GetName(); | ||
} | ||
return modelName; |
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.
I think we could use ReferenceInterface
in this function to avoid lookups?
static std::string modelName =
this->ReferenceInterface<ModelInfo>(_modelID)->model->GetName();
return modelName;
I now understand that static std::string
is used because of the const &
return type. I think it's designed to match the return type of dart's Skeleton::getName function
return it->second->model->GetChildCount(); | ||
} | ||
// return invalid count if model not found | ||
return -1; |
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 also seems to work:
return this->ReferenceInterface<ModelInfo>(_modelID)->model->GetChildCount();
Signed-off-by: claireyywang <[email protected]>
Thanks for the review, @iche033 ! I have updated functions to use |
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 good to me!
A side note, I noticed that code check is not running on tpe
src code. We can add the check here. After that, running sh tools/code_check.sh
should pick up style issues. We can do that and fix the errors in a separate PR
Awesome, thanks for catching the code check! I didn't know it needs to be manually added. I'll follow up with another PR fixing styles as suggested. |
This PR adds
EntityManagementFeatures
andBase.hh
to lay the ground work of tpeplugin features. It should be merged after #45 which add functions totpelib
and before #46 which adds all the other features totpeplugin
.