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

launch "global_planner" without move_base

asked 2018-10-05 13:22:55 -0600

-LD- gravatar image

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):

    <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 pkg="global_planner" type="planner" name="planner" />

    <robotdescription> my own xacro </robotdescription>
    <robot_state_publisher ... />
    <joint_state_publisher ... />
    <node> rviz </node>

params.yaml (but since ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-10-05 13:29:51 -0600

-LD- gravatar image

And i would like to answer my own question. it came to me as i wrote down that the two nodes have almost exactly the same costmap/params. The global_planner just comes with it's own costmap. All i had to do is to load the exact same yaml-file together with the global_planner. And as expected: the node complains and doesn't calculate a path, but it stays alive and you can just enter a valid goal and the planner will than give you a plan.

Maybe this can help someone trying the same as me :D

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-10-05 13:22:55 -0600

Seen: 522 times

Last updated: Oct 05 '18