资源简介
Astar算法机器人路径规划
Ubuntu,在playerstage仿真。

代码片段和文件信息
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// STL A* Search implementation
// (C)2001 Justin Heyes-Jones
//
// This uses my A* code to solve the 8-puzzle
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include
#include
#include
#include
using namespace std;
// Configuration
#define NUM_TIMES_TO_RUN_SEARCH 1
#define DISPLAY_SOLUTION_FORWARDS 1
#define DISPLAY_SOLUTION_BACKWARDS 0
#define DISPLAY_SOLUTION_INFO 1
#define DEBUG_LISTS 0
// AStar search class
#include “stlastar.h“ // See header for copyright and usage information
// Global data
#define BOARD_WIDTH (3)
#define BOARD_HEIGHT (3)
#define GM_TILE (-1)
#define GM_SPACE (0)
#define GM_OFF_BOARD (1)
// Definitions
// To use the search class you must define the following calls...
// Data
// Your own state space information
// Functions
// (Optional) Constructor.
// Nodes are created by the user so whether you use a
// constructor with parameters as below or just set the object up after the
// constructor is up to you.
//
// (Optional) Destructor.
// The destructor will be called if you create one. You
// can rely on the default constructor unless you dynamically allocate something in
// your data
//
// float GoalDistanceEstimate( PuzzleState &nodeGoal );
// Return the estimated cost to goal from this node (pass reference to goal node)
//
// bool IsGoal( PuzzleState &nodeGoal );
// Return true if this node is the goal.
//
// bool GetSuccessors( AStarSearch *astarsearch );
// For each successor to this state call the AStarSearch‘s AddSuccessor call to
// add each one to the current search - return false if you are out of memory and the search
// will fail
//
// float GetCost( PuzzleState *successor );
// Return the cost moving from this state to the state of successor
//
// bool IsSameState( PuzzleState &rhs );
// Return true if the provided state is the same as this state
// Here the example is the 8-puzzle state ...
class PuzzleState
{
public:
// defs
typedef enum
{
TL_SPACE
TL_1
TL_2
TL_3
TL_4
TL_5
TL_6
TL_7
TL_8
} TILE;
// data
static TILE g_goal[ BOARD_WIDTH*BOARD_HEIGHT];
static TILE g_start[ BOARD_WIDTH*BOARD_HEIGHT];
// the tile data for the 8-puzzle
TILE tiles[ BOARD_WIDTH*BOARD_HEIGHT ];
// member functions
PuzzleState() {
memcpy( tiles g_goal sizeof( TILE ) * BOARD_WIDTH * BOARD_HEIGHT );
}
PuzzleState( TILE *param_tiles )
{
memcpy( tiles param_tiles sizeof( TILE ) * BOARD_WIDTH * BOARD_HEIGHT );
}
float GoalDistanceEstimate( PuzzleState &nodeGoal );
bool IsGoal( PuzzleState &nodeGoal );
bool GetSuccessors( AStarSearch *astarsearch
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
-rw-r--r-- 342 2011-03-10 02:01 8 puzzle Astar\astar.cfg
-rwxr-xr-x 277 2011-03-14 00:40 8 puzzle Astar\astar.world
-rw-r--r-- 15412 2009-02-16 12:09 8 puzzle Astar\8puzzle.cpp
-rw-r--r-- 8467 2011-03-13 22:20 8 puzzle Astar\astar.cpp
-rw-r--r-- 16411 2011-03-13 23:28 8 puzzle Astar\stlastar.h
-rw-r--r-- 15171 2011-02-15 23:31 8 puzzle Astar\bitmaps\SRI-AIC-kwing.png
-rw-r--r-- 3138 2011-02-15 23:31 8 puzzle Astar\bitmaps\cave.png
-rw-r--r-- 1454 2011-02-15 23:31 8 puzzle Astar\bitmaps\table.png
-rw-r--r-- 1676 2011-03-03 01:03 8 puzzle Astar\bitmaps\circle3.png
-rw-r--r-- 236278 2011-03-03 00:37 8 puzzle Astar\bitmaps\circle2.bmp
-rw-r--r-- 290 2011-02-15 23:31 8 puzzle Astar\bitmaps\Makefile.am
-rw-r--r-- 5598 2011-02-15 23:31 8 puzzle Astar\bitmaps\rink.png
-rw-r--r-- 6754 2011-02-15 23:31 8 puzzle Astar\bitmaps\hospital_section.png
-rw-r--r-- 39605 2011-02-15 23:31 8 puzzle Astar\bitmaps\frieburg.png
-rw-r--r-- 236278 2011-03-02 18:15 8 puzzle Astar\bitmaps\circle.bmp
-rw-r--r-- 745 2011-02-15 23:31 8 puzzle Astar\bitmaps\human_outline.png
-rw-r--r-- 1880 2011-03-02 18:11 8 puzzle Astar\bitmaps\circle.PNG
-rw-r--r-- 3638 2011-02-15 23:31 8 puzzle Astar\bitmaps\ghost.png
-rw-r--r-- 651 2011-02-15 23:31 8 puzzle Astar\bitmaps\cave_compact.png
-rw-r--r-- 44083 2011-02-15 23:31 8 puzzle Astar\bitmaps\hospital.png
-rw-r--r-- 224435 2011-02-15 23:31 8 puzzle Astar\bitmaps\SFU_1200x615.png
-rw-r--r-- 6355 2011-02-15 23:31 8 puzzle Astar\bitmaps\889_05.png
-rw-r--r-- 4267 2011-02-15 23:31 8 puzzle Astar\bitmaps\uoa_robotics_lab.png
-rw-r--r-- 1257 2011-02-15 23:31 8 puzzle Astar\bitmaps\submarine_small.png
-rw-r--r-- 1741 2011-03-03 00:45 8 puzzle Astar\bitmaps\circle2.png
-rw-r--r-- 574 2011-02-15 23:31 8 puzzle Astar\bitmaps\autolab.png
-rw-r--r-- 242 2011-02-15 23:31 8 puzzle Astar\bitmaps\space_invader.png
-rw-r--r-- 1783 2011-02-15 23:31 8 puzzle Astar\bitmaps\sal2.png
-rw-r--r-- 9265 2011-02-15 23:31 8 puzzle Astar\bitmaps\mbicp.png
-rw-r--r-- 736 2011-02-15 23:31 8 puzzle Astar\bitmaps\submarine.png
............此处省略16个文件信息
相关资源
- 机器人单机械臂滑模控制程序
- 智能寻迹机器人源程序及pcb图
- 用OpenGL开发的机械臂运动仿真程序(
- 发那科fanuc机器人robot(电气调试启动
- Fanuc机器人PNS程序和RSR程序启动改.d
- 微信聊天机器人源码
- 机器人操作系统ROS2
- ipad微信协议机器人
- 水下自重构机器人行走运动稳定性准
- 机器人运动学及动力学
- Geometrical methods in robotics
- 基于改进势场栅格法的移动机器人路
- 基于改进人工势场法的救灾机器人路
- 机器人-SPS程序-简析
- Kuka库卡机器人编程语法进阶
- 基于测量机器人与近景摄影测量技术
- 论变形监测技术的现状与发展趋势
- ABB机器人教学仿真源代码_搬运应用
- ABB第五代机器人控制器IRC5手册.pdf
- 基于OpenGL的仿蝗虫机器人三维动态仿
- 机器人手册 第2卷 机器人技术 [布鲁
- 可重构机器人系统的分布式控制系统
- 网狐6603源码最新版斗地主+机器人
- 晨风QQ机器人破解版
- 台湾某大学的机器人学讲义
- baxter机器人抓取杯子Baxter_pick_cup_gam
- 机器人 知识.ppt
- 小i机器人知识问答词库.zip
- 挖掘机器人液压系统选型与改进设计
- FANUC机器人Socket Message通讯设置及使用
评论
共有 条评论