-
Notifications
You must be signed in to change notification settings - Fork 9
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
Pose with covariance display #76
base: main
Are you sure you want to change the base?
Pose with covariance display #76
Conversation
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/gsoc-2022-potential-project-ideas/1339/4 |
fe14391
to
d03e221
Compare
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.
There is some commits from this other PR #75 can you clean the history ?
Can you help me with how to remove those changes from history? I haven't done this before and don't want to accidentally mess anything up. |
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
d03e221
to
e7b5a07
Compare
@ahcorde I dropped the "Add fortress support" commit with rebase |
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.
Thank you, for this contribution! Some notes:
- Use 100 characters per line
- Run linters
colcon test
you might find a lot of linters errors
- Run linters
- Use the same style in the variable names. Camelcase and _camelCase in arguments
- Use ign-math instead of Eigen
- Use
PIMPL
- Implement methods in the cpp
#include <ignition/rendering.hh> | ||
#include <ignition/math.hh> |
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.
alphabetize
/** | ||
* @brief Visualizes the covariance of a pose (orientation+position) using 2D and 3D ellipses | ||
* | ||
* One 3D ellipsoid indicates position covariance and 3 2D ellipsoids indicate the uncertainty of orientation along rotation at each axis. |
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.
you should use lines of 100 characters
*/ | ||
void updateVisual() | ||
{ | ||
for (int i = 0; i < 3; ++i) { |
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.
why 3 here? Use a constant
float shaftLength = 1.0; | ||
float shaftRadius = 0.05; | ||
float headLength = 0.25; | ||
float headRadius = 0.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.
float shaftLength = 1.0; | |
float shaftRadius = 0.05; | |
float headLength = 0.25; | |
float headRadius = 0.1; | |
float shaftLength = 1.0f; | |
float shaftRadius = 0.05f; | |
float headLength = 0.25f; | |
float headRadius = 0.1f; |
float length = 1.0; | ||
float radius = 0.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.
float length = 1.0; | |
float radius = 0.1; | |
float length = 1.0f; | |
float radius = 0.1f; |
void update() override; | ||
|
||
private: | ||
ignition::rendering::RenderEngine * engine; |
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.
Use PIMPL
. Use IGN_UTILS_IMPL_PTR
from #include <ignition/utils/ImplPtr.hh>
ign_rviz_plugins/res/Plugins.qrc
Outdated
@@ -42,11 +42,15 @@ | |||
<qresource prefix="PoseDisplay/"> | |||
<file alias="PoseDisplay.qml">qml/PoseDisplay.qml</file> | |||
</qresource> | |||
|
|||
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.
@@ -0,0 +1,713 @@ | |||
/* | |||
* Copyright (C) 2020 Open Source Robotics Foundation |
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.
* Copyright (C) 2020 Open Source Robotics Foundation | |
* Copyright (C) 2022 Open Source Robotics Foundation |
double deg2rad(double degrees) | ||
{ | ||
return degrees * 3.14159265358979 / 180.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.
remove this and use IGN_RTOD
and IGN_DTOR
from ign-math
. Angle
class defines them
} | ||
|
||
// Local function to force the axis to be right handed for 3D. Taken from ecl_statistics | ||
void makeRightHanded(Eigen::Matrix3d & eigenvectors, Eigen::Vector3d & eigenvalues) |
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 you do this math with ign-math
? I would perfer not to add Eigen as a dependency
If there is something not in the API we might consider to add it there
Thank you for the review! I will get to the changes soon. As for the math, I used Eigen to be on a safe side with performance. I use diagonalization, which is very optimized in Eigen with a LAPACK implementation that takes advantage of the symmetric covariance https://eigen.tuxfamily.org/dox-devel/classEigen_1_1SelfAdjointEigenSolver.html#a110f7f5ff19fcabe6a10c6d48d5c419c. |
@ahcorde Sorry to bother, but I am having some issues using PIMPL with
|
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.
Merge with main
and review the conflicts
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
Signed-off-by: ahcorde <[email protected]> Co-authored-by: Theodoros Tyrovouzis <[email protected]>
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
68eddd2
to
e829ee7
Compare
@ahcorde Did the merge By the way, the error I sent above was due to |
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
…doris1999/ign-rviz into pose_with_covariance_display Signed-off-by: Theodoros Tyrovouzis <[email protected]>
79f97eb
to
65e4d6a
Compare
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
Hi, I came back after catching up to school work. I tried to address the linter warnings:
if (user_data_.position_frame == Frame::Local &&
fixed_orientation_visual_->HasChild(position_root_visual_)) {
this->root_visual_->AddChild(fixed_orientation_visual_->RemoveChild(position_root_visual_));
} else if (user_data_.position_frame == Frame::Fixed &&
root_visual_->HasChild(position_root_visual_)) {
fixed_orientation_visual_->AddChild(this->root_visual_->RemoveChild(position_root_visual_));
}
if (user_data_.orientation_frame == Frame::Local &&
fixed_orientation_visual_->HasChild(orientation_root_visual_)) {
this->root_visual_->AddChild(fixed_orientation_visual_->RemoveChild(orientation_root_visual_));
} else if (user_data_.orientation_frame == Frame::Fixed &&
root_visual_->HasChild(orientation_root_visual_)) {
fixed_orientation_visual_->AddChild(this->root_visual_->RemoveChild(orientation_root_visual_));
}
Finally, there seems to be a DCO error:
|
…e_display Signed-off-by: Theodoros Tyrovouzis <[email protected]>
Signed-off-by: Theodoros Tyrovouzis <[email protected]>
🎉 New feature
PoseWithCovariance display, largely inspired by the original implementation in RViz
More info in this post https://community.gazebosim.org/t/gsoc-2022-potential-project-ideas/1339/4
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.