移动机器人导航和rrt自主建图项目代码文件


移动机器人项目组任务安排表 Day 01 上午 1.gmapping参数配置(李超) 2.总体launch文件的编写(钟浩) 3.机器人tf,状态,滤波器launch文件的编写(李博) 4.移动机器人调试(李超,钟浩,李博) 5.完成gmapping建图修图(李超,钟浩,李博) 下午 1.move_base参数配置(李超,钟浩) 2.amcl参数配置(李博) 3.调试机器人导航参数(李超,钟浩,李博) 4.在rviz中完成机器人单点导航(李超,钟浩) 5.记录多个导航目标点(李超,钟浩) 6.查阅随机循环导航函数的资料(李博) 7.完成随机循环导航功能节点函数(李超,钟浩,李博) 8.完成随机循环导航功能测试(李超,钟浩,李博) 里程碑事件: 1.完成gmapping建图修图 2.调试机器人导航参数 3.完成随机循环导航功能测试 Day 02 上午 1.完成循环导航代码的编写(李超,钟浩,李博) 2.调试循环导航功能(李超,钟浩,李博) 下午 1.完成自主探索建图代码的编写(李超,钟浩,李博) 2.调试自主探索功能(李超,钟浩,李博) 3.优化自主探索功能代码(李超,钟浩,李博) Day 03 上午 1.完成初始化位姿功能 2.完成里程计清零功能 下午 1.完成可设置循环次数导航功能 2.调试初始化位姿,里程计清零,循环导航功能 Day 04 上午 1.完成单点设定导航插件 下午 1.完善单点设定导航插件 2.调试单点设定导航插件功能 Day 05 上午 1.完成多导航点记录插件 2.完成多点循环导航节点 下午 1.完成多点循环导航插件 2.调试多点循环导航插件功能 Day 06 上午 1.查找关于巡墙算法的解决方案 2.完成rrt_exploration(快速随机搜索树)的下载和demo测试 下午 1.修改rrt_exploration接口 Day 07 上午 1.修改rrt_exploration接口 下午 1.修改rrt_exploration接口 Day 08 上午 1.在仿真机器人上完成快速随机搜索树自主探索建图功能 2.优化导航UI界面 下午 1.在真实机器人上完成快速随机搜索树自主探索建图功能 2.优化导航UI界面 Day 09 上午 1.分别完成导航和自主建图的move_base参数的配置 下午 1.完成rviz中marker标记 Day 10 上午 1.将marker功能添加到真实机器人上,并完成各项参数优化。 下午 1.完成代码整理,说明文档撰写。
资源截图
代码片段和文件信息
//代码说明:接收循环次数和多个导航点,对数据进行处理,循环发布导航点至move_base
//需要的头文件
#include 
#include se_msgs/MovebaseAction.h>
#include 
#include 
#include 
//定义一个vector用以接收多个导航点
std::vector pose_list;
//声明循环次数和多导航点的接收者
ros::Subscriber vec_sub;
ros::Subscriber tim_sub;
//声明循环次数,导航目标个数,循环需要的中间值
int Cycle_timesGoals_numcount = 0;
//接收循环次数
void timcallback(const std_msgs::Int8::ConstPtr& msg)
{
Cycle_times = msg->data.c_str();
}
//接收导航点数组,循环发布导航点到move_base
void callback(const geometry_msgs::PoseArray::ConstPtr& pose_array)
{
//取得导航点个数
Goals_num = pose_array->poses.size();
//存入多个导航点
for(int i =0;i {
pose_list.push_back(pose_array->poses[i]);
}
actionlib::SimpleActionClientse_msgs::MovebaseAction> cycle_client(“move_base“true);
ROS_INFO(“Waiting for move_base action server...“);
if(!cycle_client.waitForServer(ros::Duration(60)))
{
ROS_INFO(“Can‘t connected to move base server“);
}
ROS_INFO(“Connected to move base server“);
ROS_INFO(“Starting navigation “);
ROS_INFO(“cycle times is %d“Cycle_times);
ROS_INFO(“cycle goals is %d“Goals_num);
//多次循环
for (int i =0 ; i {
//循环一次所发布的多个导航点
while(count  {
move_base_msgs::MovebaseGoal goal;
goal.target_pose.header.frame_id = “map“;
goal.target_pose.header.stamp = ros::Time::now();
goal.target_pose.pose = pose_list[count];
cycle_client.sendGoal(goal);
//60S内如果不能达到目标点则放弃该目标点
bool finished_within_time = cycle_client.waitForResult(ros::Duration(60));
if(!finished_within_time)
{
cycle_client.cancelGoal();
ROS_INFO(“Timed out achieving goal“);
}
else
{
//导航成功
if(cycle_client.getState() == actionlib::SimpleClientGoalState::SUCCEEDED)
{
ROS_INFO(“Goal %d succeeded!“count+1);
}
//导航失败
else
{
ROS_INFO(“move plan is error“);
}

}
count += 1;
}
count = 0;
}
//导航结束,清空存放多个导航点的vector
ROS_INFO(“The Cycle Goals is over“);
pose_list.clear();
}

int main(int argcchar** argv)
{
//初始化并设置节点名
ros::init(argcargv“cycle_nav“);
//创建句柄
ros::NodeHandle n;
ROS_INFO(“Cycle_nav is start...“);
//定义循环次数的接收者
tim_sub = n.subscribe(“Cycle_times“5timcallback);
//定义多导航点的接受者
vec_sub = n.subscribe(“Nav_PoseArray“5callback);
//循环等待回调函数
ros::spin();
return 0;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-09-10 05:52  最新版完美代码加解释
     文件         932  2018-08-24 07:29  最新版完美代码加解释移动机器人的项目理解.txt
     目录           0  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan
     文件        2235  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscanCMakeLists.txt
     目录           0  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscancfg
     文件        1189  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscancfgDepth.cfg
     文件         353  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan
odelets.xml
     目录           0  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.git
     文件        1879  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitindex
     目录           0  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitinfo
     文件         240  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitinfoexclude
     目录           0  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.githooks
     文件         189  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.githookspost-update.sample
     文件        4898  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.githookspre-rebase.sample
     文件        1642  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.githookspre-commit.sample
     文件        1348  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.githookspre-push.sample
     文件        3610  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.githooksupdate.sample
     文件         896  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.githookscommit-msg.sample
     文件        1239  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.githooksprepare-commit-msg.sample
     文件         424  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.githookspre-applypatch.sample
     文件         478  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.githooksapplypatch-msg.sample
     文件          73  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitdescription
     文件         298  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitconfig
     文件          29  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitHEAD
     目录           0  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitlogs
     文件         214  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitlogsHEAD
     目录           0  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitlogs
efs
     目录           0  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitlogs
efsheads
     文件         214  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitlogs
efsheadsindigo-devel
     目录           0  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitlogs
efs
emotes
     目录           0  2018-08-14 08:02  最新版完美代码加解释depthimage_to_laserscan.gitlogs
efs
emotesorigin
............此处省略252个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)