-
Notifications
You must be signed in to change notification settings - Fork 30
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
clean up and integrate pose estimators #336
Conversation
Codecov Report
@@ Coverage Diff @@
## master #336 +/- ##
=======================================
Coverage 81.14% 81.14%
=======================================
Files 200 200
Lines 5687 5687
=======================================
Hits 4615 4615
Misses 1072 1072 |
@@ -44,7 +44,8 @@ class ObjectDatabase | |||
void getObjectByKey( |
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.
Can we document this method? I'm not entirely clear what obj_offset
is.
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 added the documentation for this. objectName
, objectResource
, and objectOffset
are what should be retrieved from ObjectDatabase. For each key, those values are stored in tag_data_xx.json
in pr_ordata
.
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.
objectOffset
is the offset between an AprilTag and the actual origin of an object.
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.
Should this be an offset or a transform? Since it's an Isometry3d
it seems like it should be the latter?
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.
It is a transformation matrix for the offset. I think Isometry3d
is just a way to express it.
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.
Some of them in the apriltag tag_data (https://github.com/personalrobotics/pr_ordata/blob/master/data/objects/tag_data_apriltags.json) have rotation components as well.
This PR looks like removing |
Let's try to update this PR and merge this soon! |
Tested with the can detector by using personalrobotics/herb3_demos#13, and this works well. Since personalrobotics/pr_assets#32 is merged, this branch works with the master branch of |
@@ -41,10 +47,17 @@ class ObjectDatabase | |||
|
|||
virtual ~ObjectDatabase() = default; | |||
|
|||
/// Get the object name, resource, and offset from database by objectKey | |||
/// \param[in] objectKey: The key(string) of an object in ObjectDatabase |
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 believe we don't want colons in Doxygen comments. Also, minor typo: key(string)
-> key (string)
.
/// \param[out] objectName: The retrieved object name from ObjectDatabase | ||
/// \param[out] objectResource: The retrieved uri of the object | ||
/// \param[out] objectOffset: The retrieved offset matrix of the object | ||
/// e.g. the offset between a tag and the actual origin of an object |
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 this should be i.e.
rather than e.g.
. Also, I think we should be calling this a transform rather than an offset, if we're using Isometry3d
.
/// \c dart::common::Uri, and updates the environment which is an | ||
/// \c aikido::planner::World. | ||
class RcnnPoseModule : public PerceptionModule | ||
class PoseEstimatorModule : public PerceptionModule |
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.
What do you think about renaming this to RosPoseEstimationModule
?
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.
If we want to rename it with a more ros related name, I think RosMarkerArrayClient
would be the most clear option. If not, I personally prefer PoseEstimatorModule
.
Looks good! I had a few minor nits, but I think this should be otherwise good to go. |
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 as well.
I have a nitpick on the local variable names. Our convention is to use Pascal case, but many of local variables names are not following it. Could you either fix them in this PR or create an issue?
@@ -1,4 +1,4 @@ | |||
#include <aikido/perception/RcnnPoseModule.hpp> | |||
#include <aikido/perception/PoseEstimatorModule.hpp> |
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.
Nit: Our convention is to use "..."
for AIKIDO headers instead of <...>
.
@@ -45,14 +47,14 @@ bool RcnnPoseModule::detectObjects( | |||
// Making sure the Message from RcnnPose is non empty | |||
if (marker_message == nullptr) | |||
{ | |||
dtwarn << "[RcnnPoseModule::detectObjects] nullptr Marker Message " | |||
dtwarn << "[PoseEstimatorModule::detectObjects] nullptr Marker Message " | |||
<< mMarkerTopic << std::endl; | |||
return false; | |||
} | |||
|
|||
if (marker_message->markers.size() == 0) |
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.
Nit: Using empty()
is more preferred way to check its emptiness rather than size()
.
The last commit addressed all the issues above. |
* clean up and integrate pose estimators * format PoseEstimatorModule * update CHANGELOG.md * add documentation * add documentation * fix the issues on comments in PR#336
In this PR, I integrated pose estimator modules for AprilTags and RcnnPose into one PoseEstimator module. I updated ObjectDatabase and corresponding YAML files in pr-ordata (personalrobotics/pr_assets#32) as well.
Before creating a pull request
make format
Before merging a pull request
CHANGELOG.md