launch "global_planner" without move_base
Hey everybody,
I'm still working on my platform which is already running in the meantime. But I had to do some workarounds. To be more precise i didn't manged to set up the move_base to work with my bot. Either it is the setup/params or the odometry (which i programmed myself). But the Pathfinding works so far. So i programmed a path executor. A node, that just follows the path (the green line from the (global?) planner - NAVfn_path). No local planner, nothing extra. Just try to follow this line as close as possible. The bot is really slow - no dynamics to take into account. Moving objects are avoided because the path gets recalculated once every second or so.
Now to the "problem": i want to get rid of all the unneeded code running inside of move_base. So i tried to set up a costmap (costmap_2d) with the parameters i used with the move_base (since the costmap there just looks nice as it is right now :D). The standalone costmap looks as expected in rviz. Next step would be to start the "global_planner". from this link it is doing everything i need. I can even change the type of calculation there. And i hope i can just reinit the planner once it dies because the goal lies within an obstacle (the move_base tends to do this. The carrot_planner would do what i need, but ignores obstacles at all - even walls). But ... how do i call the planner? I just tried
$ rosrun glob[tab]al_planner [tab]planner
the [tab] just auto completed the command. So i would expect the node exists. I added it to the launch file i had prepared and it worked. for the goal i used
$ rostopic pub /planner/goal geometry_msgs/PoseStamped '{header: {frame: map}, pose: {position: {x: 1.0, y: 2.0, z: 0.0}}}'
Well, the planner complained the bot is outside of it's costmap. So i displayed it in rviz. And yes, it's outside, or more resize at 0.0/0.0 . And the costmap is blank. The costmap from the costmap_2d-node looks still nice and the bot is at the correct position (amcl works fine).
==>> How do i tell the "global_planner" to use the costmap of the "costmap_2d" ?
the documentation doesn't name anything like this. No topic the node subscribes to or a parameter with the name. all in all the documentation seems to be limited to the minimum since the planner doesn't seem to be intended to be used outside of move_base at all ?
rosparam list:
...
/costmap_2d_node/costmap/(many different parameters here)
...
/planner/costmap/(almost the same parameters as above)
....
Launchfile (shorted/abstract):
<launch>
<include> hardware driver, laserscanner, encoder, odometry </include>
<node> map server </node>
<node> amcl </node>
<node pkg="costmap_2d" type="costmap_2d_node" name="costmap_2d_node" clear_params="true">
<rosparam file="$(find navigation)nav_config/params.yaml" />
</node>
<node pkg="global_planner" type="planner" name="planner" />
<robotdescription> my own xacro </robotdescription>
<robot_state_publisher ... />
<joint_state_publisher ... />
<node> rviz </node>
</launch>
params.yaml (but since ...