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

2D nav goal robot model not moving

asked 2021-04-08 18:03:07 -0500

sisko gravatar image

updated 2021-04-08 18:16:31 -0500

I have setup my launch file with my robot model, amcl, rviz, map_server and gazebo nodes.

<?xml version="1.0"?>
<launch>

    <include file="$(find sweep_bot)/launch/cleaner.launch"/>

    <node name="rviz" pkg="rviz" type="rviz" output="screen" args='-d $(find sweep_bot)/config/drive.rviz'/>

    <include file='$(find gazebo_ros)/launch/empty_world.launch'>
        <arg name="world_name" value='$(find sweep_bot)/worlds/small_city_test.world'/>
    </include>

    <node name="map_server" pkg="map_server" type="map_server" output="screen" args="/home/sisko/city_map_hukoyu_2.yaml"/>

    <node name="amcl" pkg="amcl" type="amcl" output="screen">
        <remap from="scan" to="hokuyo_scan"/>
        <param name="base_frame_id" value="chasis"/>
    </node>

</launch>

In Rviz, I can see the particle filters around my robot model but when I set a 2d nav goal, the goal arrow is visible but the robot does not move. I get the following output in the terminal which also confirms the target goal is being set:

[ INFO] [1617913900.400431086, 23.470000000]: Setting goal: Frame:map, Position(14.271, 0.623, 0.000), Orientation(0.000, 0.000, 0.001, 1.000) = Angle: 0.002

image description

There are no warning or error messages.

I need help understanding what I'm missing or doing wrong, please.

edit retag flag offensive close merge delete

Comments

You appear to be missing a move_base node. If that is the case, the navigation tutorials may help--the robot setup one in particular.

tryan gravatar image tryan  ( 2021-04-08 21:35:04 -0500 )edit

I introduced a move_base node into my launch file but there is a missing transform which triggers this warning : [ WARN] [1617932236.454850033, 478.830000000]: Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: source_frame base_link does not exist.. canTransform returned after 0.1 timeout was 0.1. I'm thought there might be a base_link parameter I can set for the move_base node but I could not find one. Can you help ?

sisko gravatar image sisko  ( 2021-04-09 16:07:44 -0500 )edit
1

You're on the right track. The move_base node (link above) incorporates multiple plugins which each have their own configuration--some of which include robot_base_frame. You'll have to become familiar with the various costmap and planner parameters in particular. For navigation, I strongly recommend following a tutorial (links above) all the way through before adapting it to your own robot. Here's one for TurtleBot3. Then you can compare your files and parameters to theirs.

tryan gravatar image tryan  ( 2021-04-09 20:07:09 -0500 )edit
1

Hi @tryan. So, I got it working. I was missing costmaps. Curiously, I created common, local and global costmaps but for a long time (like a day) my model still didn't move. Then suddenly it began to move in response to my 2D nav goals. I'm not sure what changed.

If you want to add your comments as an answer I'll be happy to accept it. Thank you again.

sisko gravatar image sisko  ( 2021-04-12 07:25:31 -0500 )edit

That's great that you got it working! If you figure out what that last change was, post an update. I've had things like that happen, where I just forgot to save a file after I changed it and didn't realize it until later. In any case, I'm happy your robot is up and navigating!

tryan gravatar image tryan  ( 2021-04-12 08:56:46 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-04-12 08:52:00 -0500

tryan gravatar image

To summarize the comments, the launch file is missing a move_base node, which in turn, requires configuring costmap parameters among other things. The robot_base_frame parameter appears in both local and global costmaps and should match the robot. Here are some helpful links, including tutorials and example files:

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-04-08 18:03:07 -0500

Seen: 977 times

Last updated: Apr 12 '21