本文整理汇总了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)