当前位置: 首页>>代码示例>>Python>>正文


Python PlanarTracker.goToPoint方法代码示例

本文整理汇总了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)
开发者ID:NASLab,项目名称:GroundROS,代码行数:20,代码来源:follow_line.py

示例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)
开发者ID:NASLab,项目名称:GroundROS,代码行数:31,代码来源:tracking_performance_analysis.py


注:本文中的tracker.PlanarTracker.goToPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。