本文整理匯總了Python中rospy.logerror方法的典型用法代碼示例。如果您正苦於以下問題:Python rospy.logerror方法的具體用法?Python rospy.logerror怎麽用?Python rospy.logerror使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rospy
的用法示例。
在下文中一共展示了rospy.logerror方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: import rospy [as 別名]
# 或者: from rospy import logerror [as 別名]
def __init__(self, options, parent=None):
super(ROSNode, self).__init__(parent)
self.compiledMsgs = [m for m in dir(msgCF) if m[0]!="_" and m[-2:]=="CF"] # Messages that are previously auto-compiled and we can send
if len(self.compiledMsgs)==0:
rospy.logerror('Not Messages could be loaded. Please connect to the flie and press Compile Messages, then run rosmake')
self.options = options
# Publishers
self.publishers = {} #Generated publishers will go here
self.pub_tf = tf.TransformBroadcaster()
# Subscribers
self.sub_tf = tf.TransformListener()
self.sub_joy = rospy.Subscriber("/cfjoy", cmdMSG, self.receiveJoystick)
self.sub_baro = None # Defined later
self.master = rosgraph.Master('/rostopic')
示例2: _add_waypoint_pose
# 需要導入模塊: import rospy [as 別名]
# 或者: from rospy import logerror [as 別名]
def _add_waypoint_pose(self):
current_pose = self._get_current_pose()
if (None != current_pose):
self._append_waypoint_pose(current_pose.pose.pose)
else:
rospy.logerror("Invalid waypoint pose")