ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How to use Simple_navigation_goals ?

asked 2011-11-18 14:40:21 -0600

Atom gravatar image

I am trying to figure out how to read navigation position of turtlebot in rviz (saved map,or new), and translate that info to write it in the Simple_navigation_goals.cpp. Does the cpp file send a goal similar to the way rviz does in gmapping, or does it just tell it to move forward then move left ..etc . How can I get the turtlebot to draw out a square. And how can I get turtlebot to go to a fixed location ? Thanks --Atom--

edit retag flag offensive close merge delete

Comments

@Atom, I am little bit confused with TurtleBot since there are two sources to download package; one is from here https://github.com/turtlebot/turtlebot_apps and other one is https://github.com/turtlebot/turtlebot_simulator. Which one you have used? Which version of ROS and Gazebo are you using?

RB gravatar image RB  ( 2013-11-10 05:52:02 -0600 )edit

@ Atom which tutorials you are referring; this one http://wiki.ros.org/Robots/TurtleBot or the other one from here http://wiki.ros.org/turtlebot_simulator. Can we modify the autonomous behavior in anyone of them?

RB gravatar image RB  ( 2013-11-10 06:11:26 -0600 )edit

3 Answers

Sort by » oldest newest most voted
2

answered 2011-11-18 22:00:15 -0600

dornhege gravatar image

Are you referring to this tutorial ?

It does send a goal similar to rviz does (to move_base, not gmapping). It does not tell the robot to go forward, left, etc., it just tells it where the robot should end up and lets the move_base node figure out how to do that best.

Going to a fixed location is the intended purpose, just set the fixed location as target pose and give it a the proper frame_id (e.g. map).

As for the example from the tutorial that moves the base 1m forward. It only does that by telling the robot the goal is 1m ahead relative to the robot (i.e. /base_link). Setting the target 1m ahead will usually result in the robot, just driving ahead for 1m, but it doesn't need to do that exactly.

To drive a square, there thus are two possibilities:

  1. Choose the 4 cornerpoints of a square as targets in the map and give those as goals.
  2. Use the "go X meters ahead trick" 4 times, you should also be able to turn 90° in the same way.
edit flag offensive delete link more

Comments

Thanks for the reply.. I also was wondering if the goal is set in perspective to the current position, wouldn't that make it hard to write x/y goals intended for a saved map in Rviz (like a kitchen) seeing as turtlebot might start off from various positions with in a map?
Atom gravatar image Atom  ( 2011-11-20 17:46:33 -0600 )edit
The goal is given with respect to the frame_id given. If it is an fixed frame_id (e.g. /map) it is an x/y goal in the map, if it is relative (e.g. /base_link) it is an x/y goal relative to the robot's current perspective.
dornhege gravatar image dornhege  ( 2011-11-21 03:26:25 -0600 )edit
Thanks for clearing that up for me.. makes sense.
Atom gravatar image Atom  ( 2011-11-21 07:06:45 -0600 )edit

@dornhege iis it possible to change the goal your giving? for example i give it the (3,5) and before it arrives send a new goal to (2,4) is it possible? And is it possible to get the position of the robot at a certain time?

ctguell gravatar image ctguell  ( 2013-11-04 06:02:06 -0600 )edit
1

answered 2011-11-19 20:05:20 -0600

I'm doing something like this to add a user interface. You might want to see the code here for an example of setting initial pose and goal positions.

edit flag offensive delete link more

Comments

Thanks for the link... I'm glad to see someone else is interested in this topic.. Wow your file is quite complex. I'm not much of a programmer. Might take me some time to figure this out, but it looks promising. Could you give a brief description of what the code is doing so that I can sort it out?
Atom gravatar image Atom  ( 2011-11-20 17:59:44 -0600 )edit
I noticed your comments in the code but a brief description might help me get a clearer picture of whats happening. BTW I think what you are working on looks Awesome... Seems you are adding buttons for arduino to set goals or positions .?.. I was thinking of doing something like that with a Serial -
Atom gravatar image Atom  ( 2011-11-20 18:02:40 -0600 )edit
-LCD to display current position of turtlebot. With that and your code I think turtlebot would be soo much more Amazing...
Atom gravatar image Atom  ( 2011-11-20 18:22:54 -0600 )edit
JediHamster gravatar image JediHamster  ( 2011-11-20 20:12:34 -0600 )edit
Thanks so much for the great write up... Looking forward to installing this on my turtlebot :) many thanks. --Atom--
Atom gravatar image Atom  ( 2011-11-20 20:39:38 -0600 )edit
1

answered 2013-11-04 11:57:16 -0600

jorge gravatar image

updated 2013-11-07 12:24:38 -0600

Hi all, we did this package recently for a demo: allows you to set waypoints throw where the robot will go before reaching the final goal. It's a quite simplistic and fast implementation for a demo, but anyway it can be useful for you. It's still not released, so you need to download and compile the code. Tell me if you have any problem using it.

Update

You normally get the pose of the robot with a tf listener.

If you send a new goal, the previous one is preempted (cancelled). You can send goals relative to any reference frame. Then move base will convert it to map reference system. All this is quite well explained on this tutorial.

edit flag offensive delete link more

Comments

@jorge im using the simple_navigation_goal and i cant find a lot of information, how do you cancel one goal and post a new one before the first goal is reached? really appreciate your help

ctguell gravatar image ctguell  ( 2013-11-05 06:55:54 -0600 )edit

What you mean with "use"? You send goals to simple_navigation_goal topic? To cancel current goal you send a actionlib_msgs/GoalID message to /move_base/cancel topic. That's the simple way; the other option is to write your client for move_base action server, so you get more control of the navigation

jorge gravatar image jorge  ( 2013-11-05 12:20:13 -0600 )edit

@jorge@Atom how can i obtain the position of the robot at a given time? In simple_navigation_goals you post goals related to the actual position of the robot but can i get the actual position of the robot when the goal is posted? thanks

ctguell gravatar image ctguell  ( 2013-11-07 05:36:54 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2011-11-18 14:40:21 -0600

Seen: 6,018 times

Last updated: Nov 07 '13