Skip to content

Commit

Permalink
Fix test for new topic
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina committed Jun 16, 2022
1 parent dc16e61 commit 11a68be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/systems/odometry_publisher/OdometryPublisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void OdometryPublisher::Configure(const Entity &_entity,
this->dataPtr->odomFrame = this->dataPtr->model.Name(_ecm) + "/" + "odom";
if (!_sdf->HasElement("odom_frame"))
{
ignwarn << "OdometryPublisher system plugin missing <odom_frame>, "
igndbg << "OdometryPublisher system plugin missing <odom_frame>, "
<< "defaults to \"" << this->dataPtr->odomFrame << "\"" << std::endl;
}
else
Expand Down Expand Up @@ -177,7 +177,7 @@ void OdometryPublisher::Configure(const Entity &_entity,
+ "/" + "base_footprint";
if (!_sdf->HasElement("robot_base_frame"))
{
ignwarn << "OdometryPublisher system plugin missing <robot_base_frame>, "
igndbg << "OdometryPublisher system plugin missing <robot_base_frame>, "
<< "defaults to \"" << this->dataPtr->robotBaseFrame << "\"" << std::endl;
}
else
Expand Down Expand Up @@ -232,6 +232,8 @@ void OdometryPublisher::Configure(const Entity &_entity,
{
this->dataPtr->odomPub = this->dataPtr->node.Advertise<msgs::Odometry>(
odomTopicValid);
ignmsg << "OdometryPublisher publishing odometry on [" << odomTopicValid
<< "]" << std::endl;
}

std::string odomCovTopicValid {
Expand All @@ -245,6 +247,8 @@ void OdometryPublisher::Configure(const Entity &_entity,
{
this->dataPtr->odomCovPub = this->dataPtr->node.Advertise<
msgs::OdometryWithCovariance>(odomCovTopicValid);
ignmsg << "OdometryPublisher publishing odometry with covariance on ["
<< odomCovTopicValid << "]" << std::endl;
}

std::string tfTopic{"/model/" + this->dataPtr->model.Name(_ecm) +
Expand All @@ -261,6 +265,8 @@ void OdometryPublisher::Configure(const Entity &_entity,
{
this->dataPtr->tfPub = this->dataPtr->node.Advertise<msgs::Pose_V>(
tfTopicValid);
ignmsg << "OdometryPublisher publishing Pose_V (TF) on ["
<< tfTopicValid << "]" << std::endl;
}
}

Expand Down
4 changes: 2 additions & 2 deletions test/integration/odometry_publisher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class OdometryPublisherTest
{
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
ASSERT_NE(maxSleep, sleep);
EXPECT_NE(maxSleep, sleep);

// Odom for 3s
ASSERT_FALSE(odomPoses.empty());
Expand Down Expand Up @@ -611,7 +611,7 @@ TEST_P(OdometryPublisherTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Movement3d))
TestMovement3d(
ignition::common::joinPaths(PROJECT_SOURCE_PATH,
"test", "worlds", "odometry_publisher_3d.sdf"),
"/model/X3/odometry", "/model/X3/tf", "X3/odom", "X3/base_footprint");
"/model/X3/odometry", "/model/X3/pose", "X3/odom", "X3/base_footprint");
}

/////////////////////////////////////////////////
Expand Down

0 comments on commit 11a68be

Please sign in to comment.