How to create an action server for navigation?
I have created my own robot and already created a 2d map using gmapping with laser. The simple amcl localization is used in rviz (laser - particle filter) and my robot is able to localize in a created pmg map in rviz. Now, I want to send a goal coordinates for my robot for it to navigate within a map and I have created a new package and a new node like following this tutorial: http://wiki.ros.org/navigation/Tutori...
I can see that it waits for the server and when I launch this node, I get the move_base/goal topic but the client just awaits. How can I create this server?
So you are stuck here I guess:
Is this message showing all the time? Also do you have move_base running?
You should look into the actionlib doc and also the action lib tutorials to understand the basics of it first.
@pavel92 Yes, it shows every 5 seconds. It is running.
@Delb I have read that tutorial, in Action Server CPP file, they have included
chores::DoDishesGoalConstPtr& goal
invoid execute
. What will be equivalentvent to that inmove_base_msgs::MoveBaseAction
?You should continue investigating the tutorials it's explained (here). For move_base that should be
move_base_msgs::MoveBaseGoalConstPtr& goal
@stevemartin: what sort of robot do you have? A differential drive platform?
If so: unless you want to learn how to write your own action server for this, I would suggest to use one of the available diff drive packages or
ros_control
plugins. That will save you quite some time.@gvdhoorn Yes, a mobile robot. I can see that the plugin is responsible for the movement and I believe it publishes to /cmd_vel topic. But I was looking for the navigation of my robot. I want to send a goal coordinates and let my robot to navigate to that point (in known map).
The navigation stack is typically responsible for consuming nav goals and then transforming those into
Twist
msgs published oncmd_vel
topics that ultimately make the robot move.It's rare for someone to write their own
MoveBaseGoal
consumer.