本文整理匯總了Python中tracker.PlanarTracker.goToPoint方法的典型用法代碼示例。如果您正苦於以下問題:Python PlanarTracker.goToPoint方法的具體用法?Python PlanarTracker.goToPoint怎麽用?Python PlanarTracker.goToPoint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tracker.PlanarTracker
的用法示例。
在下文中一共展示了PlanarTracker.goToPoint方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: NaslabNetwork
# 需要導入模塊: from tracker import PlanarTracker [as 別名]
# 或者: from tracker.PlanarTracker import goToPoint [as 別名]
#!/usr/bin/env python
from tracker import PlanarTracker
from communication import NaslabNetwork
from actuate import ROS2DimActuate
from numpy import pi
from path_generator import PathGenerator
connection = NaslabNetwork()
act = ROS2DimActuate()
tracker = PlanarTracker(act.actuate, connection.getStates)
for i in range(10):
tracker.goToPoint(1, 0)
tracker.faceDirection(pi/2)
path = PathGenerator(path_type='circle', speed=.3)
tracker.followPath(path)
示例2: LabNavigation
# 需要導入模塊: from tracker import PlanarTracker [as 別名]
# 或者: from tracker.PlanarTracker import goToPoint [as 別名]
connection = LabNavigation()
act = ROS2DimActuate()
tracker = PlanarTracker(act.actuate, connection.getStates)
tracker.setID(0)
path = PathGenerator(path_type='two_lines', speed=.2)
sleep(2)
# tracker.goToPoint(0, -2)
#
# tracker.faceDirection(-pi/4)
start_location = path.getBeginning()
tracker.goToPoint(start_location[0]+.3, start_location[1])
sleep(1)
tracker.faceDirection(pi / 2)
sleep(1)
path.startNow()
_, x, y, _, _, _, _ = connection.getStates(0)
tracker.followPath(path, x - start_location[0], y - start_location[1])
# tracker.goToPoint(-2.5/10, -2.5)
# tracker.faceDirection(pi / 2)
# path.setVelocity = .3
# sleep(1)
# path.startNow()
# tracker.followTrajectory(path)