5 import geometry_msgs.msg
as geometry_msgs
18 data[
'frame_id'] = msg.header.frame_id
20 data[
'pose'][
'position'] = {
'x': p.x,
'y': p.y,
'z': 0.0}
21 data[
'pose'][
'orientation'] = {
'x': 0,
'y': 0,
'z': 0,
'w':1}
22 data[
'name'] =
'%s_%s' % (p.x, p.y)
24 self._waypoints.append(data)
25 rospy.loginfo(
"Clicked : (%s, %s, %s)" % (p.x, p.y, p.z))
31 f.write(yaml.dump(ways, default_flow_style=
False))
38 if __name__ ==
'__main__':
40 rospy.init_node(
'waypoint_generator')
41 filename = rospy.get_param(
'~filename',
'output.txt')
44 rospy.loginfo(
'Initialized')
46 rospy.loginfo(
'ByeBye')
def _process_pose(self, msg)
def __init__(self, filename)