ros确实只是一个工具,或者说一个平台,它是支持c++与python编程的,有自身独特的消息系统、服务系统、行为系统等。所以,当你要实现并验证一个算法时,你首先应该用一般的编程思路将它写成一个c++或python程序,然后在程序需要数据交换的地方使用消息、服务、行为等这些ros特有的东西,并且用好已有的ros开源包来辅助你的算法设计。
ros导航中,开源的都是自由导航,依靠算法规划路径,然而,却存在很大的不确定性,因为外界的环境是复杂的。
为了提高稳定性以及限制机器人的自由度,根据建好的地图和所处的环境,让移动机器人沿着人为规划好的路径行走是可行而且有意义的。
根据本人所查阅的资料,目前,采用二阶的贝塞尔曲线作为移动机器人的路径规划是较常见的。三点(起点、控制点、终点)即可确定一条路径。
一、路径解析
二、路径发布
1、路径解析现已完成
采用基于贝塞尔曲线的路径解析方法。
2、路径发布(正在研究)
如何通过move_base发布解析后的路径,实现移动机器人沿规划好的路径行走!!!
(1) ros wiki 官方文档
The move_base node provides an implementation of the SimpleActionServer (see actionlib documentation), that takes in goals containing geometry_msgs/PoseStamped messages. You can communicate with the move_base node over ROS directly, but the recommended way to send goals to move_base if you care about tracking their status is by using the SimpleActionClient. Please see actionlib documentation for more information.
Action Subscribed Topics
move_base/goal (move_base_msgs/MoveBaseActionGoal)
A goal for move_base to pursue in the world.
move_base/cancel (actionlib_msgs/GoalID)
A request to cancel a specific goal.
Action Published Topics
move_base/feedback (move_base_msgs/MoveBaseActionFeedback)
Feedback contains the current position of the base in the world.
move_base/status (actionlib_msgs/GoalStatusArray)
Provides status information on the goals that are sent to the move_base action.
move_base/result (move_base_msgs/MoveBaseActionResult)
Result is empty for the move_base action.
Subscribed Topics
move_base_simple/goal (geometry_msgs/PoseStamped)
Provides a non-action interface to move_base for users that don’t care about tracking the execution status of their goals.
Published Topics
cmd_vel (geometry_msgs/Twist)
A stream of velocity commands meant for execution by a mobile base.
Services
~make_plan (nav_msgs/GetPlan)
Allows an external user to ask for a plan to a given pose from move_base without causing move_base to execute that plan.
~clear_unknown_space (std_srvs/Empty)
Allows an external user to tell move_base to clear unknown space in the area directly around the robot. This is useful when move_base has its costmaps stopped for a long period of time and then started again in a new location in the environment. - Available in versions from 1.1.0-groovy
~clear_costmaps (std_srvs/Empty)
Allows an external user to tell move_base to clear obstacles in the costmaps used by move_base. This could cause a robot to hit things and should be used with caution. - New in 1.3.1
(2)待解决
现,已将离散的路径点的坐标解析成points[ x,y ,z],quaternions[x,y,z,w]形式
求大神指导下,后续问题