2D nav goal robot model not moving
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
There are no warning or error messages.
I need help understanding what I'm missing or doing wrong, please.
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.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 ?You're on the right track. The
move_base
node (link above) incorporates multiple plugins which each have their own configuration--some of which includerobot_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.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.
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!