Skip to content

Commit

Permalink
update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nisarg236 committed Dec 25, 2024
1 parent f7443af commit 1eac1c9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions costmap_2d/test/footprint_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ TEST( Costmap2DROS, padded_footprint_from_string_param )
std::vector<geometry_msgs::Point> footprint = cm.getRobotFootprint();
EXPECT_EQ( 3, footprint.size() );

EXPECT_EQ( 1.5f, footprint[ 0 ].x );
EXPECT_EQ( 1.5f, footprint[ 0 ].y );
EXPECT_EQ( 0.0f, footprint[ 0 ].z );
EXPECT_EQ( 1.66667f, footprint[0].x );
EXPECT_EQ( 1.66667f, footprint[0].y );
EXPECT_EQ( 0.0f, footprint[0].z );

EXPECT_EQ( -1.5f, footprint[ 1 ].x );
EXPECT_EQ( 1.5f, footprint[ 1 ].y );
EXPECT_EQ( 0.0f, footprint[ 1 ].z );
EXPECT_EQ( -1.66667f, footprint[1].x );
EXPECT_EQ( 1.66667f, footprint[1].y );
EXPECT_EQ( 0.0f, footprint[1].z );

EXPECT_EQ( -1.5f, footprint[ 2 ].x );
EXPECT_EQ( -1.5f, footprint[ 2 ].y );
EXPECT_EQ( 0.0f, footprint[ 2 ].z );
EXPECT_EQ( -1.66667f, footprint[2].x );
EXPECT_EQ( -1.66667f, footprint[2].y );
EXPECT_EQ( 0.0f, footprint[2].z );
}

TEST( Costmap2DROS, radius_param )
Expand Down Expand Up @@ -155,7 +155,7 @@ TEST( Costmap2DROS, footprint_empty )
// With no specification of footprint or radius, defaults to 0.46 meter radius plus 0.01 meter padding.
EXPECT_EQ( 16, footprint.size() );

EXPECT_NEAR( 0.47f, footprint[ 0 ].x, 0.0001 );
EXPECT_NEAR( 0.47f, footprint[ 0 ].x, 0.001 );
EXPECT_NEAR( 0.0f, footprint[ 0 ].y, 0.0001 );
EXPECT_EQ( 0.0f, footprint[ 0 ].z );
}
Expand Down

0 comments on commit 1eac1c9

Please # to comment.