1.amcl

2.base_local_planner

3.carrot_planner

3.1头文件

#include <ros/ros.h>
#include <costmap_2d/costmap_2d_ros.h>
#include <costmap_2d/costmap_2d.h>
#include <nav_core/base_global_planner.h>#include <geometry_msgs/PoseStamped.h>
#include <angles/angles.h>#include <base_local_planner/world_model.h>
#include <base_local_planner/costmap_model.h>

ros/ros.h
costmap_2d/costmap_2d_ros.h:
costmap_2d::Costmap2DROS maintains much of the ROS related functionality. It contains a costmap_2d::LayeredCostmap which is used to keep track of each of the layers. Each layer is instantiated in the Costmap2DROS using pluginlib and is added to the LayeredCostmap. The layers themselves may be compiled individually, allowing arbitrary changes to the costmap to be made through the C++ interface.

costmap_2d/costmap_2d.h
The costmap_2d/costmap_2d.hcostmap_2d::Costmap2D class implements the basic data structure for storing and accessing the two dimensional costmap.

geometry_msgs/PoseStamped.h
A Pose with reference coordinate frame and timestamp

base_local_planner/world_model.h
Check a footprint at a given position and orientation for legality in the world

base_local_planner/costmap_model.h
A class that implements the WorldModel interface to provide grid based collision checks for the trajectory controller using the costmap.

3.2test_planner.h

namespace test_planner{//命名空间 为test_planner/*** @class testPlanner* @brief Provides a simple global planner that will compute a valid goal point for the local planner by walking back along the vector between the robot and the user-specified goal point until a valid cost is found.*/class testPlanner : public nav_core::BaseGlobalPlanner {//定义一个全局规划器testPlanner,基类为nav_core::BaseGlobalPlanner public:/*** @brief  Constructor for the testPlanner*/testPlanner();/*** @brief  Constructor for the testPlanner* @param  name The name of this planner* @param  costmap_ros A pointer to the ROS wrapper of the costmap to use for planning*/testPlanner(std::string name, costmap_2d::Costmap2DROS* costmap_ros);/*** @brief  Initialization function for the testPlanner* @param  name The name of this planner* @param  costmap_ros A pointer to the ROS wrapper of the costmap to use for planning*/void initialize(std::string name, costmap_2d::Costmap2DROS* costmap_ros);/*** @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*/bool makePlan(const geometry_msgs::PoseStamped& start, const geometry_msgs::PoseStamped& goal, std::vector<geometry_msgs::PoseStamped>& plan);private:costmap_2d::Costmap2DROS* costmap_ros_;double step_size_, min_dist_from_robot_;costmap_2d::Costmap2D* costmap_;base_local_planner::WorldModel* world_model_; ///< @brief The world model that the controller will usevoid publishGlobalPlan(std::vector<geometry_msgs::PoseStamped>& path);// for visualisation, publishers of global and local planros::Publisher g_plan_pub_;/*** @brief  Checks the legality of the robot footprint at a position and orientation using the world model* @param x_i The x position of the robot * @param y_i The y position of the robot * @param theta_i The orientation of the robot* @return */double footprintCost(double x_i, double y_i, double theta_i);bool initialized_;};
};

4.clear_costmap_recovery

5.costmap_2d

6.dwa_local_planner

6.1 dwa_planner.cpp

头文件

#include <dwa_local_planner/dwa_planner.h> //dwa.h
#include <base_local_planner/goal_functions.h>//与目标有关
#include <cmath>//数学函数//for computing path distance
#include <queue>//队列#include <angles/angles.h>#include <ros/ros.h>
#include <tf2/utils.h>//坐标变换
#include <sensor_msgs/PointCloud2.h>//点云
#include <sensor_msgs/point_cloud2_iterator.h>

代码

/*********************************************************************
*
* Software License Agreement (BSD License)
*
*  Copyright (c) 2009, Willow Garage, Inc.
*  All rights reserved.
*
*  Redistribution and use in source and binary forms, with or without
*  modification, are permitted provided that the following conditions
*  are met:
*
*   * Redistributions of source code must retain the above copyright
*     notice, this list of conditions and the following disclaimer.
*   * Redistributions in binary form must reproduce the above
*     copyright notice, this list of conditions and the following
*     disclaimer in the documentation and/or other materials provided
*     with the distribution.
*   * Neither the name of Willow Garage, Inc. nor the names of its
*     contributors may be used to endorse or promote products derived
*     from this software without specific prior written permission.
*
*  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
*  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
*  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
*  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
*  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
*  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
*  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
*  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
*  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
*  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
*  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
*  POSSIBILITY OF SUCH DAMAGE.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#include <dwa_local_planner/dwa_planner.h>
#include <base_local_planner/goal_functions.h>
#include <cmath>//for computing path distance
#include <queue>#include <angles/angles.h>#include <ros/ros.h>
#include <tf2/utils.h>
#include <sensor_msgs/PointCloud2.h>
#include <sensor_msgs/point_cloud2_iterator.h>namespace dwa_local_planner {void DWAPlanner::reconfigure(DWAPlannerConfig &config){boost::mutex::scoped_lock l(configuration_mutex_);//锁存generator_.setParameters(config.sim_time,config.sim_granularity,config.angular_sim_granularity,config.use_dwa,sim_period_);double resolution = planner_util_->getCostmap()->getResolution();path_distance_bias_ = resolution * config.path_distance_bias;// pdistscale used for both path and alignment, set  forward_point_distance to zero to discard alignmentpath_costs_.setScale(path_distance_bias_);alignment_costs_.setScale(path_distance_bias_);goal_distance_bias_ = resolution * config.goal_distance_bias;goal_costs_.setScale(goal_distance_bias_);goal_front_costs_.setScale(goal_distance_bias_);occdist_scale_ = config.occdist_scale;obstacle_costs_.setScale(occdist_scale_);stop_time_buffer_ = config.stop_time_buffer;oscillation_costs_.setOscillationResetDist(config.oscillation_reset_dist, config.oscillation_reset_angle);forward_point_distance_ = config.forward_point_distance;goal_front_costs_.setXShift(forward_point_distance_);alignment_costs_.setXShift(forward_point_distance_);// obstacle costs can vary due to scaling footprint featureobstacle_costs_.setParams(config.max_vel_trans, config.max_scaling_factor, config.scaling_speed);twirling_costs_.setScale(config.twirling_scale);int vx_samp, vy_samp, vth_samp;vx_samp = config.vx_samples;vy_samp = config.vy_samples;vth_samp = config.vth_samples;if (vx_samp <= 0) {ROS_WARN("You've specified that you don't want any samples in the x dimension. We'll at least assume that you want to sample one value... so we're going to set vx_samples to 1 instead");vx_samp = 1;config.vx_samples = vx_samp;}if (vy_samp <= 0) {ROS_WARN("You've specified that you don't want any samples in the y dimension. We'll at least assume that you want to sample one value... so we're going to set vy_samples to 1 instead");vy_samp = 1;config.vy_samples = vy_samp;}if (vth_samp <= 0) {ROS_WARN("You've specified that you don't want any samples in the th dimension. We'll at least assume that you want to sample one value... so we're going to set vth_samples to 1 instead");vth_samp = 1;config.vth_samples = vth_samp;}vsamples_[0] = vx_samp;vsamples_[1] = vy_samp;vsamples_[2] = vth_samp;}DWAPlanner::DWAPlanner(std::string name, base_local_planner::LocalPlannerUtil *planner_util) :planner_util_(planner_util),obstacle_costs_(planner_util->getCostmap()),path_costs_(planner_util->getCostmap()),goal_costs_(planner_util->getCostmap(), 0.0, 0.0, true),goal_front_costs_(planner_util->getCostmap(), 0.0, 0.0, true),alignment_costs_(planner_util->getCostmap()){ros::NodeHandle private_nh("~/" + name);goal_front_costs_.setStopOnFailure( false );alignment_costs_.setStopOnFailure( false );//Assuming this planner is being run within the navigation stack, we can//just do an upward search for the frequency at which its being run. This//also allows the frequency to be overwritten locally.std::string controller_frequency_param_name;if(!private_nh.searchParam("controller_frequency", controller_frequency_param_name)) {sim_period_ = 0.05;} else {double controller_frequency = 0;private_nh.param(controller_frequency_param_name, controller_frequency, 20.0);if(controller_frequency > 0) {sim_period_ = 1.0 / controller_frequency;} else {ROS_WARN("A controller_frequency less than 0 has been set. Ignoring the parameter, assuming a rate of 20Hz");sim_period_ = 0.05;}}ROS_INFO("Sim period is set to %.2f", sim_period_);oscillation_costs_.resetOscillationFlags();bool sum_scores;private_nh.param("sum_scores", sum_scores, false);obstacle_costs_.setSumScores(sum_scores);private_nh.param("publish_cost_grid_pc", publish_cost_grid_pc_, false);map_viz_.initialize(name, planner_util->getGlobalFrame(), boost::bind(&DWAPlanner::getCellCosts, this, _1, _2, _3, _4, _5, _6));private_nh.param("global_frame_id", frame_id_, std::string("odom"));traj_cloud_pub_ = private_nh.advertise<sensor_msgs::PointCloud2>("trajectory_cloud", 1);private_nh.param("publish_traj_pc", publish_traj_pc_, false);// set up all the cost functions that will be applied in order// (any function returning negative values will abort scoring, so the order can improve performance)std::vector<base_local_planner::TrajectoryCostFunction*> critics;critics.push_back(&oscillation_costs_); // discards oscillating motions (assisgns cost -1)critics.push_back(&obstacle_costs_); // discards trajectories that move into obstaclescritics.push_back(&goal_front_costs_); // prefers trajectories that make the nose go towards (local) nose goalcritics.push_back(&alignment_costs_); // prefers trajectories that keep the robot nose on nose pathcritics.push_back(&path_costs_); // prefers trajectories on global pathcritics.push_back(&goal_costs_); // prefers trajectories that go towards (local) goal, based on wave propagationcritics.push_back(&twirling_costs_); // optionally prefer trajectories that don't spin// trajectory generatorsstd::vector<base_local_planner::TrajectorySampleGenerator*> generator_list;generator_list.push_back(&generator_);scored_sampling_planner_ = base_local_planner::SimpleScoredSamplingPlanner(generator_list, critics);private_nh.param("cheat_factor", cheat_factor_, 1.0);}// used for visualization only, total_costs are not really total costsbool DWAPlanner::getCellCosts(int cx, int cy, float &path_cost, float &goal_cost, float &occ_cost, float &total_cost) {path_cost = path_costs_.getCellCosts(cx, cy);goal_cost = goal_costs_.getCellCosts(cx, cy);occ_cost = planner_util_->getCostmap()->getCost(cx, cy);if (path_cost == path_costs_.obstacleCosts() ||path_cost == path_costs_.unreachableCellCosts() ||occ_cost >= costmap_2d::INSCRIBED_INFLATED_OBSTACLE) {return false;}total_cost =path_distance_bias_ * path_cost +goal_distance_bias_ * goal_cost +occdist_scale_ * occ_cost;return true;}bool DWAPlanner::setPlan(const std::vector<geometry_msgs::PoseStamped>& orig_global_plan) {oscillation_costs_.resetOscillationFlags();return planner_util_->setPlan(orig_global_plan);}/*** This function is used when other strategies are to be applied,* but the cost functions for obstacles are to be reused.*/bool DWAPlanner::checkTrajectory(Eigen::Vector3f pos,Eigen::Vector3f vel,Eigen::Vector3f vel_samples){oscillation_costs_.resetOscillationFlags();base_local_planner::Trajectory traj;geometry_msgs::PoseStamped goal_pose = global_plan_.back();Eigen::Vector3f goal(goal_pose.pose.position.x, goal_pose.pose.position.y, tf2::getYaw(goal_pose.pose.orientation));base_local_planner::LocalPlannerLimits limits = planner_util_->getCurrentLimits();generator_.initialise(pos,vel,goal,&limits,vsamples_);generator_.generateTrajectory(pos, vel, vel_samples, traj);double cost = scored_sampling_planner_.scoreTrajectory(traj, -1);//if the trajectory is a legal one... the check passesif(cost >= 0) {return true;}ROS_WARN("Invalid Trajectory %f, %f, %f, cost: %f", vel_samples[0], vel_samples[1], vel_samples[2], cost);//otherwise the check failsreturn false;}void DWAPlanner::updatePlanAndLocalCosts(const geometry_msgs::PoseStamped& global_pose,const std::vector<geometry_msgs::PoseStamped>& new_plan,const std::vector<geometry_msgs::Point>& footprint_spec) {global_plan_.resize(new_plan.size());for (unsigned int i = 0; i < new_plan.size(); ++i) {global_plan_[i] = new_plan[i];}obstacle_costs_.setFootprint(footprint_spec);// costs for going away from pathpath_costs_.setTargetPoses(global_plan_);// costs for not going towards the local goal as much as possiblegoal_costs_.setTargetPoses(global_plan_);// alignment costsgeometry_msgs::PoseStamped goal_pose = global_plan_.back();Eigen::Vector3f pos(global_pose.pose.position.x, global_pose.pose.position.y, tf2::getYaw(global_pose.pose.orientation));double sq_dist =(pos[0] - goal_pose.pose.position.x) * (pos[0] - goal_pose.pose.position.x) +(pos[1] - goal_pose.pose.position.y) * (pos[1] - goal_pose.pose.position.y);// we want the robot nose to be drawn to its final position// (before robot turns towards goal orientation), not the end of the// path for the robot center. Choosing the final position after// turning towards goal orientation causes instability when the// robot needs to make a 180 degree turn at the endstd::vector<geometry_msgs::PoseStamped> front_global_plan = global_plan_;double angle_to_goal = atan2(goal_pose.pose.position.y - pos[1], goal_pose.pose.position.x - pos[0]);front_global_plan.back().pose.position.x = front_global_plan.back().pose.position.x +forward_point_distance_ * cos(angle_to_goal);front_global_plan.back().pose.position.y = front_global_plan.back().pose.position.y + forward_point_distance_ *sin(angle_to_goal);goal_front_costs_.setTargetPoses(front_global_plan);// keeping the nose on the pathif (sq_dist > forward_point_distance_ * forward_point_distance_ * cheat_factor_) {alignment_costs_.setScale(path_distance_bias_);// costs for robot being aligned with path (nose on path, not jualignment_costs_.setTargetPoses(global_plan_);} else {// once we are close to goal, trying to keep the nose close to anything destabilizes behavior.alignment_costs_.setScale(0.0);}}/** given the current state of the robot, find a good trajectory*/base_local_planner::Trajectory DWAPlanner::findBestPath(const geometry_msgs::PoseStamped& global_pose,const geometry_msgs::PoseStamped& global_vel,geometry_msgs::PoseStamped& drive_velocities) {//make sure that our configuration doesn't change mid-runboost::mutex::scoped_lock l(configuration_mutex_);Eigen::Vector3f pos(global_pose.pose.position.x, global_pose.pose.position.y, tf2::getYaw(global_pose.pose.orientation));Eigen::Vector3f vel(global_vel.pose.position.x, global_vel.pose.position.y, tf2::getYaw(global_vel.pose.orientation));geometry_msgs::PoseStamped goal_pose = global_plan_.back();Eigen::Vector3f goal(goal_pose.pose.position.x, goal_pose.pose.position.y, tf2::getYaw(goal_pose.pose.orientation));base_local_planner::LocalPlannerLimits limits = planner_util_->getCurrentLimits();// prepare cost functions and generators for this rungenerator_.initialise(pos,vel,goal,&limits,vsamples_);result_traj_.cost_ = -7;// find best trajectory by sampling and scoring the samplesstd::vector<base_local_planner::Trajectory> all_explored;scored_sampling_planner_.findBestTrajectory(result_traj_, &all_explored);if(publish_traj_pc_){sensor_msgs::PointCloud2 traj_cloud;traj_cloud.header.frame_id = frame_id_;traj_cloud.header.stamp = ros::Time::now();sensor_msgs::PointCloud2Modifier cloud_mod(traj_cloud);cloud_mod.setPointCloud2Fields(5, "x", 1, sensor_msgs::PointField::FLOAT32,"y", 1, sensor_msgs::PointField::FLOAT32,"z", 1, sensor_msgs::PointField::FLOAT32,"theta", 1, sensor_msgs::PointField::FLOAT32,"cost", 1, sensor_msgs::PointField::FLOAT32);unsigned int num_points = 0;for(std::vector<base_local_planner::Trajectory>::iterator t=all_explored.begin(); t != all_explored.end(); ++t){if (t->cost_<0)continue;num_points += t->getPointsSize();}cloud_mod.resize(num_points);sensor_msgs::PointCloud2Iterator<float> iter_x(traj_cloud, "x");for(std::vector<base_local_planner::Trajectory>::iterator t=all_explored.begin(); t != all_explored.end(); ++t){if(t->cost_<0)continue;// Fill out the planfor(unsigned int i = 0; i < t->getPointsSize(); ++i) {double p_x, p_y, p_th;t->getPoint(i, p_x, p_y, p_th);iter_x[0] = p_x;iter_x[1] = p_y;iter_x[2] = 0.0;iter_x[3] = p_th;iter_x[4] = t->cost_;++iter_x;}}traj_cloud_pub_.publish(traj_cloud);}// verbose publishing of point cloudsif (publish_cost_grid_pc_) {//we'll publish the visualization of the costs to rviz before returning our best trajectorymap_viz_.publishCostCloud(planner_util_->getCostmap());}// debrief stateful scoring functionsoscillation_costs_.updateOscillationFlags(pos, &result_traj_, planner_util_->getCurrentLimits().min_vel_trans);//if we don't have a legal trajectory, we'll just command zeroif (result_traj_.cost_ < 0) {drive_velocities.pose.position.x = 0;drive_velocities.pose.position.y = 0;drive_velocities.pose.position.z = 0;drive_velocities.pose.orientation.w = 1;drive_velocities.pose.orientation.x = 0;drive_velocities.pose.orientation.y = 0;drive_velocities.pose.orientation.z = 0;} else {drive_velocities.pose.position.x = result_traj_.xv_;drive_velocities.pose.position.y = result_traj_.yv_;drive_velocities.pose.position.z = 0;tf2::Quaternion q;q.setRPY(0, 0, result_traj_.thetav_);tf2::convert(q, drive_velocities.pose.orientation);}return result_traj_;}
};

7.fake_localization

8.global_planner

9.map_server

ROSWiKi Official Handbook

9. 1basic knowledge

1)map.yaml
CSDN Reference

image: /home/rock/map.pgm
resolution: 0.050000
origin: [-8.000000, -9.500000, 0.000000]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196

Required fields:

  • image : Path to the image file containing the occupancy data; can be absolute, or relative to the location of the YAML file
  • resolution : Resolution of the map, meters / pixel
  • origin : The 2-D pose of the lower-left pixel in the map, as (x, y, yaw), with yaw as counterclockwise rotation (yaw=0 means no rotation). Many parts of the system currently ignore yaw.
  • occupied_thresh : Pixels with occupancy probability greater than this threshold are considered completely occupied.
  • free_thresh : Pixels with occupancy probability less than this threshold are considered completely free.
  • negate : Whether the white/black free/occupied semantics should be reversed (interpretation of thresholds is unaffected)

Optional parameter:

  • mode : Can have one of three values: trinary, scale, or raw. Trinary is the default. More information on how this changes the value interpretation is in the next section.

9.2include

9.3scripts

9.4src

image_loader.cpp

Map mode definition

**Map mode*  Default: TRINARY -*      value >= occ_th - Occupied (100)*      value <= free_th - Free (0)*      otherwise - Unknown*  SCALE -*      alpha < 1.0 - Unknown*      value >= occ_th - Occupied (100)*      value <= free_th - Free (0)*      otherwise - f( (free_th, occ_th) ) = (0, 100)*          (linearly map in between values to (0,100)*  RAW -*      value = value

The meaning of each parameter

 * @param resp The map wil be written into here* @param fname The image file to read from* @param res The resolution of the map (gets stored in resp)* @param negate If true, then whiter pixels are occupied, and blacker pixels are free* @param occ_th Threshold above which pixels are occupied* @param free_th Threshold below which pixels are free* @param origin Triple specifying 2-D pose of lower-left corner of image* @param mode Map mode* @throws std::runtime_error If the image file can't be loaded

main.cpp

Fuctions:

1
try{}
catch(){}
code in cpp filetry {doc["resolution"] >> res;} catch (YAML::InvalidScalar &) {ROS_ERROR("The map does not contain a resolution tag or it is invalid.");exit(-1);}
1
try---catch------finally
1)将预见可能引发异常的代码包含在try语句块中。
2)如果发生了异常,则转入catch的执行。catch有几种写法:
catch
这将捕获任何发生的异常。
catch(Exception e)
这将捕获任何发生的异常。另外,还提供e参数,你可以在处理异常时使用e参数来获得有关异常的信息。
catch(Exception的派生类 e)
这将捕获派生类定义的异常,例如,我想捕获一个无效操作的异常,可以如下写:
catch(InvalidOperationException e)
{
....
}
这样,如果try语句块中抛出的异常是InvalidOperationException,将转入该处执行,其他异常不处理
finally可以没有,也可以只有一个。无论有没有发生异常,它总会在这个异常处理结构的最后运行。即使你在try块内用return返回了,在返
回前,finally总是要执行,这以便让你有机会能够在异常处理最后做一些清理工作。如关闭数据库连接等等。
注意:如果没有catch语句块,那么finally块就是必须的。如果你不希望在这里处理异常,而当异常发生时提交到上层处理,但在这个地方
无论发生异常,都要必须要执行一些操作,就可以使用try finally.
2try {doc["image"] >> mapfname;// TODO: make this path-handling more robustif(mapfname.size() == 0){ROS_ERROR("The image tag cannot be an empty string.");exit(-1);}
2
//TODO:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
代表代码有待实现的功能,这段代码有待使得路径处理更加robust.TODO: + 说明:
如果代码中有该标识,说明在标识处有功能代码待编写,待实现的功能在说明中会简略说明。FIXME: + 说明:
如果代码中有该标识,说明标识处代码需要修正,甚至代码是错误的,不能工作,需要修复,如何修正会在说明中简略说明。XXX: + 说明:
如果代码中有该标识,说明标识处代码虽然实现了功能,但是实现的方法有待商榷,希望将来能改进,要改进的地方会在说明中简略说明。
3ros::init(argc, argv, "map_server", ros::init_options::AnonymousName);

CSDN Reference

3
ROS匿名节点,ROS节点应具有唯一的名称。 如果您在终端中运行一个节点,然后尝试在另一个终端上运行具有相同名称的另一个节点,则第一
个节点将被杀死,因此第二个节点可以启动。 总而言之,您将只能同时运行一个具有相同名称的节点。匿名节点可让您摆脱此规则。 创建匿名
节点时,将在节点名称中添加一个随机的唯一ID。 因此,现在您可以运行任意数量的节点。
4double res = (argc == 2) ? 0.0 : atof(argv[2]);

RONOOB Reference

4 三元运算符,Exp1 ? Exp2 : Exp3;
其中,Exp1、Exp2 和 Exp3 是表达式。请注意冒号的使用和位置。? : 表达式的值取决于 Exp1 的计算结果。如果 Exp1 为真,则计算
Exp2 的值,且 Exp2 的计算结果则为整个 ? : 表达式的值。如果 Exp1 为假,则计算 Exp3 的值,且 Exp3 的计算结果则为
整个 ? : 表达式的值。

map_saver.cpp

Fuctions:

1
int ret = strcmp(str1,str2);
code in .cpp file:if(!strcmp(argv[i], "-h")){puts(USAGE);return 0;}
1
strcmp函数接受接受两个字符串类型的参数传入,根据比较结果返回一个int类型的值。
若返回结果的值小于 0,则表示在ASCII码上, str1字符串 小于 str2字符串。
返回结果返回值 大于0,则代表 str2字符串 小于 str1字符串。
只有当返回值 为0时,两个字符串才是相同的。

map_server.dox

9.5test

CHANHELOG.rst

CMakeLists.txt

package.xml

10.move_base

11.move_slow_and_clear

12.nav_core

base_local_planner

computeVelocityCommands

Given the current position ,orientation, and velocity of the robot,compute velocity commands to send to the base.

isGoalReached

Check if the goal pose has been achieved by the local planner

setPlan

Set the plan that the local planner is following

Initialize

Constructs the local planner

13.navfn

14navigation

15.rotate_recovery

16.voxel_grid

CMakeLists.txt

README.md

The Learnning of ROS Navigation Source Code---09-17相关推荐

  1. Google Chrome Source Code 源码下载

    2019独角兽企业重金招聘Python工程师标准>>> Goolgle 于 2008.09.02 发布了浏览器 Google Chrome.Google Chrome 使用的内核源码 ...

  2. SAP UI5的source code map(源代码映射)机制

    SAP UI5库文件里出现的变量和函数,按照先后顺序出现在sap-ui-core-js.map文件里,如下图所示: 映射细节: 更详细的介绍,请参考我的博客: More detail about UI ...

  3. Downloading Android Source Code

    Git 是 Linux Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的分布式版本控制软件,它不同于Subversion.CVS这样的集中式版本控制系统.在集中式版本控制系统 ...

  4. Reverse-engineer Source Code into UML Diagrams

    今天同事需要反向生成类图,用PowerDesigner 转了一份,不甚满意,在网上逛了逛,发现在这篇文章挺不错. I have been on several teams where we studi ...

  5. ROS : Navigation 基于碰撞传感器、悬崖传感器的实时避障 [kobuki]

    ROS : Navigation 基于碰撞传感器.悬崖传感器的实时避障 [kobuki] 话题消息 碰撞传感器 悬崖传感器 点云数据 传感器详细信息 基于碰撞传感器.悬崖传感器的实时避障 转点云数据源 ...

  6. 利用MSCOMM控件通过串口MODEN实现来电显示-c# source code

    利用MSCOMM控件通过串口MODEN实现来电显示-c# source code 注:此代码都已调试通过 处理方式 MSComm控件提供了两种处理通信的方式:一种为事件驱动方式,该方式相当于一般程序设 ...

  7. A Transformer-based Approach for Source code Summarization 翻译

    A Transformer-based Approach for Source Code Summarization 全文翻译 本文最佳阅读方式:读完一段中文内容快速阅读对应的英文部分 欢迎关注我的公 ...

  8. Android程序记事本源码,安卓记事本程序源代码(Android Notepad program source code).doc...

    安卓记事本程序源代码(Android Notepad program source code).doc 安卓记事本程序源代码(Android Notepad program source code)1 ...

  9. Pyinstaller 打包 torch 后执行失败 OSError: could not get source code

    1. 问题现象 系统环境 Python 3.6.9 torch 1.2.0 torchvision 0.4.0 Pyinstaller 4.5.1 Pyinstaller 打包 torch 后执行失败 ...

  10. Understanding The React Source Code

    Understanding The React Source Code - Initial Rendering (Simple Component) I UI updating, in its ess ...

最新文章

  1. Python设计模式-观察者模式
  2. apache 安装与配置详细教程
  3. JMSTemplate发送消息
  4. 使用 System.Net.Http.Json 简化 HttpClient 的使用
  5. 九齐51单片机使用注意事项:不要用float
  6. Go Web编程--SecureCookie实现客户端Session管理
  7. VideoPlayer参数
  8. Hiren’s BootCD 15.2下载 – 史上最强大的WinPE U盘启动工具详细介绍
  9. Windows 4K低延时H265/H264硬编码直播
  10. 申领电子驾照提示证件照不标准
  11. model-based强化学习入门
  12. TIM ETR 配置
  13. 2021-06-22ctf学习wp模板
  14. 智能玩具存在的安全隐患须知
  15. 将应用程序设置可信任(在win10操作系统)
  16. 电脑黑屏,只有鼠标光标
  17. Java实现-中位数
  18. nico和niconiconi dp详解
  19. CVPR2022 目标检测方向文章(附摘要)
  20. 河南太康一高高考成绩查询2021,太康一高 2020年高考捷报:清华、北大录取人数有望突破两位数……...

热门文章

  1. MSP MCU I2C入门指南
  2. linux中如何分割字符串数组中,Linux教程——Shell中字符串与数组操作实例
  3. excel筛选排序从小到大_EXCEL表格数据从小到大-Excel如何从小到大排列顺序
  4. 解锁system分区
  5. 计算机网络选择公用还是家庭,如何设置打印机共享?
  6. PCI/PCIe的学习笔记
  7. 占优策略名词解释_占优策略
  8. 板材品牌之生态板吊顶好还是桑拿板好
  9. 怎样把word文档里的html格式去掉,word文档去除格式
  10. 苹果x和xsmax有什么区别_苹果12和12pro有什么区别?参数对比拍照续航,哪个值得买?...