20 from visualization_msgs.msg
import Marker
21 from naoqi_bridge_msgs.msg
import PoseWithConfidenceStamped
31 NaoqiNode.__init__(self,
'naoqi_pod_node')
33 self.
markerpublisher = rospy.Publisher(
'naoqi_pod_publisher', PoseWithConfidenceStamped, queue_size=5)
40 rospy.loginfo(
"Connecting to NaoQi at %s:%d", self.
pip, self.
pport)
50 if self.markerpublisher.get_num_connections() > 0:
51 worldToPod = almath.Pose2D(self.rechargeProxy.getStationPosition())
52 confidence = self.rechargeProxy._getConfidenceIndex()
53 self.
marker = PoseWithConfidenceStamped()
54 self.marker.header.stamp = rospy.Time.now()
55 self.marker.header.frame_id =
"/odom" 56 self.marker.pose.orientation = almath.Quaternion_fromAngleAndAxisRotation(worldToPod.theta, 0, 0, 1)
57 self.marker.pose.position.x = worldToPod.x
58 self.marker.pose.position.y = worldToPod.y
59 self.marker.pose.position.z = 0.0
60 self.marker.confidence_index = confidence
61 self.markerpublisher.publish(self.
marker)
64 if __name__ ==
'__main__':
def get_proxy(self, name, warn=True)