赞
踩
Turbot与python编程-实现带避障的定点导航
说明:
介绍如何利用turbot机器人利用雷达或kinect进行定点导航,同时能动态避开障碍
代码:
实现代码:
# TurtleBot must have minimal.launch & amcl_demo.launch
# running prior to starting this script
# For simulation: launch gazebo world & amcl_demo prior to run this script
# goToSpecificPointOnMap.py
import rospy
from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal
import actionlib
from actionlib_msgs.msg import *
from geometry_msgs.msg import Pose, Point, Quaternion
form sys import argv
class GoToPose():
def __init__(self):
self.goal_sent = False
# What to do if shut down (e.g. Ctrl-C or failure)
rospy.on_shutdown(self.shutdown)
# Tell the action client that we want to spin a thread by default
self.move_base = actionlib.SimpleActionC
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。