ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Regarding your comment above the the documentation for the goal_id part of the message says the stamp is just the current time and the id can be any unique string (you could prefix a string to a string of the current time for this).
The header you can copy directly from the geometry_msgs/PoseStamped message to the new move_base message.
Hope this helps.
2 | No.2 Revision |
Regarding your comment above the the documentation for the goal_id part of the message says the stamp is just the current time and the id can be any unique string (you could prefix a string to a string of the current time for this).
The header you can copy directly from the geometry_msgs/PoseStamped message to the new move_base message.
Hope this helps.
UPDATE :
Okay, you're almost there. The problem is that you're creating a new publisher object each time that a message is received, you should only create the publisher once as a global variable. The reason why no messages are being received is that a publisher object takes a small amount of time to register with any subscribers, so if you create it and instantly publish a message to it no nodes will receive it.
If you move the line pub = rospy.Publisher('move_base/move/goal', MoveBaseActionGoal, queue_size = 10)
to the top of the code so it's global it should start working.