Robotics StackExchange | Archived questions

Navigation of turtlebot on static map

hello. I am using turtlebot burger with kinetic and ubuntu 16.04. I am not using lidar or any sensor to make a map, rather i have used a static map made in an image editor. I have been able to make this map run on map server, but when i use rviz to esimate initial pose and give some navigation goal command, i can not do so. i run roscore on PC,then roslaunch on turtlebot, then start map server, then start rviz, but something is missing. How can i do autnomous navigation using my static map. regards

Asked by enthusiast.australia on 2019-08-22 15:39:15 UTC

Comments

Do you have a transform to map? Normally you would use a sensor with amcl to localise a position in the map.

Asked by PapaG on 2019-08-22 18:06:14 UTC

I am just using odometry to locate and move robot. What do you mean by transform to map? I just make a static map, make the corresponding .pgm and .yaml file, and make it to map server. Then i start rviz, but i am unable to give 2D pose estimation and 2D navigation goal using rviz. I have not used any laser or any other sensor to make the map

Asked by enthusiast.australia on 2019-08-23 06:40:01 UTC

You probably want to run without amcl and gmapping and use odom as global frame

Asked by Humpelstilzchen on 2019-08-23 11:14:04 UTC

Yes,i want to run it without gmapping, but somehow i am unable to do so. i run roscore on PC,then roslaunch on turtlebot, then start map server, then start rviz but after that, iam stuck. What should i do to move my robot?

Asked by enthusiast.australia on 2019-08-23 13:56:00 UTC

@enthusiast.australia: please mark a question as answered by clicking the checkmark to the left of the answer.

We don't close questions here when they are answered.

Asked by gvdhoorn on 2019-09-08 10:43:28 UTC

Answers

Your issue arises from not having a localisation in the map frame. You are localising yourself in the odom frame but not in the map frame. The transform should be as per ROS REP 105. To solve this since you cannot use amcl to localise in the map frame, you should run the map in the odom frame. From default, you will be loading the map with map server of which has the parameter frame_id which specifies what frame to load the map in. Use case will be:

command line

rosrun map_server map_server mymap.yaml frame_id:=odom

launch

<launch>

  <arg name="map_file" default="$(find [package where your map is])/mymap.yaml"/>

  <!-- Run the map server -->
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" >
        <param name="frame_id" value="odom"/>
 </node>

</launch>

Asked by PapaG on 2019-08-23 18:51:43 UTC

Comments

Thank you for your help, but i am still having a problem. first thing, it might be irrelevant but in rviz, i am unable to provide my robot modle. i use this command before rviz "export TURTLEBOT3_MODEL=burger" but still i am unable to do so. secondly, when i give 2D pose estimate, it records value in terminal and also when i give 2 D goal, it shows me the goal coordinates but the robot does not move. Am i missing some pakg or something? i created a map, loaded in odometry frame as you helped, then started rviz and give 2Dgoal command, is there something else to do to make robot go to destination?

Asked by enthusiast.australia on 2019-08-24 19:07:59 UTC

Have you setup the navigation stack? Follow the tutorials if not.

Asked by PapaG on 2019-08-24 22:25:07 UTC

In the navigation stack, how can i skip/change laser sensor part as i am not using it. Also, do i need to alter my costmap,local map or something from the tutorial, and if yes can you help in this regard. It is because i am using static map as stated above. Many thanks brother

Asked by enthusiast.australia on 2019-08-25 16:40:42 UTC

You don't provide any sources to the cost map, therefore it should be blank. You don't need amcl as you aren't localizing in the map frame, you are to specify your map in odom.

Asked by PapaG on 2019-08-26 06:20:26 UTC

Please what do you mean by providing sources to cost map? there are three files of cost map, cost_map_common_params.yaml, global_costmap_params.yaml and local_costmap_params.yaml. so, what to alter and where?

Also, I used navigation stack for turtlebot. i have specified my map in odom But when i run rviz, i can see my turtlebot,i can use 2D esitmation but unable to use 2D navigation goal. How could i alter my files. And i get this warning.

[ WARN] [1566819074.305750747]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.100596 timeout was 0.1.

Asked by enthusiast.australia on 2019-08-26 06:43:12 UTC

I think you should read the tutorials in the navigation stack and understand how the stack interacts.

Asked by PapaG on 2019-08-26 21:41:24 UTC