#!/usr/bin/env python
import rospy
from geometry_msgs.msg import PoseStamped, PointStamped
from std_msgs.msg import Empty

goal_pub = None
goal = None

def int_pt_cb(msg):
    global goal
    goal = PoseStamped()
    goal.header = msg.header
    goal.pose.position = msg.point
    goal.pose.orientation.w = 1
    

def click_cb(msg):
    if goal:
        goal_pub.publish(goal)

if __name__ == '__main__':
    rospy.init_node('publish_goal_from_click')
    goal_pub = rospy.Publisher('move_base_simple/goal', PoseStamped)
    rospy.Subscriber('intersected_point', PointStamped, int_pt_cb)
    rospy.Subscriber('click', Empty, click_cb)
    rospy.spin()
21ef1d99efee8817ea6374365f81269177be9571
<mask token>


def int_pt_cb(msg):
    global goal
    goal = PoseStamped()
    goal.header = msg.header
    goal.pose.position = msg.point
    goal.pose.orientation.w = 1


def click_cb(msg):
    if goal:
        goal_pub.publish(goal)


<mask token>

<mask token>


def int_pt_cb(msg):
    global goal
    goal = PoseStamped()
    goal.header = msg.header
    goal.pose.position = msg.point
    goal.pose.orientation.w = 1


def click_cb(msg):
    if goal:
        goal_pub.publish(goal)


if __name__ == '__main__':
    rospy.init_node('publish_goal_from_click')
    goal_pub = rospy.Publisher('move_base_simple/goal', PoseStamped)
    rospy.Subscriber('intersected_point', PointStamped, int_pt_cb)
    rospy.Subscriber('click', Empty, click_cb)
    rospy.spin()

<mask token>
goal_pub = None
goal = None


def int_pt_cb(msg):
    global goal
    goal = PoseStamped()
    goal.header = msg.header
    goal.pose.position = msg.point
    goal.pose.orientation.w = 1


def click_cb(msg):
    if goal:
        goal_pub.publish(goal)


if __name__ == '__main__':
    rospy.init_node('publish_goal_from_click')
    goal_pub = rospy.Publisher('move_base_simple/goal', PoseStamped)
    rospy.Subscriber('intersected_point', PointStamped, int_pt_cb)
    rospy.Subscriber('click', Empty, click_cb)
    rospy.spin()

import rospy
from geometry_msgs.msg import PoseStamped, PointStamped
from std_msgs.msg import Empty
goal_pub = None
goal = None


def int_pt_cb(msg):
    global goal
    goal = PoseStamped()
    goal.header = msg.header
    goal.pose.position = msg.point
    goal.pose.orientation.w = 1


def click_cb(msg):
    if goal:
        goal_pub.publish(goal)


if __name__ == '__main__':
    rospy.init_node('publish_goal_from_click')
    goal_pub = rospy.Publisher('move_base_simple/goal', PoseStamped)
    rospy.Subscriber('intersected_point', PointStamped, int_pt_cb)
    rospy.Subscriber('click', Empty, click_cb)
    rospy.spin()

#!/usr/bin/env python
import rospy
from geometry_msgs.msg import PoseStamped, PointStamped
from std_msgs.msg import Empty

goal_pub = None
goal = None

def int_pt_cb(msg):
    global goal
    goal = PoseStamped()
    goal.header = msg.header
    goal.pose.position = msg.point
    goal.pose.orientation.w = 1
    

def click_cb(msg):
    if goal:
        goal_pub.publish(goal)

if __name__ == '__main__':
    rospy.init_node('publish_goal_from_click')
    goal_pub = rospy.Publisher('move_base_simple/goal', PoseStamped)
    rospy.Subscriber('intersected_point', PointStamped, int_pt_cb)
    rospy.Subscriber('click', Empty, click_cb)
    rospy.spin()