Ask Your Question
0

modify goal move base

asked 2017-05-11 04:25:10 -0500

alsora gravatar image

updated 2017-05-19 10:42:32 -0500

Hi, I'm using the ros navigation stack for an exploration task. I use NavFN as global planner and TrajectoryPlannerRos as local planner (DWA = true).

What I would like to do is the following:

-I send a goal through actionlib::SimpleActionClient (move_base_msgs::MoveBaseAction). This goal is characterized by a specific position and orientation.

-While the robot is moving toward the goal I would like to modify the desired goal orientation.

I tried to send a new goal with the same position but different orientation, the problem is that the robot plans again a new path which is tipically different from the original one.

I don't understand how to achieve my desired behaviour, which should not be so complicated since the global planner only computes a list of positions (without orientation) and once the robot has reached the goal one, the local planner aligns it with respect to the issued desired orientation.

Thank for your help.

UPDATE:

I'm implementing an exploration algorithm. My idea is to send as goal a pose from which a big unexplored area could be seen. While moving toward the goal the robot could explore this area "by chance" so a typical approach would be to abort the goal and plan again for a new one. I think that sometimes could be more convenient to keep the same goal (because maybe we have almost reached it) and request a different orientation (from which an unexplored area could still be observed). The problem in planning again with a different orientation is that due to the changes in the map and the not deterministic behaviour of the planner, the new plan could have a different shape with respect to the old one and, in order to follow it, strange maneuvers could be necessary.

By the way the answer and further trials convinced myself that this is the only way of achieving this.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2017-05-17 02:54:22 -0500

Procópio gravatar image

I am not sure you can ask move base to reuse its current plan and just change its goal orientation. A workaround to get what you want is to wait for move_base to reach the original goal and then send a new one with the current pose but corrected orientation.

edit flag offensive delete link more

Comments

Thank you for your reply. Your idea would for sure work, but it would also require unnecessary rotations of the robot base. I would avoid that. e.g. goal = 0, 0, pi/2 ... while moving I want to change it to 0,0,0 . The robot maybe arrives at 0,0,0 then rotate to pi/2 and finally would rotate to 0

alsora gravatar imagealsora ( 2017-05-17 03:19:38 -0500 )edit

yes, this solution may add unnecessary rotations. you could set "yaw_goal_tolerance" to a high value, so move_base would pretty much ignore the orientation, but I think that is not what you want...

Procópio gravatar imageProcópio ( 2017-05-17 07:34:02 -0500 )edit

a side question, why do you want to change the goal orientation during the robot motion?

Procópio gravatar imageProcópio ( 2017-05-17 07:34:45 -0500 )edit

Added as update to the question. I agree that it's not possible doing what I was asking, or, at least it's not straight forward.

alsora gravatar imagealsora ( 2017-05-19 10:43:22 -0500 )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

Stats

Asked: 2017-05-11 04:25:10 -0500

Seen: 635 times

Last updated: May 19 '17