ROS navigation exam

I have a doubt regarding the exam. Here, I’m unable to understand task 4. Could you please give an elaborated explanations and guidelines of how to proceed. It would be helpful.

Hello @saitarak.padarthi ,

Let me try to explain better. For Task 4 you have to create a ROS node that does the following:

  1. Loads a YAML file into the ROS Parameter server. This YAML file is the one you created for Task 2, which contains 2 points from the map (point1 and point2)

  2. After the YAML file has been loaded, the program gets the data (coordinates) of the points from the ROS Parameter Server and saves it into variables.

  3. Then, you will use the data of point1 to create and send a goal to the Navigation move_base node so that the robot navigates to point1.

  4. Then, you do the same for point 2.

  5. You repeat the process creating a loop so that the robot keeps navigating from point1 to point2 and vice-versa.

Dear Sir,

I have implemented the code this way for and it doesn’t work. Please let me know where am I going wrong. I also attach send_goals.launch file here. Please check that as well.

import rospy
import time
import actionlib
from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal, MoveBaseResult, MoveBaseFeedback

def feedback_callback(feedback):
print("[Feedback] Going to Goal Pose…")

client = actionlib.SimpleActionClient("/move_base",MoveBaseAction)
goal = MoveBaseGoal()
goal.target_pose.header.frame_id = ‘map’
goal.target_pose.pose.position.x = 6.157956123352051
goal.target_pose.pose.position.y = 4.269886016845703
goal.target_pose.pose.position.z = 0
goal.target_pose.pose.orientation.x = 0
goal.target_pose.pose.orientation.y = 0
goal.target_pose.pose.orientation.z = 0.06524980593602075
goal.target_pose.pose.orientation.w = 0.9978689607485102


Hello @saitarak.padarthi ,

Could you provide some more information so that we can better help you? What error message are you getting? What behavior are you getting? Is the plan being generated but the robot doesn’t move? Is the program crashing? Thanks in advance.