/** * \brief Global initialization common to all runmodes. * * This can be used by fuzz targets. */
时间: 2023-10-21 09:35:52 浏览: 166
这是一个函数或者方法的文档注释,描述了它的作用和功能。具体来说,这个函数是用来进行全局初始化的,可以用于所有运行模式。同时,它还可以被模糊测试(fuzz targets)使用。模糊测试是指在输入数据中添加随机变化,以测试程序的鲁棒性和安全性的一种测试方法。因此,这个函数可能会在某些情况下被模糊测试所使用。
相关问题
给下列程序添加英文注释:namespace nav_core { /** * @class BaseGlobalPlanner * @brief Provides an interface for global planners used in navigation. All global planners written as plugins for the navigation stack must adhere to this interface. / class BaseGlobalPlanner{ public: /* * @brief Given a goal pose in the world, compute a plan * @param start The start pose * @param goal The goal pose * @param plan The plan... filled by the planner * @return True if a valid plan was found, false otherwise / virtual bool makePlan(const geometry_msgs::PoseStamped& start, const geometry_msgs::PoseStamped& goal, std::vector<geometry_msgs::PoseStamped>& plan) = 0; /* * @brief Given a goal pose in the world, compute a plan * @param start The start pose * @param goal The goal pose * @param plan The plan... filled by the planner * @param cost The plans calculated cost * @return True if a valid plan was found, false otherwise / virtual bool makePlan(const geometry_msgs::PoseStamped& start, const geometry_msgs::PoseStamped& goal, std::vector<geometry_msgs::PoseStamped>& plan, double& cost) { cost = 0; return makePlan(start, goal, plan); } /* * @brief Initialization function for the BaseGlobalPlanner * @param name The name of this planner * @param costmap_ros A pointer to the ROS wrapper of the costmap to use for planning / virtual void initialize(std::string name, costmap_2d::Costmap2DROS costmap_ros) = 0; /** * @brief Virtual destructor for the interface */ virtual ~BaseGlobalPlanner(){} protected: BaseGlobalPlanner(){} }; }; // namespace nav_core #endif // NAV_CORE_BASE_GLOBAL_PLANNER_H
/**
* @file base_global_planner.h
* @brief Provides an interface for global planners used in navigation.
* All global planners written as plugins for the navigation stack must adhere to this interface.
*/
namespace nav_core {
/**
* @class BaseGlobalPlanner
* @brief Provides an interface for global planners used in navigation.
* All global planners written as plugins for the navigation stack must adhere to this interface.
*/
class BaseGlobalPlanner{
public:
/**
* @brief Given a goal pose in the world, compute a plan
* @param start The start pose
* @param goal The goal pose
* @param plan The plan... filled by the planner
* @return True if a valid plan was found, false otherwise
*/
virtual bool makePlan(const geometry_msgs::PoseStamped& start, const geometry_msgs::PoseStamped& goal, std::vector<geometry_msgs::PoseStamped>& plan) = 0;
/**
* @brief Given a goal pose in the world, compute a plan
* @param start The start pose
* @param goal The goal pose
* @param plan The plan... filled by the planner
* @param cost The plans calculated cost
* @return True if a valid plan was found, false otherwise
*/
virtual bool makePlan(const geometry_msgs::PoseStamped& start, const geometry_msgs::PoseStamped& goal, std::vector<geometry_msgs::PoseStamped>& plan, double& cost) {
cost = 0;
return makePlan(start, goal, plan);
}
/**
* @brief Initialization function for the BaseGlobalPlanner
* @param name The name of this planner
* @param costmap_ros A pointer to the ROS wrapper of the costmap to use for planning
*/
virtual void initialize(std::string name, costmap_2d::Costmap2DROS costmap_ros) = 0;
/**
* @brief Virtual destructor for the interface
*/
virtual ~BaseGlobalPlanner(){}
protected:
BaseGlobalPlanner(){}
};
}; // namespace nav_core
#endif // NAV_CORE_BASE_GLOBAL_PLANNER_H
阅读全文