Skip to content
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

New helper function getIdentityPose() #122

Merged
merged 1 commit into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/rviz_visual_tools/rviz_visual_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,7 @@ class RvizVisualTools
* \param Pose to fill in
*/
static void generateEmptyPose(geometry_msgs::Pose& pose);
static geometry_msgs::Pose getIdentityPose();

/**
* \brief Test if two Eigen poses are close enough
Expand Down
16 changes: 16 additions & 0 deletions src/rviz_visual_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2754,6 +2754,22 @@ void RvizVisualTools::generateEmptyPose(geometry_msgs::Pose& pose)
pose.orientation.w = 1;
}

geometry_msgs::Pose RvizVisualTools::getIdentityPose()
{
geometry_msgs::Pose pose;
// Position
pose.position.x = 0;
pose.position.y = 0;
pose.position.z = 0;

// Orientation on place
davetcoleman marked this conversation as resolved.
Show resolved Hide resolved
pose.orientation.x = 0;
pose.orientation.y = 0;
pose.orientation.z = 0;
pose.orientation.w = 1;
return pose;
}

bool RvizVisualTools::posesEqual(const Eigen::Isometry3d& pose1, const Eigen::Isometry3d& pose2, double threshold)
{
static const std::size_t NUM_VARS = 16; // size of eigen matrix
Expand Down