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

fix code comment typos #3892

Merged
merged 1 commit into from
Oct 23, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class BtActionNode : public BT::ActionNodeBase
// Action related failure that should not fail the tree, but the node
return BT::NodeStatus::FAILURE;
} else {
// Internal exception to propogate to the tree
// Internal exception to propagate to the tree
throw e;
}
}
Expand Down
2 changes: 1 addition & 1 deletion nav2_collision_monitor/src/collision_monitor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ void CollisionMonitor::process(const Velocity & cmd_vel_in)
notifyActionState(robot_action, action_polygon);
}

// Publish requred robot velocity
// Publish required robot velocity
publishVelocity(robot_action);

// Publish polygons for better visualization
Expand Down
4 changes: 2 additions & 2 deletions nav2_costmap_2d/test/module_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ TEST(costmap, testTrickyPropagation) {
// Add a dynamic obstacle
pcl::PointCloud<pcl::PointXYZ> c2;
c2.points.resize(3);
// Dynamic obstacle that raytaces.
// Dynamic obstacle that raytraces.
c2.points[0].x = 7.0;
c2.points[0].y = 8.0;
c2.points[0].z = 1.0;
Expand Down Expand Up @@ -1167,7 +1167,7 @@ TEST(costmap, testTrickyPropagation) {

pcl::PointCloud<pcl::PointXYZ> c;
c.points.resize(1);
// Dynamic obstacle that raytaces the one at (3.0, 4.0).
// Dynamic obstacle that raytraces the one at (3.0, 4.0).
c.points[0].x = 4.0;
c.points[0].y = 5.0;
c.points[0].z = 1.0;
Expand Down
18 changes: 9 additions & 9 deletions nav2_costmap_2d/test/unit/binary_filter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ void TestNode::reset()

TEST_F(TestNode, testBinaryState)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::BINARY_FILTER, MASK_TOPIC, 0.0, 1.0);
ASSERT_TRUE(createBinaryFilter("map", 10.0));
Expand All @@ -718,7 +718,7 @@ TEST_F(TestNode, testBinaryState)

TEST_F(TestNode, testBinaryStateScaled)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::BINARY_FILTER, MASK_TOPIC, 100.0, -1.0);
ASSERT_TRUE(createBinaryFilter("map", 35.0));
Expand All @@ -733,7 +733,7 @@ TEST_F(TestNode, testBinaryStateScaled)

TEST_F(TestNode, testInvertedBinaryState)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::BINARY_FILTER, MASK_TOPIC, 0.0, 1.0);
setDefaultState(true);
Expand All @@ -749,7 +749,7 @@ TEST_F(TestNode, testInvertedBinaryState)

TEST_F(TestNode, testOutOfBounds)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::BINARY_FILTER, MASK_TOPIC, 0.0, 1.0);
ASSERT_TRUE(createBinaryFilter("map", 10.0));
Expand All @@ -764,7 +764,7 @@ TEST_F(TestNode, testOutOfBounds)

TEST_F(TestNode, testInfoRePublish)
{
// Initilize test system
// Initialize test system
createMaps("map");
// Publish Info with incorrect dummy mask topic
publishMaps(nav2_costmap_2d::BINARY_FILTER, "dummy_topic", 0.0, 1.0);
Expand Down Expand Up @@ -805,7 +805,7 @@ TEST_F(TestNode, testMaskRePublish)

TEST_F(TestNode, testIncorrectFilterType)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(INCORRECT_TYPE, MASK_TOPIC, 0.0, 1.0);
ASSERT_FALSE(createBinaryFilter("map", 10.0));
Expand All @@ -817,7 +817,7 @@ TEST_F(TestNode, testIncorrectFilterType)

TEST_F(TestNode, testDifferentFrame)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::BINARY_FILTER, MASK_TOPIC, 0.0, 1.0);
ASSERT_TRUE(createBinaryFilter("odom", 10.0));
Expand All @@ -833,7 +833,7 @@ TEST_F(TestNode, testDifferentFrame)

TEST_F(TestNode, testIncorrectFrame)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::BINARY_FILTER, MASK_TOPIC, 0.0, 1.0);
ASSERT_TRUE(createBinaryFilter("odom", 10.0));
Expand All @@ -849,7 +849,7 @@ TEST_F(TestNode, testIncorrectFrame)

TEST_F(TestNode, testResetState)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::BINARY_FILTER, MASK_TOPIC, 0.0, 1.0);
ASSERT_TRUE(createBinaryFilter("map", 10.0));
Expand Down
14 changes: 7 additions & 7 deletions nav2_costmap_2d/test/unit/keepout_filter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void TestNode::reset()

TEST_F(TestNode, testFreeMasterLethalKeepout)
{
// Initilize test system
// Initialize test system
createMaps(nav2_costmap_2d::FREE_SPACE, nav2_util::OCC_GRID_OCCUPIED, "map");
publishMaps();
createKeepoutFilter("map");
Expand All @@ -356,7 +356,7 @@ TEST_F(TestNode, testFreeMasterLethalKeepout)

TEST_F(TestNode, testUnknownMasterNonLethalKeepout)
{
// Initilize test system
// Initialize test system
createMaps(
nav2_costmap_2d::NO_INFORMATION,
(nav2_util::OCC_GRID_OCCUPIED - nav2_util::OCC_GRID_FREE) / 2,
Expand All @@ -376,7 +376,7 @@ TEST_F(TestNode, testUnknownMasterNonLethalKeepout)

TEST_F(TestNode, testFreeKeepout)
{
// Initilize test system
// Initialize test system
createMaps(nav2_costmap_2d::FREE_SPACE, nav2_util::OCC_GRID_FREE, "map");
publishMaps();
createKeepoutFilter("map");
Expand All @@ -395,7 +395,7 @@ TEST_F(TestNode, testFreeKeepout)

TEST_F(TestNode, testUnknownKeepout)
{
// Initilize test system
// Initialize test system
createMaps(nav2_costmap_2d::FREE_SPACE, nav2_util::OCC_GRID_UNKNOWN, "map");
publishMaps();
createKeepoutFilter("map");
Expand All @@ -414,7 +414,7 @@ TEST_F(TestNode, testUnknownKeepout)

TEST_F(TestNode, testInfoRePublish)
{
// Initilize test system
// Initialize test system
createMaps(nav2_costmap_2d::FREE_SPACE, nav2_util::OCC_GRID_OCCUPIED, "map");
publishMaps();
createKeepoutFilter("map");
Expand All @@ -433,7 +433,7 @@ TEST_F(TestNode, testInfoRePublish)

TEST_F(TestNode, testMaskRePublish)
{
// Initilize test system
// Initialize test system
createMaps(nav2_costmap_2d::FREE_SPACE, nav2_util::OCC_GRID_OCCUPIED, "map");
publishMaps();
createKeepoutFilter("map");
Expand All @@ -451,7 +451,7 @@ TEST_F(TestNode, testMaskRePublish)

TEST_F(TestNode, testDifferentFrames)
{
// Initilize test system
// Initialize test system
createMaps(nav2_costmap_2d::FREE_SPACE, nav2_util::OCC_GRID_OCCUPIED, "map");
publishMaps();
createKeepoutFilter("odom");
Expand Down
18 changes: 9 additions & 9 deletions nav2_costmap_2d/test/unit/speed_filter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ void TestNode::reset()

TEST_F(TestNode, testPercentSpeedLimit)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::SPEED_FILTER_PERCENT, 0.0, 1.0);
EXPECT_TRUE(createSpeedFilter("map"));
Expand All @@ -648,7 +648,7 @@ TEST_F(TestNode, testPercentSpeedLimit)

TEST_F(TestNode, testIncorrectPercentSpeedLimit)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::SPEED_FILTER_PERCENT, -50.0, 2.0);
EXPECT_TRUE(createSpeedFilter("map"));
Expand All @@ -663,7 +663,7 @@ TEST_F(TestNode, testIncorrectPercentSpeedLimit)

TEST_F(TestNode, testAbsoluteSpeedLimit)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::SPEED_FILTER_ABSOLUTE, 1.23, 4.5);
EXPECT_TRUE(createSpeedFilter("map"));
Expand All @@ -678,7 +678,7 @@ TEST_F(TestNode, testAbsoluteSpeedLimit)

TEST_F(TestNode, testIncorrectAbsoluteSpeedLimit)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::SPEED_FILTER_ABSOLUTE, -50.0, 2.0);
EXPECT_TRUE(createSpeedFilter("map"));
Expand All @@ -693,7 +693,7 @@ TEST_F(TestNode, testIncorrectAbsoluteSpeedLimit)

TEST_F(TestNode, testOutOfBounds)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::SPEED_FILTER_PERCENT, 0.0, 1.0);
EXPECT_TRUE(createSpeedFilter("map"));
Expand All @@ -708,7 +708,7 @@ TEST_F(TestNode, testOutOfBounds)

TEST_F(TestNode, testInfoRePublish)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::SPEED_FILTER_ABSOLUTE, 1.23, 4.5);
EXPECT_TRUE(createSpeedFilter("map"));
Expand All @@ -728,7 +728,7 @@ TEST_F(TestNode, testInfoRePublish)

TEST_F(TestNode, testMaskRePublish)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::SPEED_FILTER_ABSOLUTE, 1.23, 4.5);
EXPECT_TRUE(createSpeedFilter("map"));
Expand All @@ -747,7 +747,7 @@ TEST_F(TestNode, testMaskRePublish)

TEST_F(TestNode, testIncorrectFilterType)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(INCORRECT_TYPE, 1.23, 4.5);
EXPECT_FALSE(createSpeedFilter("map"));
Expand All @@ -759,7 +759,7 @@ TEST_F(TestNode, testIncorrectFilterType)

TEST_F(TestNode, testDifferentFrame)
{
// Initilize test system
// Initialize test system
createMaps("map");
publishMaps(nav2_costmap_2d::SPEED_FILTER_PERCENT, 0.0, 1.0);
EXPECT_TRUE(createSpeedFilter("odom"));
Expand Down
2 changes: 1 addition & 1 deletion nav2_mppi_controller/test/utils_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ TEST(UtilsTests, SmootherTest)
noisey_sequence.vy = 0.0 * xt::ones<float>({30});
noisey_sequence.wz = 0.3 * xt::ones<float>({30});

// Make the sequence noisey
// Make the sequence noisy
auto noises = xt::random::randn<float>({30}, 0.0, 0.2);
noisey_sequence.vx += noises;
noisey_sequence.vy += noises;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static Counts& counts() {
# error Unsupported bitness
#endif

// endianess
// endianness
#ifdef _MSC_VER
# define ROBIN_HOOD_PRIVATE_DEFINITION_LITTLE_ENDIAN() 1
# define ROBIN_HOOD_PRIVATE_DEFINITION_BIG_ENDIAN() 0
Expand Down Expand Up @@ -2132,7 +2132,7 @@ class Table
return maxElements * MaxLoadFactor100 / 100;
}

// we might be a bit inprecise, but since maxElements is quite large that doesn't matter
// we might be a bit imprecise, but since maxElements is quite large that doesn't matter
return (maxElements / 100) * MaxLoadFactor100;
}

Expand Down
4 changes: 2 additions & 2 deletions nav2_system_tests/src/behaviors/spin/spin_behavior_tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ bool SpinBehaviorTester::defaultSpinBehaviorTest(
auto goal_msg = Spin::Goal();
goal_msg.target_yaw = target_yaw;

// Intialize fake costmap
// Initialize fake costmap
if (make_fake_costmap_) {
sendFakeCostmap(target_yaw);
sendFakeOdom(0.0);
Expand All @@ -160,7 +160,7 @@ bool SpinBehaviorTester::defaultSpinBehaviorTest(
fabs(tf2::getYaw(initial_pose.pose.orientation)));
RCLCPP_INFO(node_->get_logger(), "Before sending goal");

// Intialize fake costmap
// Initialize fake costmap
if (make_fake_costmap_) {
sendFakeCostmap(target_yaw);
sendFakeOdom(0.0);
Expand Down
6 changes: 3 additions & 3 deletions nav2_voxel_grid/include/nav2_voxel_grid/voxel_grid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class VoxelGrid

unsigned int marked_bits = *col >> 16;

// make sure the number of bits in each is below our thesholds
// make sure the number of bits in each is below our thresholds
return !bitsBelowThreshold(marked_bits, marked_threshold);
}

Expand Down Expand Up @@ -146,7 +146,7 @@ class VoxelGrid
unsigned int unknown_bits = uint16_t(*col >> 16) ^ uint16_t(*col);
unsigned int marked_bits = *col >> 16;

// make sure the number of bits in each is below our thesholds
// make sure the number of bits in each is below our thresholds
if (bitsBelowThreshold(unknown_bits, 1) && bitsBelowThreshold(marked_bits, 1)) {
costmap[index] = 0;
}
Expand Down Expand Up @@ -392,7 +392,7 @@ class VoxelGrid
unsigned int unknown_bits = uint16_t(*col >> 16) ^ uint16_t(*col);
unsigned int marked_bits = *col >> 16;

// make sure the number of bits in each is below our thesholds
// make sure the number of bits in each is below our thresholds
if (bitsBelowThreshold(marked_bits, marked_clear_threshold_)) {
if (bitsBelowThreshold(unknown_bits, unknown_clear_threshold_)) {
costmap_[offset] = free_cost_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class PhotoAtWaypoint : public nav2_core::WaypointTaskExecutor
sensor_msgs::msg::Image::SharedPtr curr_frame_msg_;
// global logger
rclcpp::Logger logger_{rclcpp::get_logger("nav2_waypoint_follower")};
// ros susbcriber to get camera image
// ros subscriber to get camera image
rclcpp::Subscription<sensor_msgs::msg::Image>::SharedPtr camera_image_subscriber_;
};
} // namespace nav2_waypoint_follower
Expand Down