Skip to content

Commit

Permalink
Linter fixes (ros-navigation#2861)
Browse files Browse the repository at this point in the history
* satisfying uncrustify

* cpplint fixes
  • Loading branch information
padhupradheep authored Mar 22, 2022
1 parent 1c161c4 commit 8a007c8
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
*
*/

#ifndef DIFFERENTIAL_MOTION_MODEL_HPP
#define DIFFERENTIAL_MOTION_MODEL_HPP
#ifndef NAV2_AMCL__MOTION_MODEL__DIFFERENTIAL_MOTION_MODEL_HPP_
#define NAV2_AMCL__MOTION_MODEL__DIFFERENTIAL_MOTION_MODEL_HPP_

#include <sys/types.h>
#include <math.h>
Expand Down
2 changes: 1 addition & 1 deletion nav2_behavior_tree/src/behavior_tree_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ BehaviorTreeEngine::haltAllActions(BT::TreeNode * root_node)
if (!root_node) {
return;
}

// this halt signal should propagate through the entire tree.
root_node->halt();

Expand Down
2 changes: 1 addition & 1 deletion nav2_bt_navigator/include/nav2_bt_navigator/navigator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class Navigator
*/
virtual bool configure(
rclcpp_lifecycle::LifecycleNode::WeakPtr /*node*/,
std::shared_ptr<nav2_util::OdomSmoother> /*odom_smoother*/)
std::shared_ptr<nav2_util::OdomSmoother>/*odom_smoother*/)
{
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ NavigateThroughPosesNavigator::getDefaultBTFilepath(
pkg_share_dir +
"/behavior_trees/navigate_through_poses_w_replanning_and_recovery.xml");
}

node->get_parameter("default_nav_through_poses_bt_xml", default_bt_xml_filename);

return default_bt_xml_filename;
Expand Down
4 changes: 2 additions & 2 deletions nav2_bt_navigator/src/navigators/navigate_to_pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ NavigateToPoseNavigator::getDefaultBTFilepath(
{
std::string default_bt_xml_filename;
auto node = parent_node.lock();

if (!node->has_parameter("default_nav_to_pose_bt_xml")) {
std::string pkg_share_dir =
ament_index_cpp::get_package_share_directory("nav2_bt_navigator");
Expand All @@ -69,7 +69,7 @@ NavigateToPoseNavigator::getDefaultBTFilepath(
pkg_share_dir +
"/behavior_trees/navigate_to_pose_w_replanning_and_recovery.xml");
}

node->get_parameter("default_nav_to_pose_bt_xml", default_bt_xml_filename);

return default_bt_xml_filename;
Expand Down
2 changes: 1 addition & 1 deletion nav2_costmap_2d/plugins/static_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ StaticLayer::incomingUpdate(map_msgs::msg::OccupancyGridUpdate::ConstSharedPtr u
costmap_[index] = interpretValue(update->data[di++]);
}
}

has_updated_data_ = true;
}

Expand Down
4 changes: 2 additions & 2 deletions nav2_dwb_controller/dwb_core/src/trajectory_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@

#include <cmath>

#include <rclcpp/duration.hpp>
#include "rclcpp/duration.hpp"

#include <dwb_core/exceptions.hpp>
#include "dwb_core/exceptions.hpp"

namespace dwb_core
{
Expand Down
10 changes: 5 additions & 5 deletions nav2_dwb_controller/nav_2d_utils/src/conversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
#include <vector>
#include <string>

#include <geometry_msgs/msg/pose.hpp>
#include <geometry_msgs/msg/pose2_d.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist.hpp>
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#include "geometry_msgs/msg/pose.hpp"
#include "geometry_msgs/msg/pose2_d.hpp"
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "geometry_msgs/msg/twist.hpp"
#include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#include "tf2/utils.h"
Expand Down
2 changes: 1 addition & 1 deletion nav2_map_server/test/component/test_map_saver_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <memory>
#include <experimental/filesystem> // NOLINT

#include <rclcpp/rclcpp.hpp>
#include "rclcpp/rclcpp.hpp"

#include "test_constants/test_constants.h"
#include "nav2_map_server/map_saver.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <limits>
#include <string>

#include <nlohmann/json.hpp>
#include "nlohmann/json.hpp"
#include "ompl/base/StateSpace.h"
#include "angles/angles.h"

Expand Down
4 changes: 2 additions & 2 deletions nav2_smac_planner/src/smac_planner_lattice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ void SmacPlannerLattice::configure(
// Default to a well rounded model: 16 bin, 0.4m turning radius, ackermann model
nav2_util::declare_parameter_if_not_declared(
node, name + ".lattice_filepath", rclcpp::ParameterValue(
ament_index_cpp::get_package_share_directory("nav2_smac_planner") +
"/sample_primitives/5cm_resolution/0.5m_turning_radius/ackermann/output.json"));
ament_index_cpp::get_package_share_directory("nav2_smac_planner") +
"/sample_primitives/5cm_resolution/0.5m_turning_radius/ackermann/output.json"));
node->get_parameter(name + ".lattice_filepath", _search_info.lattice_filepath);
nav2_util::declare_parameter_if_not_declared(
node, name + ".cache_obstacle_heuristic", rclcpp::ParameterValue(false));
Expand Down
2 changes: 1 addition & 1 deletion nav2_voxel_grid/test/voxel_grid_bresenham_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ TEST(voxel_grid, bresenham3DSamePoint)
const double y0 = 3.8;
const double z0 = 0.4;

unsigned int offset = int(y0) * sz_x + int(x0);
unsigned int offset = static_cast<int>(y0) * sz_x + static_cast<int>(x0);
unsigned int val_before = tv(offset);
// Same point to check
vg.raytraceLine(tv, x0, y0, z0, x0, y0, z0, max_length, min_length);
Expand Down
2 changes: 1 addition & 1 deletion nav2_waypoint_follower/plugins/input_at_waypoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <string>
#include <exception>

#include <pluginlib/class_list_macros.hpp>
#include "pluginlib/class_list_macros.hpp"

#include "nav2_util/node_utils.hpp"

Expand Down
2 changes: 1 addition & 1 deletion nav2_waypoint_follower/plugins/photo_at_waypoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <string>
#include <memory>

#include <pluginlib/class_list_macros.hpp>
#include "pluginlib/class_list_macros.hpp"

#include "nav2_util/node_utils.hpp"

Expand Down
2 changes: 1 addition & 1 deletion nav2_waypoint_follower/plugins/wait_at_waypoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <string>
#include <exception>

#include <pluginlib/class_list_macros.hpp>
#include "pluginlib/class_list_macros.hpp"

#include "nav2_util/node_utils.hpp"

Expand Down

0 comments on commit 8a007c8

Please sign in to comment.