pub_topic.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 import rospy
3 from move_base_msgs.msg import MoveBaseActionGoal
4 import math
5 
6 
7 
8 if __name__ == '__main__':
9  rospy.init_node('pub_goal_set')
10  pub = rospy.Publisher("/move_base/goal", MoveBaseActionGoal, queue_size = 1)
11  goals=MoveBaseActionGoal()
12  goals.header.frame_id='map'
13  goals.goal_id.id='wd'
14  goals.goal.target_pose.header.frame_id='map'
15  goals.goal.target_pose.pose.position.x=0.552559435368
16  goals.goal.target_pose.pose.position.y=-1.06640863419
17  goals.goal.target_pose.pose.position.z=0.0
18  goals.goal.target_pose.pose.orientation.x=0.0
19  goals.goal.target_pose.pose.orientation.y=0.0
20  goals.goal.target_pose.pose.orientation.z=-0.682496084898
21  goals.goal.target_pose.pose.orientation.w=0.730889248859
22  rate=rospy.Rate(0.1)
23  while not rospy.is_shutdown():
24 
25  pub.publish(goals)
26  rate.sleep()


xbot_tools
Author(s):
autogenerated on Sat Oct 10 2020 03:28:22