ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

Problems sending two goals

asked 2014-03-27 03:42:16 -0600

ctguell gravatar image

updated 2014-03-27 03:59:13 -0600

Im using the simple_navigation_goal and i need to first send a goal to 7,2 (x,y) and then when he arrives he need to go to 10,4. the problem is that i dont understand if the second goal i send must be 10,4 or 3,2. Also when i give the robot a goal does this goal start from when the robot is, or does it represent a place in the map where it does not change when the robot moves? I need to send my robot to a goal x,y and before he arrives i need him to go to 10,4 y have the /pose so i know where he is but dont know if the goal i must send is 10,4 or one related to the actual position posted by /pose

Any help would be really apprciated

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-03-27 07:23:12 -0600

ahendrix gravatar image

The goals for the navigation stack are in the global frame, which is usually the /map frame. This means that you'll always send the absolute goal, in your case 7,2 followed by 10,4.

You can use the actionlib interface to the navigation stack to request navigation to the first goal, and get notified when the robot arrives there, so that you can send the next goal.

edit flag offensive delete link more
1

answered 2014-03-27 07:47:49 -0600

The easiest option certainly is sending all goals in the global "/map" frame. Note that you also can send goals relative to arbitrary frames (for example relative to the robot in the "base_link" frame). The goal will always be converted to the global frame inside move_base first (see move_base.cpp line 648).

edit flag offensive delete link more

Comments

@ahendrix@Stefan Kohlbrecher Im puching the goals with this code goal.target_pose.pose.position.x = 10.0; goal.target_pose.pose.position.y = 4.0; goal.target_pose.pose.orientation.w = 1.0; ROS_INFO("Sending goal"); ac.sendGoal(goal); But when i see the /move_base/current_goal i see at the beguining the 7,2 but then i send the goal 10,4 as describes above the result i get in move_base/current_goal is NOT 10,4 but other number

ctguell gravatar image ctguell  ( 2014-03-28 18:56:52 -0600 )edit

Do you set the goal frame_id?

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2014-03-30 07:37:30 -0600 )edit

@Stefan Kohlbrecher im not sure, where should this be done? I followed the simple_navigation_goals tutorial

ctguell gravatar image ctguell  ( 2014-04-01 05:06:23 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2014-03-27 03:42:16 -0600

Seen: 498 times

Last updated: Mar 27 '14