-
Notifications
You must be signed in to change notification settings - Fork 59
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
Visualze Frustum #491
Visualze Frustum #491
Conversation
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.
Do you mind to sign the commit https://github.com/gazebosim/gz-sensors/pull/491/checks?check_run_id=34883433200 ?
Signed-off-by: Utkarsh <[email protected]>
Signed-off-by: Utkarsh <[email protected]>
a455c61
to
8200848
Compare
@ahcorde , done. |
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.
please check linters
/github/workspace/src/LogicalCameraSensor.cc:185: Lines should be <= 80 characters long [whitespace/line_length] [2]
/github/workspace/src/LogicalCameraSensor.cc:195: Lines should be <= 80 characters long [whitespace/line_length] [2]
/github/workspace/src/LogicalCameraSensor.cc:196: Lines should be <= 80 characters long [whitespace/line_length] [2]
Signed-off-by: Utkarsh <[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 the contribution. Just minor comments.
src/LogicalCameraSensor.cc
Outdated
@@ -36,9 +36,13 @@ class gz::sensors::LogicalCameraSensorPrivate | |||
/// \brief node to create publisher | |||
public: transport::Node node; | |||
|
|||
public: transport::Node node_logic; |
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.
add doxygen 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.
Updated!
src/LogicalCameraSensor.cc
Outdated
@@ -56,6 +60,8 @@ class gz::sensors::LogicalCameraSensorPrivate | |||
|
|||
/// \brief Msg containg info on models detected by logical camera | |||
msgs::LogicalCameraImage msg; | |||
|
|||
msgs::LogicalCameraSensor msg_logic; |
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.
msgs::LogicalCameraSensor msg_logic; | |
/// \brief Msg containing logical camera frustum info. | |
public: msgs::LogicalCameraSensor msgLogic; |
Looks like we forgot to add public
to msg
above as well.
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.
Updated!
src/LogicalCameraSensor.cc
Outdated
/// \brief publisher to publish logical camera messages. | ||
public: transport::Node::Publisher pub; | ||
|
||
public: transport::Node::Publisher pub_logic; |
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 camelCase and add doxygen comment:
public: transport::Node::Publisher pub_logic; | |
/// \brief Publisher to publish logical camera frustum information | |
public: transport::Node::Publisher pubLogic; |
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.
Updated!
src/LogicalCameraSensor.cc
Outdated
if (!this->dataPtr->pub) | ||
{ | ||
gzerr << "Unable to create publisher on topic[" << this->Topic() << "].\n"; | ||
return false; | ||
} | ||
|
||
if (!this->dataPtr->pub_logic) | ||
{ | ||
gzerr << "Unable to create publisher on topic[" << this->Topic() << "].\n"; |
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.
gzerr << "Unable to create publisher on topic[" << this->Topic() << "].\n"; | |
gzerr << "Unable to create publisher on topic[" << this->Topic() << "/frustum].\n"; |
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.
Updated!
Signed-off-by: Utkarsh <[email protected]>
Signed-off-by: Utkarsh <[email protected]>
c21162d
to
7ccc96f
Compare
🎉 New feature
Summary
This PR mainly adds the visualization of Frustum.
We could see it was present in gazebo classic and from gazebo garden onwards the plugin/feature is not available.
Test it
$ Build gazebo from source.
$ . install/setup.sh
$ gz sim examples/worlds/visualize_frustum.sdf
Test Ref images,
Play the simulation.
Select the topic from scroll down.
Refresh it to get the "logical_camera/frustum" topic.
Subcriibed to "logical_camera/frustum".
Final output
Checklist
codecheck
passedSupporting PRs