corrected_initialpose.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 # Maps the initialpose pointing to Nao's torso to a corrected pose with correct
4 # height.
5 #
6 # Author: Johannes Garimort
7 # License: BSD
8 
9 import roslib
10 roslib.load_manifest('footstep_planner')
11 import rospy
12 import geometry_msgs.msg as geo_msgs
13 
14 
15 def callback(pose, pub):
16  newpose = pose
17  newpose.pose.pose.position.z += 0.315
18  pub.publish(newpose)
19 
20 
21 def listener():
22  rospy.init_node('corrected_initialpose')
23  pub = rospy.Publisher('nao_corrected_initialpose',
24  geo_msgs.PoseWithCovarianceStamped)
25  rospy.Subscriber("initialpose", geo_msgs.PoseWithCovarianceStamped,
26  callback, pub)
27  rospy.spin()
28 
29 
30 if __name__ == '__main__':
31  try:
32  listener()
33  except rospy.ROSInterruptException:
34  pass


footstep_planner
Author(s): Johannes Garimort, Armin Hornung
autogenerated on Mon Jun 10 2019 13:38:24